Settings: Use new API for wifi wakeup feature toggle

Bug: 148514485
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Test: Verified wifi wakeup feature toggle in wifi settings.
Change-Id: I1e7c0b3ca053a9b7d6105cad16362df38517b51e
This commit is contained in:
Roshan Pius
2020-02-07 09:21:24 -08:00
parent c1313b41a5
commit 65291297a9
6 changed files with 33 additions and 23 deletions

View File

@@ -851,8 +851,7 @@ public class WifiSettings2 extends RestrictedSettingsFragment
final Context context = getContext();
final PowerManager powerManager = context.getSystemService(PowerManager.class);
final ContentResolver contentResolver = context.getContentResolver();
return Settings.Global.getInt(contentResolver,
Settings.Global.WIFI_WAKEUP_ENABLED, 0) == 1
return mWifiManager.isAutoWakeupEnabled()
&& Settings.Global.getInt(contentResolver,
Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1
&& Settings.Global.getInt(contentResolver,