Don't check Wifi SSID when home wifi list is empty (#3025)

This commit is contained in:
Daniel Shokouhi 2022-11-03 09:29:05 -07:00 committed by GitHub
parent 9eac506105
commit 3afc5d4d55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,9 +152,11 @@ class UrlRepositoryImpl @Inject constructor(
}
override suspend fun isHomeWifiSsid(): Boolean {
val wifiSsids = getHomeWifiSsids()
if (wifiSsids.isEmpty())
return false
val formattedSsid = wifiHelper.getWifiSsid()?.removeSurrounding("\"")
val formattedBssid = wifiHelper.getWifiBssid()
val wifiSsids = getHomeWifiSsids()
return (
formattedSsid != null &&
(Build.VERSION.SDK_INT < Build.VERSION_CODES.R || formattedSsid !== WifiManager.UNKNOWN_SSID) &&