Change Toggle UX to "Require encryption"
Changes the UX of enable/disable null ciphers to "Require encryption". The default value is off, making the default behavior equivalent to the previous version of the toggle. Test: atest NullAlgorithmsPreferenceControllerTest Test: Manual testing in cuttlefish Bug: 264540492 Change-Id: Iaa0c9c259559a205aacad9fb9af8de6b54782c8d
This commit is contained in:
@@ -142,22 +142,22 @@ public final class NullAlgorithmsPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setChecked_true() {
|
||||
public void setChecked_true_nullCiphersDisabled() {
|
||||
mController.setChecked(true);
|
||||
verify(mTelephonyManager, times(1)).setNullCipherAndIntegrityEnabled(true);
|
||||
verify(mTelephonyManager, times(1)).setNullCipherAndIntegrityEnabled(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setChecked_false() {
|
||||
public void setChecked_false_nullCiphersEnabled() {
|
||||
mController.setChecked(false);
|
||||
verify(mTelephonyManager, times(1)).setNullCipherAndIntegrityEnabled(false);
|
||||
verify(mTelephonyManager, times(1)).setNullCipherAndIntegrityEnabled(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setChecked_exceptionThrown() {
|
||||
doThrow(IllegalStateException.class).when(
|
||||
mTelephonyManager).setNullCipherAndIntegrityEnabled(true);
|
||||
assertFalse(mController.setChecked(true));
|
||||
assertFalse(mController.setChecked(false));
|
||||
verify(mTelephonyManager, times(1)).setNullCipherAndIntegrityEnabled(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user