Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 222dcd43 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Cleaned up the flag enable_modem_cipher_transparency" into main

parents e4a3ce9c 7e4c153a
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
package: "com.android.internal.telephony.flags"
container: "system"

# OWNER=cukie TARGET=24Q3
flag {
  name: "enable_modem_cipher_transparency"
  is_exported: true
  namespace: "telephony"
  description: "Guards APIs for enabling and disabling modem cipher transparency."
  bug: "283336425"
}

# OWNER=cukie TARGET=24Q3
flag {
  name: "enable_modem_cipher_transparency_unsol_events"
+0 −5
Original line number Diff line number Diff line
@@ -5443,11 +5443,6 @@ public class GsmCdmaPhone extends Phone {

    @Override
    public void handleNullCipherNotificationPreferenceChanged() {
        if (!mFeatureFlags.enableModemCipherTransparency()) {
            logi("Not handling null cipher notification preference change. Feature flag "
                    + "enable_modem_cipher_transparency disabled");
            return;
        }
        boolean prefEnabled = getNullCipherNotificationsPreferenceEnabled();

        // The notifier is tied to handling unsolicited updates from the modem, not the
+0 −26
Original line number Diff line number Diff line
@@ -2992,15 +2992,6 @@ public class GsmCdmaPhoneTest extends TelephonyTest {
        assertTrue(phoneUT.isIdentifierDisclosureTransparencySupported());
    }

    @Test
    public void testSecurityAlgorithmUpdateFlagOff() {
        when(mFeatureFlags.enableModemCipherTransparency()).thenReturn(false);

        makeNewPhoneUT();

        verify(mMockCi, never()).registerForSecurityAlgorithmUpdates(any(), anyInt(), any());
    }

    @Test
    public void testSecurityAlgorithmUpdateFlagOn() {
        when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
@@ -3091,22 +3082,8 @@ public class GsmCdmaPhoneTest extends TelephonyTest {
        verify(mNullCipherNotifier, times(1)).setSubscriptionMapping(eq(mContext), eq(0), eq(-1));
    }

    @Test
    public void testNullCipherNotification_noModemCallOnRadioAvailable_FlagOff() {
        when(mFeatureFlags.enableModemCipherTransparency()).thenReturn(false);
        GsmCdmaPhone phoneUT = makeNewPhoneUT();
        assertFalse(phoneUT.isNullCipherNotificationSupported());

        sendRadioAvailableToPhone(phoneUT);

        verify(mMockCi, never()).setSecurityAlgorithmsUpdatedEnabled(anyBoolean(),
                any(Message.class));
        assertFalse(phoneUT.isNullCipherNotificationSupported());
    }

    @Test
    public void testNullCipherNotification_unsupportedByModemOnRadioAvailable() {
        when(mFeatureFlags.enableModemCipherTransparency()).thenReturn(true);
        GsmCdmaPhone phoneUT = makeNewPhoneUT();
        assertFalse(phoneUT.isNullCipherNotificationSupported());

@@ -3120,7 +3097,6 @@ public class GsmCdmaPhoneTest extends TelephonyTest {

    @Test
    public void testNullCipherNotification_supportedByModem() {
        when(mFeatureFlags.enableModemCipherTransparency()).thenReturn(true);
        GsmCdmaPhone phoneUT = makeNewPhoneUT();
        assertFalse(phoneUT.isNullCipherNotificationSupported());

@@ -3134,7 +3110,6 @@ public class GsmCdmaPhoneTest extends TelephonyTest {

    @Test
    public void testNullCipherNotification_preferenceEnabled() {
        when(mFeatureFlags.enableModemCipherTransparency()).thenReturn(true);
        when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
        GsmCdmaPhone phoneUT = makeNewPhoneUT();

@@ -3148,7 +3123,6 @@ public class GsmCdmaPhoneTest extends TelephonyTest {

    @Test
    public void testNullCipherNotification_preferenceDisabled() {
        when(mFeatureFlags.enableModemCipherTransparency()).thenReturn(true);
        when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
        GsmCdmaPhone phoneUT = makeNewPhoneUT();