改为使用getApplicationContext获取wifiManager,避免内存泄露

The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing getSystemService to getApplicationContext().getSystemService
This commit is contained in:
Lihongda
2024-01-04 05:19:01 +08:00
parent 24b01f308b
commit 42086ffee3
9 changed files with 15 additions and 71 deletions
@@ -1,13 +0,0 @@
package fm.jiecao.jcvideoplayer_lib;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}