summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-12-18 08:22:41 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-12-18 08:22:41 +0000
commit79cc9a126ae57a3bed34b5a4617a7cc331b4847e (patch)
tree92a0d30dce91b7e7f0a91e2658958edef436afff
parente3269d171111f474c9240688c3da62e26f6a2093 (diff)
parentad6569eefb8c3cf2b05ef7c9b91880fdf2b91a29 (diff)
downloadHTMLViewer-79cc9a126ae57a3bed34b5a4617a7cc331b4847e.tar.gz
Snap for 4507882 from ad6569eefb8c3cf2b05ef7c9b91880fdf2b91a29 to pi-release
Change-Id: I29e7684a11b8f8d5c1b933724121cc094030e996
-rw-r--r--src/com/android/htmlviewer/HTMLViewerActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/htmlviewer/HTMLViewerActivity.java b/src/com/android/htmlviewer/HTMLViewerActivity.java
index 20f2edc..38940c5 100644
--- a/src/com/android/htmlviewer/HTMLViewerActivity.java
+++ b/src/com/android/htmlviewer/HTMLViewerActivity.java
@@ -24,6 +24,7 @@ import android.content.pm.PackageManager;
import android.Manifest;
import android.net.Uri;
import android.os.Bundle;
+import android.provider.Browser;
import android.util.Log;
import android.view.View;
import android.webkit.WebChromeClient;
@@ -161,6 +162,10 @@ public class HTMLViewerActivity extends Activity {
selector.addCategory(Intent.CATEGORY_BROWSABLE);
selector.setComponent(null);
}
+ // Pass the package name as application ID so that the intent from the
+ // same application can be opened in the same tab.
+ intent.putExtra(Browser.EXTRA_APPLICATION_ID,
+ view.getContext().getPackageName());
try {
view.getContext().startActivity(intent);