diff options
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/PrimarySwitchPreference.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/PrimarySwitchPreference.java b/packages/SettingsLib/src/com/android/settingslib/PrimarySwitchPreference.java index fb06976ebfe3..3ec5ebad0de6 100644 --- a/packages/SettingsLib/src/com/android/settingslib/PrimarySwitchPreference.java +++ b/packages/SettingsLib/src/com/android/settingslib/PrimarySwitchPreference.java @@ -23,6 +23,7 @@ import android.widget.Switch; import androidx.annotation.Keep; import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import androidx.preference.PreferenceViewHolder; import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin; @@ -132,6 +133,11 @@ public class PrimarySwitchPreference extends RestrictedPreference { } } + @VisibleForTesting(otherwise = VisibleForTesting.NONE) + public boolean isSwitchEnabled() { + return mEnableSwitch; + } + /** * If admin is not null, disables the switch. * Otherwise, keep it enabled. |