Closed Bug 721760 Opened 13 years ago Closed 12 years ago

Android Sync is taking me to "Battery & data manager" on a variety of Motorola devices

Categories

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

ARM
Android
defect

Tracking

(firefox14+ wontfix, firefox15+ verified, firefox16 verified, firefox17 verified)

VERIFIED FIXED
mozilla16
Tracking Status
firefox14 + wontfix
firefox15 + verified
firefox16 --- verified
firefox17 --- verified

People

(Reporter: andreea.pod, Assigned: rnewman)

References

()

Details

(Whiteboard: [qa+])

Attachments

(8 files, 3 obsolete files)

Attached file log
Mozilla /5.0 (Android;Linux armv7l;rv:11.0a2) Gecko/20120126 Firefox/11.0a2 Fennec/11.0a2 Device: Motorola Droid2 (Android 2.3) Steps to reproduce: 1. set up Firefox sync 2. After sync tap on "Settings" button or access Firefox sync again Expected result: Firefox sync should take you to Accounts & sync in Android settings Actual result: Firefox sync takes me to Battery & data manager.
Looks like Motorola does something funny with the settings activity. Into Chenxia's queue!
Assignee: nobody → liuche
Priority: -- → P3
This is related to Sync's activity/task stack handling, causing to problems such as 1) multiples of the same activity existing in the Activity stack, causing confusing "back" button usage, and 2) existing instances of activities are brought to the top of the stack as is (as opposed to loading the desired subActivity screen in that instance). Battery Manager screen is probably loading because Settings had it open in the background, and clicking "Settings" in Sync brought that forward without reloading the screen. Fixes: Intent flags on launching these activities, and possibly manifest changes regarding how the Sync Task is handled.
tracking-fennec: --- → ?
Summary: Android Sync is taking me to "Battery & data manager" on Motorola Droid2 → Android Sync is taking me to "Battery & data manager" on a variety of Motorola devices
So that we have the info in one place, I'm also experiencing this on Android 2.3.6 on a Motorola Atrix (MB860).
On nightly builds, I can't repro and think it might have been fixed along with Bug 738676, which fixed the way Settings was launched. Can QA try to repro on some Motorola devices with nightly builds containing the fix for bug 738676?
Keywords: qawanted
Tested with an inbound on mozilla-central from this central and was able to still reproduce this on the Motorola Droid Pro (Android 2.3.4). I used the steps: i) install and launch Nightly, ii) set-up Sync iii) tapped Settings; and was brought to the 'Battery & Data Manager' in MotoBlur.
(In reply to Aaron Train [:aaronmt] from comment #6) > Tested with an inbound on mozilla-central from this central I meant a build from today.
Still an issue on Nightly 15.0a1 2012-05-20 using a Motorola Droid Pro running Android 2.3.4.
Keywords: qawanted
This also happens on the Droid X running Android 2.3.3 with today's release of Firefox 14.0 Very confusing new user experience with sync
Nominating for .N otherwise 15?
blocking-fennec1.0: --- → ?
Aaron, can you upload a log with this repro? I don't see any mention of launching Settings in the current log, and it would really help to see one to figure out if the wrong intent is being launched. You may have to set 'adb shell setprop log.tag.FxSync VERBOSE'.
Comment on attachment 637122 [details] Raw log (Nightly 06.27) This is on tapping the 'Sync' menu item in Nightly's settings. This is 100% reproducible on the Motorola Droid Pro (Android 2.3.3)
tracking-fennec: ? → 14+
blocking-fennec1.0: ? → .N+
Blocking => P1.
Status: NEW → ASSIGNED
Priority: P3 → P1
Chenxia - any status on this?
This appears to be a Motorola Blur (Motorola's custom UI) problem; the intent is resolving to the DataManager, instead of accounts and settings: Starting: Intent { act=android.settings.SYNC_SETTINGS cmp=com.motorola.blur.datamanager.app/.DataManagerAppPreferenceActivity } Another instance, with workaround: http://community.developer.motorola.com/t5/Android-App-Development-for/intent-android-settings-SYNC-SETTINGS-starts-Datamanager/m-p/12610/highlight/true#M2553 The workaround of importing the Motorola Blur package in order to launch the accounts and settings through Motorola Blur is the correct approach. Since I am not sure about the security flags set, and don't have a Motorola Blur device to test, I will upload two apks for QA to test.
QA: apks at http://people.mozilla.org/~liuche/bug-721760/ fennec-1.apk has more restricted permissions (Context.CONTEXT_INCLUDE_CODE) fennec-2.apk with relaxed permissions (Context.CONTEXT_IGNORE_SECURITY)
Hi Chenxia, Both posted APK's have been tested on my Motorola Droid Pro (2.3), and both still have the same issue reported. fennec-1.apk :: http://pastebin.mozilla.org/1690943 fennec-2.apk :: http://pastebin.mozilla.org/1690944
It looks like the Blur package name is not correct, so we are still seeing the Intent intended for default Android. Aaron, sorry for the back and forth - I don't have a device to repro with. Can you give me a log of you manually navigating to the Sync and Accounts on the Motorola, so I find the appropriate package to use? Home > Settings > Accounts & Settings > Sync account (Alternatively, this ticket should be taken by someone who has access to a Motorola Blur device. The alternative Intent needs to be added in SyncSetupActivity and SyncSuccessActivity.)
Attached file Log file
Here's the log for the manual navigation to Home > Settings > Accounts & Settings > Sync account on my Motorola Droid Pro (2.3.4)
Thanks Paul. The relevant lines seem to be the following: Accounts intent: 07-05 17:34:46.867: I/ActivityManager(1294): Starting: Intent { act=android.intent.action.VIEW typ=vnd.android.cursor.dir/vnd.service.account cmp=com.motorola.blur.setup/com.motorola.blur.settings.AccountsAndServicesPreferenceActivity } from pid 1509 ... 07-05 17:34:47.047: I/ActivityManager(1294): Displayed com.motorola.blur.setup/com.motorola.blur.settings.AccountsAndServicesPreferenceActivity: +161ms And this possibly looks looks like an account settings intent, though the component subscribedfeeds isn't familiar to me: 07-05 17:34:48.469: I/ActivityManager(1294): Starting: Intent { act=android.settings.ACCOUNT_SYNC_SETTINGS cmp=com.android.providers.subscribedfeeds/com.android.settings.AccountSyncSettings (has extras) } from pid 4851
liuche, I was able to get to the My Accounts section using the following ADB command on a droid device: adb shell am start -a android.intent.action.VIEW -n com.motorola.blur.setup/com.motorola.blur.settings.AccountsAndServicesPreferenceActivity
I just tested an inbound build with that branch, and the post-setup "Settings" button takes me to Accounts on a Moto Razr. It actually takes me to a weird "Accounts" screen that only lists mine, but it's accounts, so hey. "Sync" in the Fennec options screen takes me to "Accounts & sync settings", which is fine. My APK is here: http://people.mozilla.com/~rnewman/fennec-moto.apk Someone else give this a shot?
Wait, that's weird. The Fennec code to open settings is this: @Override protected void onClick() { // show sync setup if no accounts exist; otherwise, show account settings Account[] accounts = AccountManager.get(mContext).getAccountsByType(FENNEC_ACCOUNT_TYPE); Intent intent; if (accounts.length > 0) intent = new Intent(SYNC_SETTINGS); else intent = new Intent(mContext, SetupSyncActivity.class); mContext.startActivity(intent); which is not changed by Chenxia's code. That is... on this RAZR, I do not see the bug.
QA wanted, please. * Do you see the bug with current Nightly on a MOTO RAZR? (Mine is an "XT910".) * If so, do you get better behavior with my build (Comment 26)? * On other devices that exhibit the bug, do you get different results from the post-setup Settings button compared to tapping "Sync" in Fennec prefs? Note that there are *two* different code paths here, one in the Fennec component, and one in Android Sync. Each corresponds to a different button.
Keywords: qawanted
No Motorola RAZR in possession. Naoki? Motorola Droid Pro * "Sync" in Preferences -> ActivityManager: Starting: Intent { act=android.settings.SYNC_SETTINGS cmp=com.motorola.blur.datamanager.app/.DataManagerAppPreferenceActivity } * Post-Sync "Settings" -> ActivityManager: Starting: Intent { act=android.settings.SYNC_SETTINGS cmp=com.motorola.blur.datamanager.app/.DataManagerAppPreferenceActivity } ActivityManager: Start proc com.motorola.blur.datamanager.app for activity com.motorola.blur.datamanager.app/.DataManagerAppPreferenceActivity
Unforuntately, I do not have a Droid Razr either. I have Droid Pro, Droid 2 and Droid X.
Grabbing these, because I'm on-site and have a RAZR.
Assignee: liuche → rnewman
Tested the fennec-moto.apk build on Droid X: 1) setting up Sync for the first time worked fine (ie using the pairing and selecting the connecting went to the My Accounts section). 2) After having Sync setup, launching fennec then going to menu-> settings -> sync, it pointed me to Battery & Data Manager It looks like the code paths are different? To note, I deleted all other instances of Firefox just to be on the safe side.
(In reply to Naoki Hirata :nhirata from comment #32) > It looks like the code paths are different? See Comment 28: "Note that there are *two* different code paths here, one in the Fennec component, and one in Android Sync. Each corresponds to a different button."
Attached patch Part 1: Sync. v1Splinter Review
This is a refactored version of Chenxia's branch.
Attachment #639805 - Flags: review+
This removes some dodgy code from Fennec, including a dubious hard-coding of the Sync account type. Still waiting for build to finish, then we can see if this works.
Attachment #639812 - Flags: review?(mark.finkle)
non motorola - ICS device seems to work fine (ie no errors, correct location of Accounts & Sync ) using both code paths [ tested w/ Galaxy Nexus - ICS ] non motorola - gingerbread It went to the correct location of accounts and sync but I seemed to get this exception: 07-06 15:24:11.510: I/FxSync(22507): SyncAccounts :: No Blur package found. Launching Sync Settings normally. 07-06 15:24:11.510: I/ActivityManager(2712): Starting: Intent { act=android.settings.SYNC_SETTINGS flg=0x10000000 cmp=com.android.providers.subscribedfeeds/com.android.settings.ManageAccountsSettings } from pid 22507 07-06 15:24:11.550: W/System.err(2712): android.provider.Settings$SettingNotFoundException: roaming_auto_sync_enabled 07-06 15:24:11.550: W/System.err(2712): at android.provider.Settings$Secure.getInt(Settings.java:2578) 07-06 15:24:11.550: W/System.err(2712): at com.android.server.enterprise.RoamingPolicy.isRoamingSyncEnabled(RoamingPolicy.java:121) 07-06 15:24:11.550: W/System.err(2712): at android.app.admin.DevicePolicyManager$RoamingPolicy.isRoamingSyncEnabled(DevicePolicyManager.java:3004) 07-06 15:24:11.550: W/System.err(2712): at com.android.settings.ManageAccountsSettings.onSyncStateUpdated(ManageAccountsSettings.java:231) 07-06 15:24:11.550: W/System.err(2712): at com.android.settings.AccountPreferenceBase.onResume(AccountPreferenceBase.java:87) 07-06 15:24:11.550: W/System.err(2712): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150) 07-06 15:24:11.555: W/System.err(2712): at android.app.Activity.performResume(Activity.java:3858) 07-06 15:24:11.555: W/System.err(2712): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2114) 07-06 15:24:11.555: W/System.err(2712): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2139) 07-06 15:24:11.555: W/System.err(2712): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:961) 07-06 15:24:11.555: W/System.err(2712): at android.os.Handler.dispatchMessage(Handler.java:99) 07-06 15:24:11.555: W/System.err(2712): at android.os.Looper.loop(Looper.java:123) 07-06 15:24:11.555: W/System.err(2712): at com.android.server.ServerThread.run(SystemServer.java:724) 07-06 15:24:11.565: D/AccountSettings(2712): ManageAccountsSettings : currentSync : account = [ Firefox Sync ], authority = [ org.mozilla.fennec_rnewman.db.browser ] 07-06 15:24:11.565: D/AccountSettings(2712): ManageAccountsSettings : setSyncButtonText : no syncadapters found for [ Samsung account ] 07-06 15:24:11.565: I/AccountSettings(2712): ManageAccountsSettings : Sync button is [ Cancel sync ] !! I am unsure if that error will cause any issues. I get that from both paths. [ tested with Samsung Galaxy S II ] No errors going to sync on Droid X , running Gingerbread : however, initializing the sync seemed to have killed fennec in the background. No errors going to sync on Droid 2, running Froyo
(In reply to Naoki Hirata :nhirata from comment #37) > It went to the correct location of accounts and sync but I seemed to get > this exception: ... > android.provider.Settings$SettingNotFoundException: roaming_auto_sync_enabled > 07-06 15:24:11.550: W/System.err(2712): at > android.provider.Settings$Secure.getInt(Settings.java:2578) Yeah, that's just Android being amateurish. > No errors going to sync on Droid 2, running Froyo Yay!
Comment on attachment 639812 [details] [diff] [review] Part 2: Fennec. v1 Review of attachment 639812 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/SyncPreference.java @@ +27,5 @@ > > @Override > protected void onClick() { > + // Make sure we use the same account type as our bundled version of Sync! > + final String accountType = org.mozilla.gecko.sync.setup.Constants.ACCOUNTTYPE_SYNC; file a follow up to make this depend on @PACKAGE_NAME@
Attachment #639812 - Flags: review?(mark.finkle) → review+
Thanks, Brad. Landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/66b36a145f89 https://hg.mozilla.org/integration/mozilla-inbound/rev/2ef72ec44da3 When (if?) this goes all green and is verified on Nightly, I'll request uplift. Per-channel Sync account will be addressed by Bug 761206, in particular a chunk of code that looks something like this: https://gist.github.com/3063420
Target Milestone: --- → mozilla16
Whiteboard: [qa+]
Comment on attachment 639805 [details] [diff] [review] Part 1: Sync. v1 [Approval Request Comment] Regression caused by (bug #): Because Motorola. User impact if declined: Motorola devices will go to the wrong place. Testing completed (on m-c, etc.): QA needed. Risk to taking this patch (and alternatives if risky): Should be slim.
Attachment #639805 - Flags: approval-mozilla-release?
Attachment #639805 - Flags: approval-mozilla-beta?
Attachment #639805 - Flags: approval-mozilla-aurora?
Attachment #639812 - Flags: approval-mozilla-release?
Attachment #639812 - Flags: approval-mozilla-beta?
Attachment #639812 - Flags: approval-mozilla-aurora?
Note that this should just be a routine QA pass; a custom build was tested.
- Verified Fixed on Mozilla-Central (07/09) tested via Motorola Droid Pro (Android 2.3.3)
Status: RESOLVED → VERIFIED
Keywords: qawanted
Attached patch Part 1. sync. against m-b (obsolete) — Splinter Review
Attachment #640261 - Attachment is obsolete: true
Attachment #640263 - Attachment is obsolete: true
Comment on attachment 639805 [details] [diff] [review] Part 1: Sync. v1 [Triage Comment] Verified on m-c and looks fairly low risk, this seems like a really good fix considering the fact that we're pushing sync hard on mobile and this is a pretty critical issue for Motorola devices. Approved for Aurora 15 and Beta 14(.0.1). Please land ASAP! We're looking to go to build in a matter of hours.
Attachment #639805 - Flags: approval-mozilla-release?
Attachment #639805 - Flags: approval-mozilla-release-
Attachment #639805 - Flags: approval-mozilla-beta?
Attachment #639805 - Flags: approval-mozilla-beta+
Attachment #639805 - Flags: approval-mozilla-aurora?
Attachment #639805 - Flags: approval-mozilla-aurora+
Attachment #639812 - Flags: approval-mozilla-release?
Attachment #639812 - Flags: approval-mozilla-release-
Attachment #639812 - Flags: approval-mozilla-beta?
Attachment #639812 - Flags: approval-mozilla-beta+
Attachment #639812 - Flags: approval-mozilla-aurora?
Attachment #639812 - Flags: approval-mozilla-aurora+
Verified Fixed on 14.0 Beta 12 (Build #1) & Aurora (07/10) Tested via same device, Motorola Droid Pro (Android 2.3.3)
Depends on: 773562
Please back this bug out on mozilla-beta and mozilla-release, given bug 773562 and the impending release. It was worth a try to get this into 14.0.1.
APK built against m-b for testing at http://people.mozilla.com/~nalexander/fennec-backout-721760.apk Device tests work for me on Galaxy SII (a device completely unaffected by these tickets).
(In reply to Nick Alexander :nalexander from comment #55) > Created attachment 642127 [details] [diff] [review] > Backout 2 changsets; against m-b. > > APK built against m-b for testing at > > http://people.mozilla.com/~nalexander/fennec-backout-721760.apk > > Device tests work for me on Galaxy SII (a device completely unaffected by > these tickets). Confirming the suckage is reintroduced on my Motorola Droid Pro (2.3)
To verify the backout is working: On an unaffected device: 0. start Fennec, verify "Set Up Sync" button is shown. 1. pair device to Sync Account 2. verify Sync is working (Force Sync, etc) 3. verify "Set Up Sync" button in Fennec is not shown. 4. select Fennec > Settings > Sync, verify Sync settings are correctly shown. On an affected Motorola device: 0. start Fennec, verify "Set Up Sync" button is shown. 1. pair device to Sync Account 2. verify Sync is working (Force Sync, etc) 3. verify "Set Up Sync" button in Fennec is not shown. 4. select Fennec > Settings > Sync, verify Sync settings are *not* correctly shown. 5. verify no crashing.
Suckage: * Sync button post setup -> Battery Manager * Sync link in Fennec Prefs -> Battery Manager
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
It's not currently backed out from mozilla-beta.
(In reply to Scoobidiver from comment #60) > It's not currently backed out from mozilla-beta. Yeah, this was per lsblakk in #mobile: 15:52 lsblakk: i don't care if it gets backed out of mozilla-beta at this point The posted patch is actually against m-b, so if we need to back out that patch should do the trick.
To be honest, I'd rather just land the follow up (extra catches) on beta.
(In reply to Richard Newman [:rnewman] from comment #62) > To be honest, I'd rather just land the follow up (extra catches) on beta. I think lsblakk's IRC comment above had to do with the priority of the m-r build over the m-b landing (we're not planning to have another FF14 beta). We should land the patch that we took on m-r on m-b, to keep the FF14 changesets in line.
Yes, beta is in kind of a "dead state" for a few days right now, so landing stuff there isn't useful, no builds will be generated from its current state. 14 is on mozilla-release and 15 will be uplifted from mozilla-aurora to mozilla-beta tomorrow.
Want to throw in a reference to Bug 774233, which is the same problem but for HTC Desire devices. I will move on getting these tickets merged into 15 (m-b) tomorrow AM PST.
I have a Motorola Atrix device running Android 2.3.6 and this is affecting me on Aurora, Beta and Stable. On Nightly (17.0a1 2012-07-26) it works fine.
Can QA confirm this on HTC Desire and Motorola Atrix devices, please?
I can confirm that clicking on the Settings > Sync option in the latest Firefox Beta brings me to the Accounts menu on Motorola Atrix.
Thanks Gordon. Can we close this one out? rnewman? Anyone who cares to comment?
If it's verified fixed on every version we care about, then...
Over to QA for final verification, then.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
blocking-fennec1.0: ? → ---
Product: Mozilla Services → Android Background Services
Product: Android Background Services → Firefox for Android
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

Creator:
Created:
Updated:
Size: