diff options
author | Stanley Wang <stanleytfwang@google.com> | 2020-12-25 16:27:32 +0800 |
---|---|---|
committer | Stanley Wang <stanleytfwang@google.com> | 2021-01-14 22:48:31 +0800 |
commit | b87ddba6cd2dc28353cdf0f353091221741e3f4b (patch) | |
tree | 1064d17af2c007b7a6d03ac4152ba7337ba54fbf /src/com/android/settings/development/DevelopmentSwitchBarController.java | |
parent | c61c2fb1d7168f7d38c04d66941f4cef2226550e (diff) | |
download | packages_apps_Settings-b87ddba6cd2dc28353cdf0f353091221741e3f4b.tar.gz packages_apps_Settings-b87ddba6cd2dc28353cdf0f353091221741e3f4b.tar.bz2 packages_apps_Settings-b87ddba6cd2dc28353cdf0f353091221741e3f4b.zip |
Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings.
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.
Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
Diffstat (limited to 'src/com/android/settings/development/DevelopmentSwitchBarController.java')
-rw-r--r-- | src/com/android/settings/development/DevelopmentSwitchBarController.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/settings/development/DevelopmentSwitchBarController.java b/src/com/android/settings/development/DevelopmentSwitchBarController.java index 84b7f9f286..ac691ca600 100644 --- a/src/com/android/settings/development/DevelopmentSwitchBarController.java +++ b/src/com/android/settings/development/DevelopmentSwitchBarController.java @@ -19,7 +19,7 @@ package com.android.settings.development; import androidx.annotation.NonNull; import com.android.settings.Utils; -import com.android.settings.widget.SwitchBar; +import com.android.settings.widget.SettingsMainSwitchBar; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.core.lifecycle.LifecycleObserver; import com.android.settingslib.core.lifecycle.events.OnStart; @@ -28,12 +28,12 @@ import com.android.settingslib.development.DevelopmentSettingsEnabler; public class DevelopmentSwitchBarController implements LifecycleObserver, OnStart, OnStop { - private final SwitchBar mSwitchBar; + private final SettingsMainSwitchBar mSwitchBar; private final boolean mIsAvailable; private final DevelopmentSettingsDashboardFragment mSettings; public DevelopmentSwitchBarController(@NonNull DevelopmentSettingsDashboardFragment settings, - SwitchBar switchBar, boolean isAvailable, Lifecycle lifecycle) { + SettingsMainSwitchBar switchBar, boolean isAvailable, Lifecycle lifecycle) { mSwitchBar = switchBar; mIsAvailable = isAvailable && !Utils.isMonkeyRunning(); mSettings = settings; |