Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference. Using TwoStatePreference in Java will helps migration in the future. Bug: 306771414 Test: manual - check Settings pages Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
This commit is contained in:
@@ -26,7 +26,7 @@ import android.provider.Settings;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.SwitchPreference;
|
||||
import androidx.preference.TwoStatePreference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
@@ -62,7 +62,7 @@ public class DisableAnimationsPreferenceController extends TogglePreferenceContr
|
||||
};
|
||||
|
||||
private final ContentResolver mContentResolver;
|
||||
private SwitchPreference mPreference;
|
||||
private TwoStatePreference mPreference;
|
||||
|
||||
public DisableAnimationsPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
|
||||
Reference in New Issue
Block a user