Closed Bug 724523 Opened 12 years ago Closed 12 years ago

Phony dialog doesn't set the default to the current value

Categories

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

ARM
Android
defect

Tracking

(blocking-fennec1.0 -)

VERIFIED FIXED
Tracking Status
blocking-fennec1.0 --- -

People

(Reporter: xti, Assigned: mbrubeck)

Details

Firefox 13.0a1 (2012-02-05)
Device: HTC Desire
OS: Android 2.2

Steps to reproduce:
1. Open Fennec
2. Go to addons.mozilla.org/en-US/android/
3. Install Phony add-on
4. Tap on Menu > Phony and change the UA ("Default" option is set by default)
5. Go to http://whatsmyuseragent.com/
6. Tap on Menu > Phony and check if the set UA

Expected result:
After step 6, the set UA is the same as it was after step 4. User agent changes are visibly applied.

Actual result:
After step 6, the Phony dialog still displays "Default" option.

Note:
Everything works as expected on a XUL build and the Phony dialog is updated correctly.
I dont particularly think that add-on issues should be filed in the Fennec product. I'll CC :mbrubeck to see wether this is a product or add-on issue.
This one might be a Fennec problem. I ask xti to test in XUL and Native Fennec. The popup correctly shows the previously selected UA in XUL Fennec, but not in Native Fennec.

This could be an add-on problem or it could be a problem with the dialog system in Native Fennec.
Note: We see the UA was correctly updated in step 5. The website shows the expected UA. The dialog is just not showing it in step 6.
what did xti say?  is this a fennec bug?
This should be checked and fixed before release
Assignee: nobody → bnicholson
Priority: -- → P3
Summary: Phony add-on dialog doesn't update User Agent changes → PromptService select dialog doesn't update based on initial value
Looks like a limitation in nsIPromptService#select() (https://developer.mozilla.org/en/nsIPromptService#select%28%29). It doesn't include a parameter for which item in the list should be selected. Phony only uses nsIPromptService for native UI, which is why the problem doesn't occur in XUL.

Other than using something other than nsIPromptService, a workaround might be to make the selected UA the first element in the list.
Handing off to mbrubeck since he made Phony.
Assignee: bnicholson → mbrubeck
blocking-fennec1.0: --- → +
Status: NEW → ASSIGNED
Removing blocking because this is not a Fennec bug.
blocking-fennec1.0: + → -
Summary: PromptService select dialog doesn't update based on initial value → Phony dialog doesn't set the default to the current value
Fixed in Phony:
https://hg.mozilla.org/users/mbrubeck_mozilla.com/phony/rev/f16b57bc9106

Update submitted to AMO and awaiting review:
https://addons.mozilla.org/en-US/android/addon/phony/versions/3.2
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Verified on:
Firefox Nightly 18.0a1 (2012-09-16)
Device: HTC Desire Z
OS: Android 2.3.3
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.