Closed Bug 1501024 Opened 6 years ago Closed 6 years ago

WifiScanner should use ApplicationContext

Categories

(Firefox for Android Graveyard :: General, enhancement, P1)

All
Android
enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: JanH, Assigned: andrei.a.lazar)

References

Details

(Whiteboard: [good first bug][lang=java])

Attachments

(1 file)

Lint complains that not doing so risks a memory leak when getting the WifiManager on Android versions prior to N, and it seems that we indeed currently use the StumberService's context to launch the WifiScanner. We could fix this at https://dxr.mozilla.org/mozilla-central/rev/c291143e24019097d087f9307e59b49facaf90cb/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/WifiScanner.java#60 by calling getApplicationContext() on the context that gets passed in there.
See Also: → 1510663
Fixing a possible memory leak sounds like a good idea - tentatively calling this a P1
Priority: -- → P1
Assignee: nobody → andrei.a.lazar
Fixed lint warning regarding memory leak inside WifiManager constructor.
Keywords: checkin-needed
Pushed by nerli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f37c64ae423 WifiScanner should use ApplicationContext r=JanH
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Keywords: checkin-needed
I modified the initial patch so I've added the 2nd check-in needed as a follow-up.
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c85e2fe3af3b WifiScanner should use ApplicationContext r=JanH
Keywords: checkin-needed
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: