Closed Bug 1210409 Opened 6 years ago Closed 6 years ago

Robocop uses APIs that have been removed in API 23 / Android 6.0

Categories

(Firefox for Android Graveyard :: Testing, defect)

All
Android
defect
Not set
normal

Tracking

(firefox44 fixed)

RESOLVED FIXED
Firefox 44
Tracking Status
firefox44 --- fixed

People

(Reporter: sebastian, Assigned: sebastian)

References

Details

Attachments

(2 files)

Build output:
https://pastebin.mozilla.org/8848058

* BaseRobocopTest uses org.apache.http
* testImportFromAndroid accesses removed methods in android.provider.Browser
I'll create a patch.

There's only one place where HttpClient is used and that's to just read the HTTP status code. I'll refactor this to use URLConnection.

For testImportFromAndroid: We had the same problem with Fennec's import. We inlined the fields that had been removed. I'll probably do the same here too.
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Comment on attachment 8668552 [details] [diff] [review]
Robocop: Use URLConnection instead of HttpClient

This patch replaces the removed HttpClient with URLConnection.

gbrown, jmaher: I guess one of you would be the best to review this, right? Bugzilla refuses to add gbrown as reviewer. :)
Flags: needinfo?(gbrown)
Attachment #8668552 - Flags: review?(jmaher)
Comment on attachment 8668554 [details] [diff] [review]
testImportFromAndroid: Inline functionality that has been in android.provider.Browser previously

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

I inlined the functionality of android.provider.Browser into the test. That's how we fixed the bookmark import in Fennec.

For reference:
* android.provider.Browser: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.1_r1/android/provider/Browser.java#Browser
* android.provider.BrowserContract: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.1_r1/android/provider/BrowserContract.java
Attachment #8668554 - Flags: review?(jmaher)
Comment on attachment 8668552 [details] [diff] [review]
Robocop: Use URLConnection instead of HttpClient

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

this looks reasonable.
Attachment #8668552 - Flags: review?(jmaher) → review+
Comment on attachment 8668554 [details] [diff] [review]
testImportFromAndroid: Inline functionality that has been in android.provider.Browser previously

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

thanks for the reference on this.  I assume this will work well for android 2.3 and 4.x?
Attachment #8668554 - Flags: review?(jmaher) → review+
(In reply to Joel Maher (:jmaher) from comment #8)
> thanks for the reference on this.  I assume this will work well for android
> 2.3 and 4.x?

Yeah. I pushed it to try with some other patches:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=93b51c8b5499

This should even work on Android 6. The ContentProvider still exists but has been replaced with a dummy implementation that always returns an empty Cursor (to avoid crashing legacy apps). Just all public fields referencing this have been removed.
(In reply to Sebastian Kaspari (:sebastian) from comment #5)
> gbrown, jmaher: I guess one of you would be the best to review this, right?
> Bugzilla refuses to add gbrown as reviewer. :)

I disabled reviews since I was mostly offline during pto.

Landed patches look great - thanks!
Flags: needinfo?(gbrown)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.