Closed Bug 1501024 Opened 10 months ago Closed 9 months ago

WifiScanner should use ApplicationContext

Categories

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

All
Android
enhancement

Tracking

()

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
https://hg.mozilla.org/mozilla-central/rev/6f37c64ae423
Status: NEW → RESOLVED
Closed: 9 months 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
You need to log in before you can comment on or make changes to this bug.