Closed Bug 1510663 Opened 6 years ago Closed 6 years ago

Lint Warning: WifiManagerLeak

Categories

(GeckoView :: General, enhancement, P1)

enhancement

Tracking

(geckoview64 wontfix, geckoview65 wontfix, geckoview66 fixed, firefox64 wontfix, firefox65 wontfix, firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
geckoview64 --- wontfix
geckoview65 --- wontfix
geckoview66 --- fixed
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- fixed

People

(Reporter: fluffyemily, Assigned: fluffyemily)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

On versions prior to Android N (24), initializing the WifiManager via Context#getSystemService can cause a memory leak if the context is not the application context. In many cases, it's not obvious from the code where the Context is coming from (e.g. it might be a parameter to a method, or a field initialized from various method calls). It's possible that the context being passed in is the application context, but to be on the safe side, you should consider changing context.getSystemService(...) to context.getApplicationContext().getSystemService(...). Affected Class: GeckoNetworkManager
See Also: → 1501024
Assignee: nobody → etoop
On versions prior to Android N (24), initializing the WifiManager via Context#getSystemService can cause a memory leak if the context is not the application context.
Product: Firefox for Android → GeckoView
Pushed by etoop@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d02e6cc785a9 Address WifiManager Potential Leak warning. r=geckoview-reviewers,snorp
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: