Last Comment Bug 774233 - The "Settings" button is not responsive when setting up Sync from "Accounts & Sync" settings on HTC Desire
: The "Settings" button is not responsive when setting up Sync from "Accounts &...
Status: VERIFIED FIXED
[qa+]
:
Product: Android Background Services
Classification: Client Software
Component: Android Sync (show other bugs)
: unspecified
: ARM Android
: P1 normal
: mozilla17
Assigned To: Nick Alexander :nalexander
:
Mentors:
Depends on: 773562
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-16 05:17 PDT by Adrian Tamas (:AdrianT)
Modified: 2013-04-04 13:48 PDT (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
-
wontfix
+
verified
fixed
fixed
15+


Attachments
logs (158.75 KB, text/plain)
2012-07-16 05:17 PDT, Adrian Tamas (:AdrianT)
no flags Details
Patch against m-b (7.43 KB, patch)
2012-07-20 12:37 PDT, Nick Alexander :nalexander
rnewman: review+
Details | Diff | Splinter Review
Logcat from beta build on HTC EVO 3D (8.96 KB, text/plain)
2012-07-20 13:38 PDT, Xiao Meng Wei :xwei
no flags Details
Logcat from beta build on HTC Desire HD (7.19 KB, text/plain)
2012-07-20 13:39 PDT, Xiao Meng Wei :xwei
no flags Details
Patch against m-a and m-b (5.37 KB, patch)
2012-07-23 13:49 PDT, Nick Alexander :nalexander
rnewman: review+
Details | Diff | Splinter Review
Patch against m-a and m-b (5.37 KB, patch)
2012-07-23 14:02 PDT, Nick Alexander :nalexander
akeybl: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Adrian Tamas (:AdrianT) 2012-07-16 05:17:39 PDT
Created attachment 642539 [details]
logs

Firefox Mobile Native 14.0.1 build 2
Device: HTC Desire (Android 2.2)

Steps to reproduce:
1. Open Settings and go to Accounts&Sync.
2. Choose to add a new Firefox sync account.
3. Setup the sync account.
4. Tap the "Settings" button to return to go to the account details.

Expected results:
The user is redirected to the Accounts&Sync.

Actual results:
Nothing happens.

Notes:
Please see the attached log. The first part of the log is the account setup from Accounts&Sync and the second is from Firefox mobile where the Settings button works.
The issue could not be reproduced on HTC Desire Z (Android 2.3.3)
Comment 1 Aaron Train [:aaronmt] 2012-07-16 11:24:39 PDT
I'm unable to reproduce this on the HTC Nexus One (2.3.4), Galaxy SII (4.0.4), or Galaxy Nexus (4.1.1).

HTC Desire is blocked on Google Play so I'm not too concerned.
Comment 2 Aaron Train [:aaronmt] 2012-07-16 11:25:36 PDT
Also this needs confirmation if this is reproducible, if it's a regression, and what builds it affects.
Comment 3 Nick Alexander :nalexander 2012-07-16 11:35:44 PDT
07-16 15:01:37.405: I/ActivityManager(105): Starting activity: Intent { act=android.settings.SYNC_SETTINGS flg=0x10080000 cmp=com.htc.settings.accountsync/.ManageAccountsSettings }

Happens about 20 times.  I'm really loving these vendors that override Accounts and Sync settings.
Comment 4 Mike Connor [:mconnor] 2012-07-16 12:22:57 PDT
So this is another instance of the MotoBlur bug, with a different alternate intent than that case?
Comment 5 Richard Newman [:rnewman] 2012-07-16 12:25:57 PDT
(In reply to Mike Connor [:mconnor] from comment #4)
> So this is another instance of the MotoBlur bug, with a different alternate
> intent than that case?

Yes.

Doesn't apply to all HTC Sense devices.
Comment 6 Xiao Meng Wei :xwei 2012-07-16 12:57:14 PDT
This is reproducable on HTC Desire HD and HTC EVO 3D, using today's nightly (20120716).
Comment 7 Xiao Meng Wei :xwei 2012-07-16 13:23:01 PDT
Another note: this bug will not appear during initial setup of sync accounts. However, it will occur if we remove the old sync account and re-adding it.
Comment 8 Xiao Meng Wei :xwei 2012-07-16 14:00:21 PDT
This appear to be happening starting fennec 14 beta 2.
Comment 9 Aaron Train [:aaronmt] 2012-07-16 14:01:53 PDT
I dont understand how this was unearthed now though, that's the weird thing. Anyways, thanks for looking Eric.
Comment 10 Alex Keybl [:akeybl] 2012-07-16 14:02:47 PDT
(In reply to Xiao Meng Wei :xwei from comment #8)
> This appear to be happening starting fennec 14 beta 2.

Thanks xwei.

Given that it's not a regression from 14.0, we'll prioritize to fix in 15.0. Wontfixing for 14.0.1.
Comment 11 Nick Alexander :nalexander 2012-07-20 11:29:26 PDT
See also Bug 721760.
Comment 12 Nick Alexander :nalexander 2012-07-20 11:32:11 PDT
Could QA test

adb shell am start -a android.intent.action.VIEW -n com.htc.settings.accountsync/com.htc.settings.accountsync.ManageAccountsSettings

and

adb shell am start -a android.intent.action.VIEW -n com.htc.settings.accountsync/.ManageAccountsSettings

from the command line?
Comment 13 Xiao Meng Wei :xwei 2012-07-20 11:39:38 PDT
(In reply to Nick Alexander :nalexander from comment #12)
> Could QA test
> 
> adb shell am start -a android.intent.action.VIEW -n
> com.htc.settings.accountsync/com.htc.settings.accountsync.
> ManageAccountsSettings
> 
> and
> 
> adb shell am start -a android.intent.action.VIEW -n
> com.htc.settings.accountsync/.ManageAccountsSettings
> 
> from the command line?

They all brought up the same page, which is the account settings management page.
Comment 14 Nick Alexander :nalexander 2012-07-20 12:23:09 PDT
http://people.mozilla.com/~nalexander/fennec-beta-htc.apk
Comment 15 Nick Alexander :nalexander 2012-07-20 12:37:05 PDT
Created attachment 644423 [details] [diff] [review]
Patch against m-b

This generalizes the fix from Bug 721760, fixes that bug, adds the error checking that prevents Bug 773562, and fixes this bug.
Comment 16 Nick Alexander :nalexander 2012-07-20 12:38:18 PDT
QA, we're going to need to test this functionality against:

* HTC phones that are affected
* HTC phones that are not affected
* Moto Blur phones that are affected
* Moto Blur phones that are not affected

I have tested this against my Samsung Galaxy SII, which is not affected.
Comment 17 Aaron Train [:aaronmt] 2012-07-20 12:52:12 PDT
(In reply to Nick Alexander :nalexander from comment #16)
> * Moto Blur phones that are affected

Motorola Droid Pro (Android 2.3.4 with Moto Blur) -- No issues.

> * HTC phones that are not affected

HTC Nexus One (Android 2.3.4) -- No issues.
Comment 18 Xiao Meng Wei :xwei 2012-07-20 13:38:39 PDT
Created attachment 644448 [details]
Logcat from beta build on HTC EVO 3D
Comment 19 Xiao Meng Wei :xwei 2012-07-20 13:39:04 PDT
Created attachment 644449 [details]
Logcat from beta build on HTC Desire HD
Comment 20 Xiao Meng Wei :xwei 2012-07-20 13:40:21 PDT
This is still happening on the beta build on Desire HD and EVO 3D. I've attached logcats for constantly tapping on the settings button after sync setup.
Comment 21 Nick Alexander :nalexander 2012-07-20 13:56:09 PDT
Hi xwei,

Sorry to put you through this.  Can you try

http://people.mozilla.com/~nalexander/fennec-beta-htc-no-task-flag.apk

and see if that helps.
Comment 22 Nick Alexander :nalexander 2012-07-20 14:02:51 PDT
I'd also like some additional testing of the earlier apk (http://people.mozilla.com/~nalexander/fennec-beta-htc.apk).

Given that you say (https://bugzilla.mozilla.org/show_bug.cgi?id=774233#c7) that this only happens the second time round, I'd like to test scenario that load the settings page.  My guess is that somehow bringing the task to the front isn't working, and the second APK removes a flag that makes the activity start in a new task, which may change things.

Can you reboot the phone, navigate to Accounts & Settings *before* adding a first account, and then see if the button works?  If that makes the first run break -- then we know it's an HTC problem to do with loading, and we can try to find ways to work around that.

Also, can you add the first account, delete, re-add, verify failure, and then reboot and navigate to Account Settings from within Fennec?  If that works, then we know the HTC settings Activity can be started from anywhere, but only once the way we're doing it.

Thanks!
Comment 23 Xiao Meng Wei :xwei 2012-07-20 14:17:13 PDT
http://people.mozilla.com/~nalexander/fennec-beta-htc-no-task-flag.apk
This build has resolved this issue, as I could not reproduce this bug on this build on Desire HD or EVO 3D.
Comment 24 Nick Alexander :nalexander 2012-07-23 10:56:33 PDT
Just to update release drivers: I am moving on this and the related bugs.  This bug suggests that there are potential issues with Android Sync's task/activity management, which I am trying to get the bottom of.
Comment 25 Nick Alexander :nalexander 2012-07-23 13:34:22 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/b5f2b664e57a
Comment 26 Richard Newman [:rnewman] 2012-07-23 13:39:27 PDT
Nick: there's an m-b patch on this bug, and also the fix you've just landed. Could you prep the patch that you want to land on 15 and set flags/obsolete accordingly?
Comment 27 Nick Alexander :nalexander 2012-07-23 13:49:13 PDT
Created attachment 645054 [details] [diff] [review]
Patch against m-a and m-b

[Approval Request Comment]
Bug caused by (feature/regressing bug #):

This is not a regression: it's really a new bug.

User impact if declined:

Opening Sync Settings will work only the first time on some HTC devices.

Testing completed (on m-c, etc.):

QA has tested custom m-b builds with this.

Risk to taking this patch (and alternatives if risky):

Low risk.  It is possible that changing our Android stack management for this task is incorrect, but liuche and nalexander have discussed and tested several devices and we think this is the correct fix.

String or UUID changes made by this patch:

None.
Comment 28 Nick Alexander :nalexander 2012-07-23 13:50:33 PDT
(In reply to Nick Alexander :nalexander from comment #27)
> Created attachment 645054 [details] [diff] [review]
> Patch against m-a and m-b

On m-b, this patch depends on the patch for Bug 773562 landing first.  (That Bug is already in place on m-a.)
Comment 29 Richard Newman [:rnewman] 2012-07-23 13:58:00 PDT
Comment on attachment 645054 [details] [diff] [review]
Patch against m-a and m-b

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

Rubberstamp.

Go on, capitalize "do" :)
Comment 30 Nick Alexander :nalexander 2012-07-23 14:02:18 PDT
Created attachment 645058 [details] [diff] [review]
Patch against m-a and m-b

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): 
String or UUID changes made by this patch:

As above.
Comment 31 Nick Alexander :nalexander 2012-07-23 17:58:11 PDT
akeybl: ping on approvals, now that Bug 773562 has landed on beta?
Comment 32 Ed Morley [:emorley] 2012-07-24 02:59:45 PDT
https://hg.mozilla.org/mozilla-central/rev/b5f2b664e57a
Comment 34 Aaron Train [:aaronmt] 2012-07-24 11:58:41 PDT
Looks like this is fixed across the board, we'll verify with the next beta build
Comment 35 Adrian Tamas (:AdrianT) 2012-07-24 23:52:21 PDT
Issue is no longer reproducible on Firefox Mobile 15.0b2 on the HTC Desire running Android 2.2

Note You need to log in before you can comment on or make changes to this bug.