Closed Bug 1057626 Opened 10 years ago Closed 10 years ago

java.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox32 unaffected, firefox33 unaffected, firefox34+ fixed, firefox35 fixed, fennec34+)

RESOLVED FIXED
Firefox 35
Tracking Status
firefox32 --- unaffected
firefox33 --- unaffected
firefox34 + fixed
firefox35 --- fixed
fennec 34+ ---

People

(Reporter: Margaret, Assigned: tgkokk)

References

Details

Attachments

(1 file, 1 obsolete file)

I ran into this crash on a Nexus S running 2.3.6:

E/AndroidRuntime( 8502): FATAL EXCEPTION: IntentService[updater]
E/AndroidRuntime( 8502): java.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered
E/AndroidRuntime( 8502): 	at org.mozilla.gecko.updater.UpdateService.startUpdate(UpdateService.java:221)
E/AndroidRuntime( 8502): 	at org.mozilla.gecko.updater.UpdateService.onHandleIntent(UpdateService.java:125)
E/AndroidRuntime( 8502): 	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
E/AndroidRuntime( 8502): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8502): 	at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 8502): 	at android.os.HandlerThread.run(HandlerThread.java:60)

It looks like it might be a regression from bug 1052100.
Flags: needinfo?(snorp)
Summary: ava.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered → java.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered
isActiveNetworkMetered API 16 (4.1)
Attached patch 1057626-use-cm-compat.patch (obsolete) — Splinter Review
Sorry, that was me. I've attached a patch that should fix it.
Attachment #8477852 - Flags: review?(snorp)
Comment on attachment 8477852 [details] [diff] [review]
1057626-use-cm-compat.patch

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

Need the extraneous changes removed, otherwise looks fine.

::: mobile/android/base/updater/UpdateService.java
@@ +127,2 @@
>              // Use this instead for forcing a download from about:fennec
> +            startUpdate(UpdateServiceHelper.FLAG_REINSTALL);

We don't want these changes
Attachment #8477852 - Flags: review?(snorp) → review-
Sorry, was trying to find out how to test the updater.
Attachment #8478304 - Flags: review?(snorp)
Attachment #8477852 - Attachment is obsolete: true
Attachment #8478304 - Flags: review?(snorp) → review+
Flags: needinfo?(snorp)
Keywords: checkin-needed
(In reply to Theodore Kokkoris [:tgkokk] from comment #4)
> Created attachment 8478304 [details] [diff] [review]
> Use ConnectivityManagerCompat instead of ConnectivityManager
> 
> Sorry, was trying to find out how to test the updater.

No worries. The code you had there worked for that, right?
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #5)
> (In reply to Theodore Kokkoris [:tgkokk] from comment #4)
> > Created attachment 8478304 [details] [diff] [review]
> > Use ConnectivityManagerCompat instead of ConnectivityManager
> > 
> > Sorry, was trying to find out how to test the updater.
> 
> No worries. The code you had there worked for that, right?

You mean the one I deleted? Nope, apparently for some reason the update server wouldn't return any updates. I tried it manually with the URL it was returning and I received an empty <updates> element, Nightly branding and all (maybe that was the reason). I'm going to give it one more try later, I'm going to file another bug now (which was ultimately why I decided to test if I can enable the updater).
Assignee: nobody → t.kokkoris
Can we please run this through Try first? :)
Keywords: checkin-needed
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #7)
> Can we please run this through Try first? :)

There is no point as long as this builds (which I assume it does). There are no updater tests.
We'll need to uplift this to Aurora.
tracking-fennec: --- → ?
Comment on attachment 8478304 [details] [diff] [review]
Use ConnectivityManagerCompat instead of ConnectivityManager

Approval Request Comment
[Feature/regressing bug #]: Bug 1052100
[User impact if declined]: No Aurora updates for all Android devices < Jelly Bean.
[Describe test coverage new/current, TBPL]: None.
[Risks and why]: None really.
[String/UUID change made/needed]: N/A
Attachment #8478304 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/81307805adbb
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Comment on attachment 8478304 [details] [diff] [review]
Use ConnectivityManagerCompat instead of ConnectivityManager

Aurora+
Attachment #8478304 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
tracking-fennec: ? → 34+
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

Created:
Updated:
Size: