Closed Bug 1501024 Opened 10 months ago Closed 9 months ago
Scanner should use Application Context
47 bytes, text/x-phabricator-request
|Details | Review|
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.
Fixing a possible memory leak sounds like a good idea - tentatively calling this a P1
Priority: -- → P1
Fixed lint warning regarding memory leak inside WifiManager constructor.
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/6f37c64ae423 WifiScanner should use ApplicationContext r=JanH
I modified the initial patch so I've added the 2nd check-in needed as a follow-up.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/c85e2fe3af3b WifiScanner should use ApplicationContext r=JanH
You need to log in before you can comment on or make changes to this bug.