[Settings] IMEI should be enabled regardless existance of SIM

Force IMEI fields always enabled.

Bug: 266877869
Test: auto

Change-Id: Ic164b3c171fd673cfb02d9973d4c210585198707
This commit is contained in:
Bonian Chen
2023-02-15 05:55:24 +00:00
parent 9e3cf71e8d
commit 535b518ac9
2 changed files with 15 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA;
import static android.telephony.TelephonyManager.PHONE_TYPE_GSM;
import static android.telephony.TelephonyManager.PHONE_TYPE_NONE;
import static com.android.settings.core.BasePreferenceController.AVAILABLE;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -117,6 +118,16 @@ public class ImeiInfoPreferenceControllerTest {
"imei_info2", mSecondSimPreference, phoneType2);
}
@Test
public void updatePreference_simSlotWithoutSim_shouldBeEnabled() {
mSecondController = createPreferenceController(null,
"imei_info2", mSecondSimPreference, PHONE_TYPE_NONE);
mSecondController.updatePreference(mSecondSimPreference, -1);
assertThat(mSecondSimPreference.isEnabled()).isTrue();
}
@Ignore
@Test
public void displayPreference_multiSimGsm_shouldAddSecondPreference() {