[Provider Model] Preferences Settings UI change

- Change the title from “Wi-Fi preference” to “Preferences”
- Change the summary from “Wi-Fi turns back on automatically” to
“Connect to public networks”
- Remove “Turn on Wi-Fi automatically” preference
- Screenshot:
  https://screenshot.googleplex.com/Areywyb46deK9VQ
  https://screenshot.googleplex.com/6H5Z4PxA5tWXZ6S

Bug: 172788645
Test: manual test
Change-Id: Ibce21f1d740a139b407a0a9a41f2cb4c4e34776c
This commit is contained in:
Weng Su
2020-11-15 08:45:50 +00:00
parent 5816d414db
commit 6bf7b1a72f
5 changed files with 31 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ import android.content.IntentFilter;
import android.location.LocationManager;
import android.net.wifi.WifiManager;
import android.provider.Settings;
import android.util.FeatureFlagUtils;
import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
@@ -44,6 +45,7 @@ import com.android.settingslib.core.lifecycle.events.OnResume;
* {@link TogglePreferenceController} that controls whether the Wi-Fi Wakeup feature should be
* enabled.
*/
// TODO(b/167474581): Should clean up this controller when Provider Model finished.
public class WifiWakeupPreferenceController extends TogglePreferenceController implements
LifecycleObserver, OnPause, OnResume {
@@ -89,6 +91,9 @@ public class WifiWakeupPreferenceController extends TogglePreferenceController i
@Override
public int getAvailabilityStatus() {
if (FeatureFlagUtils.isEnabled(mContext, FeatureFlagUtils.SETTINGS_PROVIDER_MODEL)) {
return CONDITIONALLY_UNAVAILABLE;
}
return AVAILABLE;
}