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:
@@ -29,7 +29,7 @@ import android.util.Log;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.SwitchPreference;
|
||||
import androidx.preference.TwoStatePreference;
|
||||
|
||||
import com.android.settings.network.CarrierConfigCache;
|
||||
import com.android.settings.network.MobileDataEnabledListener;
|
||||
@@ -94,7 +94,7 @@ public class VideoCallingPreferenceController extends TelephonyTogglePreferenceC
|
||||
Log.d(TAG, "Skip update under mCallState=" + mCallState);
|
||||
return;
|
||||
}
|
||||
final SwitchPreference switchPreference = (SwitchPreference) preference;
|
||||
final TwoStatePreference switchPreference = (TwoStatePreference) preference;
|
||||
final boolean videoCallEnabled = isVideoCallEnabled(mSubId);
|
||||
switchPreference.setVisible(videoCallEnabled);
|
||||
if (videoCallEnabled) {
|
||||
|
Reference in New Issue
Block a user