Closed Bug 1145581 Opened 7 years ago Closed 7 years ago

Show tabs when opening fennec from the Tab Queue notification

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox40 verified)

VERIFIED FIXED
Firefox 39
Tracking Status
firefox40 --- verified

People

(Reporter: mhaigh, Assigned: mhaigh)

References

Details

Attachments

(1 file)

When the user clicks the tab queue notification to open fennec, if there is more than one tab in the tab queue, start fennec with the tabs panel open to give the user a visual confirmation/reminder of the tabs they loaded.  If there's only one url queued, then just load as normal with that tab selected.
Adds to the onNewIntent method in BrowserApp to detect if the action associated with the new intent is the one we defined in the pending intent when we add a notification (bug 1129433), if so then we open the tabs.  If there's more than one tab opened then also show the tabs panel to aide the user in seeing what tabs they have just loaded.
Attachment #8581887 - Flags: review?(michael.l.comella)
Comment on attachment 8581887 [details] [diff] [review]
Show tabs when opening fennec from the Tab Queue notification

Review of attachment 8581887 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/BrowserApp.java
@@ +3389,4 @@
>  
>          final boolean isViewAction = Intent.ACTION_VIEW.equals(action);
>          final boolean isBookmarkAction = GeckoApp.ACTION_HOMESCREEN_SHORTCUT.equals(action);
> +        final boolean openTabQueueUrls = TabQueueHelper.LOAD_URLS_ACTION.equals(action);

nit: -> shouldOpenTabQueueUrls or isTabQueueAction

@@ +3416,5 @@
>          }
>  
> +        // If the user has clicked the tab queue notification then load the tabs.
> +        if(AppConstants.NIGHTLY_BUILD  && AppConstants.MOZ_ANDROID_TAB_QUEUE && mInitialized && openTabQueueUrls) {
> +            int queuedTabs = TabQueueHelper.getTabQueueLength(this);

nit: -> queuedTabCount
Attachment #8581887 - Flags: review?(michael.l.comella) → review+
https://hg.mozilla.org/mozilla-central/rev/d629b3d07fa9
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
If there are 2 links queued, tapping the notification bar will display the tab tray.
If there is only one link queued, tapping the notification bar will load that link in a new tab.

Verified fixed using:
Device: Samsung S5 (Android 4.4)
Build: Firefox for Android 40.0a1 (2015-04-29)
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.