Closed Bug 820868 Opened 7 years ago Closed 7 years ago

Lightweight theme previews do not work on Firefox for Android, breaking the preview/install flow

Categories

(Firefox for Android :: General, defect)

19 Branch
x86
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 20
Tracking Status
firefox19 --- verified
firefox20 --- verified

People

(Reporter: deb, Assigned: mfinkle)

References

Details

Attachments

(1 file)

The designed flow is:

1) In Fennec, go to the Android Personas section on AMO
   https://addons.mozilla.org/en-US/android/personas/?sort=up-and-coming

2) Tap on one of the Personas bars on the page

3) The Persona should be displayed on Fennec's chrome, and the page says "You're trying it on!"

4) If the user decides to install the Persona, they tap the "+ Keep it" button, or, if not, the "Cancel" button.

The problem is in step 3 -- the Persona that should be previewed isn't actually displayed on Fennec's chrome.  The Persona is only loaded when the "Keep it" button is tapped.
Assignee: nobody → sriram
Blocks: themes
Attached patch patchSplinter Review
This patch removes a check that only set themes that were downloaded locally. Previews never fully download, so the theme preview code needs to set it from an http(s):// (not file:///) URL.

Since the theme is being downloaded from AMO (really getpersonas.com for now) the patch adds a check to make sure the downloaded bitmap is valid.

The preview and installs seem to work just fine with the patch. One consequence of the patch is during a theme install. We set the theme once from a remote (http) URL, then again from a file:/// URL, after gecko installs the image locally. I did not notice any flicker on my old Nexus S, but it's something we should watch out for.
Assignee: sriram → mark.finkle
Attachment #691687 - Flags: review?(sriram)
Comment on attachment 691687 [details] [diff] [review]
patch

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

This looks good to me.
Attachment #691687 - Flags: review?(sriram) → review+
https://hg.mozilla.org/mozilla-central/rev/d468da47eef0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Depends on: 822133
I think this broke Personas entirely on mozilla-central, see bug 822133.
I guess "mBitmap != null" should be the opposite. I should be "mBitmap == null || ... ". I missed it in the review. :(
Comment on attachment 691687 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Personas.
User impact if declined: Users cannot preview a theme from the marketplace. And then they would have to install it. And realize it doesn't look good, and then remove it.
Testing completed (on m-c, etc.): 12/14
Risk to taking this patch (and alternatives if risky): Very low. But there is a regression which will get an approval request right after this.
String or UUID changes made by this patch: None.
Attachment #691687 - Flags: approval-mozilla-aurora?
Firefox 20.0a1 (2012-11-18)
Device: Galaxy Nexus
OS: Android 4.1.1

The personas (lightweight themes) can be previewed in latest Nightly. Marking bug as VERIFIED FIXED.
Status: RESOLVED → VERIFIED
(In reply to Ioana Chiorean from comment #8)
> Firefox 20.0a1 (2012-11-18)
> Device: Galaxy Nexus
> OS: Android 4.1.1
> 
> The personas (lightweight themes) can be previewed in latest Nightly.
> Marking bug as VERIFIED FIXED.

It was Firefox 20.0a1 (2012-11-19)
Attachment #691687 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Note: Please do not land this bug without bug 822133.
Firefox 19 Beta 1 (2013-01-08)
Firefox 20.0a2 (2013-01-09)
Device: Galaxy Nexus
OS:Android 4.1.

This was push in beta channel also as Firefox 19 is currently in Beta. The themes preview work now in both Firefox 19 and 20. I will the flags accordingly, Verified.
You need to log in before you can comment on or make changes to this bug.