commit | a3bed92302f8a4b051fce7bff8b2724ea47af4a0 | [log] [tgz] |
---|---|---|
author | Sebastiano Barezzi <barezzisebastiano@gmail.com> | Sat Jan 29 02:08:05 2022 +0100 |
committer | Sebastiano Barezzi <barezzisebastiano@gmail.com> | Sun Jan 30 00:29:18 2022 +0100 |
tree | 61fe496c024c58982442fa33b78f83dc3278252b | |
parent | fb4dfb48cbb9e936ca863486402464421f79ec66 [diff] |
ProfileManagerService: Don't kill the entire system if WifiManager is null Change-Id: I53ceed998c19e956df75dcffe08449714172c8be
diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java b/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java index 09e4fc4..2d3fd4d 100644 --- a/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java +++ b/lineage/lib/main/java/org/lineageos/platform/internal/ProfileTriggerHelper.java
@@ -189,10 +189,10 @@ } private String getActiveSSID() { - WifiInfo wifiinfo = mWifiManager.getConnectionInfo(); - if (wifiinfo == null) { - return null; + if (mWifiManager != null) { + WifiInfo wifiinfo = mWifiManager.getConnectionInfo(); + return wifiinfo != null ? removeDoubleQuotes(wifiinfo.getSSID()) : null; } - return removeDoubleQuotes(wifiinfo.getSSID()); + return null; } }