mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Merge branch 'wifi-manager-memory-leak' into 'master'
Use application context to get WifiManager See merge request !535
This commit is contained in:
@@ -146,7 +146,7 @@ public class BriarReportPrimer implements ReportPrimer {
|
||||
NetworkInfo wifi = cm.getNetworkInfo(TYPE_WIFI);
|
||||
boolean wifiAvailable = wifi != null && wifi.isAvailable();
|
||||
// Is wifi enabled?
|
||||
o = ctx.getSystemService(WIFI_SERVICE);
|
||||
o = ctx.getApplicationContext().getSystemService(WIFI_SERVICE);
|
||||
WifiManager wm = (WifiManager) o;
|
||||
boolean wifiEnabled = wm != null &&
|
||||
wm.getWifiState() == WIFI_STATE_ENABLED;
|
||||
|
||||
Reference in New Issue
Block a user