Bug 1352999 - Close activity if user asks to open page in full browser r=sebastian
authorJulian_Chu <walkingice0204@gmail.com>
Thu, 13 Apr 2017 18:47:23 +0800
changeset 353058 0ac4960227da322feca7798925e11286c9cce5dd
parent 353057 f709675d6a7995634356b65e1f46ccea56345e9e
child 353059 df06ac0b09a758488057f899de343dfa9354139b
push id31656
push userihsiao@mozilla.com
push dateFri, 14 Apr 2017 09:10:41 +0000
treeherdermozilla-central@cda24082bff8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1352999
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1352999 - Close activity if user asks to open page in full browser r=sebastian Once user click "Open in browser" from menu, we are going to open a tab in full browser, and close this activity. Therefore we won't have two tabs which confuse user. MozReview-Commit-ID: Co9gAdWweFX
mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
--- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
@@ -400,16 +400,17 @@ public class CustomTabsActivity extends 
     private void onOpenInClicked() {
         final Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab != null) {
             // To launch default browser with url of current tab.
             final Intent intent = new Intent();
             intent.setData(Uri.parse(tab.getURL()));
             intent.setAction(Intent.ACTION_VIEW);
             startActivity(intent);
+            finish();
         }
     }
 
     private void onActionButtonClicked() {
         PendingIntent pendingIntent = IntentUtil.getActionButtonPendingIntent(startIntent);
         performPendingIntent(pendingIntent);
     }