"Import from Android" crashes on Android M preview 2

RESOLVED FIXED in Firefox 41

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: sebastian, Assigned: sebastian)

Tracking

(Blocks 1 bug)

40 Branch
Firefox 42
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox41 fixed, firefox42 fixed, fennec41+)

Details

Attachments

(1 attachment)

STR on a phone running Android M preview 2:
* Go to Settings -> Customize
* Select "Import from Android"
* Import Bookmarks and History

From the log:
java.lang.SecurityException: Permission Denial: opening provider com.android.browser.provider.BrowserProviderProxy from ProcessRecord{9b5ea73 31158:org.mozilla.firefox_beta/u0a96} (pid=31158, uid=10096) requires com.android.browser.permission.READ_HISTORY_BOOKMARKS or com.android.browser.permission.WRITE_HISTORY_BOOKMARKS

See also bug 1183069: "Multiple fields and methods in android.provider.Browser removed"
tracking-fennec: --- → ?
Looking at a dump of the available permissions on Android M Preview 2[1] it looks like the READ_HISTORY_BOOKMARKS permission has been removed.

This matches the observation from bug 1183069 where all public fields referencing the content provider have been removed from the SDK (android.provider.Browser).

It seems like our only option is to remove/hide that option on Android M+.

[1]: https://gist.github.com/pocmo/a47e93254ecac0d26695
tracking-fennec: ? → 41+
Some more interesting bits:

Roughly 4 months ago the content provider has been moved into it's on app/project:
https://android.googlesource.com/platform/packages/providers/BookmarkProvider/

Now in Preview 2 the content provider seems still to be there (and responds with the error in bug 1183559 comment #1) but the permission definitions are not in the BookmarkProvider project and nowhere else in the system image. So if you actually define the permission in Fennec then suddenly it works (Funny): <permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" android:protectionLevel="normal" />

I'm not sure if the missing permission is an error in the preview 2 build or if the content provider will get removed because all public fields have been removed from android.provider.Browser in the M SDK: bug 1183069
tracking-fennec: 41+ → ?
Assuming the change of the tracking was not intentional.

File a bug the Android project or Chrome about this?
tracking-fennec: ? → 41+
(In reply to Kevin Brosnan [:kbrosnan] from comment #3)
> Assuming the change of the tracking was not intentional.

Woops, sorry.

(In reply to Kevin Brosnan [:kbrosnan] from comment #3)
> File a bug the Android project or Chrome about this?

Yep, going to do that!
Assignee: nobody → s.kaspari
The problem with disabling this feature for Android M is that all version codes are really final:

Build.VERSION.CODENAME = MNC
Build.VERSION.SDK_INT = 22 (That's actually  LOLLIPOP_MR1)
Build.VERSION.RELEASE = M

It might be a pretty safe bet that the final version will have API Level 23 but this check won't work with the preview images.

The best thing we can do is probably to offer this feature only for SDK_INT < 23 and RELEASE != 'M' (to catch preview & final images).
Bug 1183559 - Hide "Import from Android" feature on devices running Android M+. r=rnewman

This patch assumes that Android M is going to be API level 23 (very likely) and additionally
checks for Android M Preview builds (Build.VERSION.RELEASE set to "M").
Attachment #8638507 - Flags: review?(rnewman)
(In reply to Sebastian Kaspari (:sebastian) from comment #6)
> Created attachment 8638507 [details]
> MozReview Request: Bug 1183559 - Hide "Import from Android" feature on
> devices running Android M+. r=rnewman

Additionally I'd file a follow-up bug to revise AppConstants after the final system image has been released:
* Rename Versions.preM to actually release name
* Verify that M is API level 23
* Perhaps remove Build.VERSION.RELEASE check
Status: NEW → ASSIGNED
Comment on attachment 8638507 [details]
MozReview Request: Bug 1183559 - Hide "Import from Android" feature on devices running Android M+. r=rnewman

https://reviewboard.mozilla.org/r/14105/#review12651

Ship It!
Attachment #8638507 - Flags: review?(rnewman) → review+
See Also: → 1187382
url:        https://hg.mozilla.org/integration/fx-team/rev/8dc478cc30c9f076eb66cca349e8c2a24d367c2c
changeset:  8dc478cc30c9f076eb66cca349e8c2a24d367c2c
user:       Sebastian Kaspari <s.kaspari@gmail.com>
date:       Fri Jul 24 14:04:30 2015 +0200
description:
Bug 1183559 - Hide "Import from Android" feature on devices running Android M+. r=rnewman

This patch assumes that Android M is going to be API level 23 (very likely) and additionally
checks for Android M Preview builds (Build.VERSION.RELEASE set to "M").
https://hg.mozilla.org/mozilla-central/rev/8dc478cc30c9
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Comment on attachment 8638507 [details]
MozReview Request: Bug 1183559 - Hide "Import from Android" feature on devices running Android M+. r=rnewman

Approval Request Comment
[Feature/regressing bug #]: Bug 1183559
[User impact if declined]: Feature for importing bookmarks from other browsers is crashing on devices running Android M (preview).
[Describe test coverage new/current, TreeHerder]: Tested on Nexus 5 with Android M Preview 2 image flashed. Patch has been in Nightly for a week.
[Risks and why]: Low risk. Feature has been disabled on Android M+ because it's no longer supported by the platform.
[String/UUID change made/needed]: -
Attachment #8638507 - Flags: approval-mozilla-beta?
Attachment #8638507 - Flags: approval-mozilla-aurora?
Comment on attachment 8638507 [details]
MozReview Request: Bug 1183559 - Hide "Import from Android" feature on devices running Android M+. r=rnewman

This is too late for 40 (and does not seems to be a big deal). However, taking it for 41.
Attachment #8638507 - Flags: approval-mozilla-beta?
Attachment #8638507 - Flags: approval-mozilla-beta-
Attachment #8638507 - Flags: approval-mozilla-aurora?
Attachment #8638507 - Flags: approval-mozilla-aurora+
Flags: needinfo?(s.kaspari)
Feature is hidden in latest Aurora using device running Android M Preview 2.
Flags: needinfo?(s.kaspari)
FYI support team importing bookmarks will no longer be a Firefox feature due to Android OS changes as part of Android M (5.2 or 6.0). It will still function on older versions of Android.
Flags: needinfo?(rtanglao)
Flags: needinfo?(rmcguigan)
thanks :kbrosnan, needinfoing joni to update our articles in the ff41 or 42 cycle (row 86 in our SUMO KB Article spreadsheet)
Flags: needinfo?(jsavage)
Flags: needinfo?(rmcguigan)
Thanks for the need info. We don't have any articles on how to import bookmarks on Firefox for Android. I'll chat with Roland about whether or not we'll need to document it for the older versions.
Flags: needinfo?(jsavage)
Oh, right. I've edited that article to conditionally show that section for people on older versions only. Thanks.
Flags: needinfo?(jsavage)

Updated

4 years ago
Depends on: 1221532

Updated

4 years ago
Blocks: 1232971
You need to log in before you can comment on or make changes to this bug.