Skip to content

Fix memory leak on android#122

Open
Maikell84 wants to merge 1 commit intohoerresb:masterfrom
adnotam:fix_memory_leak_issue
Open

Fix memory leak on android#122
Maikell84 wants to merge 1 commit intohoerresb:masterfrom
adnotam:fix_memory_leak_issue

Conversation

@Maikell84
Copy link
Copy Markdown

Gradle linter gives a warning:

:lintVitalRelease/home/michael/Projects/smart-mirror/application/platforms/android/src/com/pylonproducts/wifiwizard/WifiWizard.java:57: Error: The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing cordova.getActivity() to cordova.getActivity().getApplicationContext() [WifiManagerLeak]
this.wifiManager = (WifiManager) cordova.getActivity().getSystemService(Context.WIFI_SERVICE);

This PR resolves it.

@tripflex
Copy link
Copy Markdown

tripflex commented Jan 5, 2018

Thanks for this, I created a fork of WifiWizard (named WifiWizard2), and added this PR to it, along with credit for you in the changelog:
https://github.com/tripflex/WifiWizard2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants