mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1145581 - Show tabs when opening fennec from the Tab Queue notification (r=mcomella)
This commit is contained in:
parent
5718b3455d
commit
4dcce4682a
@ -3396,6 +3396,7 @@ public class BrowserApp extends GeckoApp
|
||||
|
||||
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.
|
||||
@ -3424,6 +3425,17 @@ public class BrowserApp extends GeckoApp
|
||||
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;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class TabQueueHelper {
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user