Index: platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/ViewerApplication.java |
diff --git a/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/ViewerApplication.java b/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/ViewerApplication.java |
index 9389f7220810b458d0075d155087e0d1c37578dd..4b890bd5e1279cb2437a205d581b54aa04dffabc 100644 |
--- a/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/ViewerApplication.java |
+++ b/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/ViewerApplication.java |
@@ -11,6 +11,7 @@ import android.app.Application; |
public class ViewerApplication extends Application { |
private long mNativeHandle = 0; |
+ private ViewerActivity mViewerActivity; |
static { |
System.loadLibrary("skia_android"); |
@@ -38,4 +39,20 @@ public class ViewerApplication extends Application { |
public long getNativeHandle() { |
return mNativeHandle; |
} |
+ |
+ public void setViewerActivity(ViewerActivity viewerActivity) { |
+ this.mViewerActivity = viewerActivity; |
+ } |
+ |
+ public void setTitle(String title) { |
+ final String finalTitle = title; |
+ if (mViewerActivity != null) { |
+ mViewerActivity.runOnUiThread(new Runnable() { |
+ @Override |
+ public void run() { |
+ mViewerActivity.setTitle(finalTitle); |
+ } |
+ }); |
+ } |
+ } |
} |