Fix sim pin lock preference disappear in dual sim.
If one sim hide the preference and another one show the preference, the preference always hide. The root cause is config value is wrong. It should get config with subid. Bug: 149800931 Test: make RunSettingsRoboTests ROBOTEST_FILTER=SimLockPreferenceControllerTest Change-Id: I91b551bc363b8ecb0a4b6b40e9de79c74ccd76fd
This commit is contained in:
@@ -103,7 +103,7 @@ public class SimLockPreferenceControllerTest {
|
||||
setupMockIcc();
|
||||
final PersistableBundle pb = new PersistableBundle();
|
||||
pb.putBoolean(CarrierConfigManager.KEY_HIDE_SIM_LOCK_SETTINGS_BOOL, true);
|
||||
when(mCarrierManager.getConfig()).thenReturn(pb);
|
||||
when(mCarrierManager.getConfigForSubId(anyInt())).thenReturn(pb);
|
||||
|
||||
assertThat(mController.getAvailabilityStatus())
|
||||
.isEqualTo(BasePreferenceController.DISABLED_FOR_USER);
|
||||
@@ -114,7 +114,7 @@ public class SimLockPreferenceControllerTest {
|
||||
when(mUserManager.isAdminUser()).thenReturn(true);
|
||||
setupMockIcc();
|
||||
final PersistableBundle pb = new PersistableBundle();
|
||||
when(mCarrierManager.getConfig()).thenReturn(pb);
|
||||
when(mCarrierManager.getConfigForSubId(anyInt())).thenReturn(pb);
|
||||
|
||||
assertThat(mController.getAvailabilityStatus())
|
||||
.isEqualTo(BasePreferenceController.AVAILABLE);
|
||||
|
Reference in New Issue
Block a user