author | Martyn Haigh <martyn.haigh@gmail.com> |
Fri, 27 Mar 2015 11:58:30 +0000 | |
changeset 235973 | d629b3d07fa91218096d39ae3fb1a30ba6df7587 |
parent 235972 | 58b3c3a8e8a8f24ba81a0cc8135dd9b5cbc3c2c1 |
child 235974 | 676a58f4538556afb2c2d5564f7a965f94bd4820 |
push id | 28487 |
push user | ryanvm@gmail.com |
push date | Fri, 27 Mar 2015 15:15:42 +0000 |
treeherder | mozilla-central@94c247bc2480 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mcomella |
bugs | 1145581 |
milestone | 39.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
|
mobile/android/base/BrowserApp.java | file | annotate | diff | comparison | revisions | |
mobile/android/base/tabqueue/TabQueueHelper.java | file | annotate | diff | comparison | revisions |
--- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -3391,16 +3391,17 @@ public class BrowserApp extends GeckoApp * open a new tab with about:feedback when launching the app from the icon shortcut. */ @Override protected void onNewIntent(Intent intent) { String action = intent.getAction(); final boolean isViewAction = Intent.ACTION_VIEW.equals(action); final boolean isBookmarkAction = GeckoApp.ACTION_HOMESCREEN_SHORTCUT.equals(action); + final boolean isTabQueueAction = TabQueueHelper.LOAD_URLS_ACTION.equals(action); if (mInitialized && (isViewAction || isBookmarkAction)) { // Dismiss editing mode if the user is loading a URL from an external app. mBrowserToolbar.cancelEdit(); // Hide firstrun-pane if the user is loading a URL from an external app. hideFirstrunPager(); @@ -3419,16 +3420,27 @@ public class BrowserApp extends GeckoApp GeckoAppShell.sendEventToGecko(GeckoEvent.createURILoadEvent(uri)); } // Only solicit feedback when the app has been launched from the icon shortcut. if (GuestSession.NOTIFICATION_INTENT.equals(action)) { GuestSession.handleIntent(this, intent); } + // If the user has clicked the tab queue notification then load the tabs. + if(AppConstants.NIGHTLY_BUILD && AppConstants.MOZ_ANDROID_TAB_QUEUE && mInitialized && isTabQueueAction) { + int queuedTabCount = TabQueueHelper.getTabQueueLength(this); + TabQueueHelper.openQueuedUrls(this, mProfile, TabQueueHelper.FILE_NAME); + + // If there's more than one tab then also show the tabs panel. + if (queuedTabCount > 1) { + showNormalTabs(); + } + } + if (!mInitialized || !Intent.ACTION_MAIN.equals(action)) { return; } // Check to see how many times the app has been launched. final String keyName = getPackageName() + ".feedback_launch_count"; final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
--- a/mobile/android/base/tabqueue/TabQueueHelper.java +++ b/mobile/android/base/tabqueue/TabQueueHelper.java @@ -98,17 +98,17 @@ public class TabQueueHelper { final SharedPreferences prefs = GeckoSharedPrefs.forApp(context); boolean tabQueueEnabled = prefs.getBoolean(GeckoPreferences.PREFS_TAB_QUEUE, false); int tabsQueued = prefs.getInt(PREF_TAB_QUEUE_COUNT, 0); return tabQueueEnabled && tabsQueued > 0; } - private static int getTabQueueLength(final Context context) { + public static int getTabQueueLength(final Context context) { ThreadUtils.assertNotOnUiThread(); // TODO: Use profile shared prefs when bug 1147925 gets fixed. final SharedPreferences prefs = GeckoSharedPrefs.forApp(context); return prefs.getInt(PREF_TAB_QUEUE_COUNT, 0); } public static void openQueuedUrls(final Context context, final GeckoProfile profile, final String filename) {