Closed Bug 1351605 Opened 8 years ago Closed 8 years ago

Custom tabs: Title becomes blank after resume

Categories

(Firefox for Android Graveyard :: General, defect, P1)

defect

Tracking

(firefox55 verified)

VERIFIED FIXED
Firefox 55
Tracking Status
firefox55 --- verified

People

(Reporter: walkingice, Assigned: walkingice)

References

Details

Attachments

(3 files)

CustomTabs will displays title in ActionBar. The title becomes blank after resume. Steps to reproduce: launch CustomTabsActivity. Click home button to back to home, and resume CustomTabsActivity.
I missed this step: enable "Don't keep activities" in Android Settings.
`getIntent()` is not reliable due to `GeckoApp.onCreate` reset intent for bug #896992. No idea whether the fix is still necessary nowadays.
actually the intent was cleared in patch for bug 899141. It was working, but we have more than one GeckoApp instance today(CustomTabs extends GeckoApp), clearing Intent cause any sub-class get problem in `getIntent()`.
I saw that title becomes blank/disappears also if the device is changing from portrait to landscape. And after the page is reloaded the URL is displayed again. Tested with Huawei Honor (Android 5.1.1).
Comment on attachment 8853331 [details] Bug 1351605 - store start-intent in activity https://reviewboard.mozilla.org/r/125428/#review129334 Yes, this is still needed. With "Don't keep activities" enabled in developer settings, try those STR: * Open link ("A") from third-party app like twitter in browser * Link "A" is opened and loaded. * Press home * (Activity gets destroyed) * Go to app switcher and select browser * (Activity gets re-created, Intents gets read again) * Another tab is opened and you have now two tabs open for link "A" * Repeat If you want to keep some data of the Intent. Maybe pull it out of the Intent, keep a reference and save/restore it via saveInstanceState etc.? Or maybe even nicer: Create a nice Object holding the values you need, implement Parcable and put this into the instance state. In your activiy you either use the restored data (if available) or the one from the intent. Does this make sense?
Attachment #8853331 - Flags: review?(s.kaspari) → review-
Comment on attachment 8853331 [details] Bug 1351605 - store start-intent in activity https://reviewboard.mozilla.org/r/125428/#review129334 I see. I will create a new patch base on your suggestion to fix this bug :-). Apart from it, in my personal opnion, `getIntent()` might return different result that could be potential problem. Apparently so far the `GeckoApp.onCreate` is too complex to me :-/
(In reply to Julian Chu [:walkingice] from comment #7) > Apart from it, in my personal opnion, `getIntent()` might return different > result that could be potential problem. Apparently so far the > `GeckoApp.onCreate` is too complex to me :-/ Yeah, we should look into cleaning this up eventually. In Focus we get along without clearing the Intent (We only use it to open a new website if we do not have a restored state) - so we should be able to do this in Fennec too.
Attachment #8853331 - Flags: review?(s.kaspari) → review+
Attachment #8855233 - Flags: review?(s.kaspari) → review+
Attachment #8855234 - Flags: review?(s.kaspari) → review+
Keywords: checkin-needed
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. hg error in cmd: hg rebase -s 1118be7c6fad -d 77ff01bb6e2a: rebasing 387348:1118be7c6fad "Bug 1351605 - store start-intent in activity r=sebastian" merging mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java rebasing 387349:6b60b8429e8f "Bug 1351605 - Get rid of color variable in activity r=sebastian" merging mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java warning: conflicts while merging mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java! (edit, then use 'hg resolve --mark') unresolved conflicts (see hg resolve, then hg rebase --continue)
rebased to nightly, thanks!
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/feccac6975ae store start-intent in activity r=sebastian https://hg.mozilla.org/integration/autoland/rev/0b86b3b9e630 Get rid of color variable in activity r=sebastian https://hg.mozilla.org/integration/autoland/rev/5fcfe069fc1d update action bar when restoring r=sebastian
Keywords: checkin-needed
Verified as fixed on latest Nightly build 55.0a1 from 2017-05-08; Devices: Honor 8 (Android 6.0) and Asus ZenPad 8(Android 6.0.1). Following steps from description and comment 5 this issue isn't reproducible when the user press home button or changes the device orientation; the title remains the same.
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.

Attachment

General

Created:
Updated:
Size: