Removed the flag enable_modem_cipher_transparency_unsol_events
Removed the 24Q3 flag enable_modem_cipher_transparency_unsol_events
Bug: 283336425
Test: atest FrameworksTelephonyTests
Test: Basic telephony functionality tests
Flag: EXEMPT flag cleanup
Change-Id: I0371d66857be77d95a4428673f881c223f332f4c
diff --git a/flags/network.aconfig b/flags/network.aconfig
index 13409d4..a2398ad 100644
--- a/flags/network.aconfig
+++ b/flags/network.aconfig
@@ -1,14 +1,6 @@
package: "com.android.internal.telephony.flags"
container: "system"
-# OWNER=cukie TARGET=24Q3
-flag {
- name: "enable_modem_cipher_transparency_unsol_events"
- namespace: "telephony"
- description: "Allows the framework to register for SecurityAlgorithmChanged events and emit notifications to the user when a device is using null ciphers."
- bug: "283336425"
-}
-
# OWNER=songferngwang TARGET=24Q3
flag {
name: "hide_prefer_3g_item"
diff --git a/src/java/com/android/internal/telephony/GsmCdmaPhone.java b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
index 100ef06..0a25d2d 100644
--- a/src/java/com/android/internal/telephony/GsmCdmaPhone.java
+++ b/src/java/com/android/internal/telephony/GsmCdmaPhone.java
@@ -538,10 +538,8 @@
mCi.registerForImeiMappingChanged(this, EVENT_IMEI_MAPPING_CHANGED, null);
- if (mFeatureFlags.enableModemCipherTransparencyUnsolEvents()) {
- mSafetySource =
- mTelephonyComponentFactory.makeCellularNetworkSecuritySafetySource(mContext);
- }
+ mSafetySource = mTelephonyComponentFactory
+ .makeCellularNetworkSecuritySafetySource(mContext);
logi(
"enable_identifier_disclosure_transparency_unsol_events is on. Registering for "
@@ -554,18 +552,16 @@
mCi.registerForCellularIdentifierDisclosures(
this, EVENT_CELL_IDENTIFIER_DISCLOSURE, null);
- if (mFeatureFlags.enableModemCipherTransparencyUnsolEvents()) {
- logi(
- "enable_modem_cipher_transparency_unsol_events is on. Registering for security "
- + "algorithm updates from phone "
- + getPhoneId());
- mNullCipherNotifier =
- mTelephonyComponentFactory
- .inject(NullCipherNotifier.class.getName())
- .makeNullCipherNotifier(mSafetySource);
- mCi.registerForSecurityAlgorithmUpdates(
- this, EVENT_SECURITY_ALGORITHM_UPDATE, null);
- }
+ logi(
+ "enable_modem_cipher_transparency_unsol_events is on. Registering for security "
+ + "algorithm updates from phone "
+ + getPhoneId());
+ mNullCipherNotifier =
+ mTelephonyComponentFactory
+ .inject(NullCipherNotifier.class.getName())
+ .makeNullCipherNotifier(mSafetySource);
+ mCi.registerForSecurityAlgorithmUpdates(
+ this, EVENT_SECURITY_ALGORITHM_UPDATE, null);
initializeCarrierApps();
}
@@ -3794,8 +3790,7 @@
ar = (AsyncResult) msg.obj;
SecurityAlgorithmUpdate update = (SecurityAlgorithmUpdate) ar.result;
- if (mFeatureFlags.enableModemCipherTransparencyUnsolEvents()
- && mNullCipherNotifier != null) {
+ if (mNullCipherNotifier != null) {
mNullCipherNotifier.onSecurityAlgorithmUpdate(mContext, getPhoneId(),
getSubId(), update);
}
@@ -5447,16 +5442,10 @@
// The notifier is tied to handling unsolicited updates from the modem, not the
// enable/disable API.
- if (mFeatureFlags.enableModemCipherTransparencyUnsolEvents()) {
- if (prefEnabled) {
- mNullCipherNotifier.enable(mContext);
- } else {
- mNullCipherNotifier.disable(mContext);
- }
+ if (prefEnabled) {
+ mNullCipherNotifier.enable(mContext);
} else {
- logi(
- "Not toggling enable state for cipher notifier. Feature flag "
- + "enable_modem_cipher_transparency_unsol_events is disabled.");
+ mNullCipherNotifier.disable(mContext);
}
mCi.setSecurityAlgorithmsUpdatedEnabled(prefEnabled,
@@ -5468,10 +5457,6 @@
*/
@VisibleForTesting
public void updateNullCipherNotifier() {
- if (!mFeatureFlags.enableModemCipherTransparencyUnsolEvents()) {
- return;
- }
-
SubscriptionInfoInternal subInfo = mSubscriptionManagerService
.getSubscriptionInfoInternal(getSubId());
boolean active = false;
@@ -5499,9 +5484,7 @@
@Override
public void refreshSafetySources(String refreshBroadcastId) {
- if (mFeatureFlags.enableModemCipherTransparencyUnsolEvents()) {
- post(() -> mSafetySource.refresh(mContext, refreshBroadcastId));
- }
+ post(() -> mSafetySource.refresh(mContext, refreshBroadcastId));
}
/**
diff --git a/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java b/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java
index fe0644f..6fb3083 100644
--- a/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java
+++ b/tests/telephonytests/src/com/android/internal/telephony/GsmCdmaPhoneTest.java
@@ -2994,8 +2994,6 @@
@Test
public void testSecurityAlgorithmUpdateFlagOn() {
- when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
-
Phone phoneUT = makeNewPhoneUT();
verify(mMockCi, times(1))
@@ -3007,7 +3005,6 @@
@Test
public void testSecurityAlgorithm_updateAddedToNotifier() {
- when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
Phone phoneUT = makeNewPhoneUT();
SecurityAlgorithmUpdate update =
new SecurityAlgorithmUpdate(
@@ -3027,22 +3024,7 @@
}
@Test
- public void testUpdateNullCipherNotifier_flagDisabled() {
- when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(false);
- Phone phoneUT = makeNewPhoneUT();
- phoneUT.sendMessage(
- mPhoneUT.obtainMessage(
- Phone.EVENT_SUBSCRIPTIONS_CHANGED,
- new AsyncResult(null, null, null)));
- processAllMessages();
-
- verify(mNullCipherNotifier, never()).setSubscriptionMapping(any(), anyInt(), anyInt());
- }
-
- @Test
public void testUpdateNullCipherNotifier_activeSubscription() {
- when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
-
int subId = 10;
SubscriptionInfoInternal subInfo = new SubscriptionInfoInternal.Builder().setSimSlotIndex(
0).setId(subId).build();
@@ -3063,7 +3045,6 @@
@Test
public void testUpdateNullCipherNotifier_inactiveSubscription() {
- when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
int subId = 1;
SubscriptionInfoInternal subInfo = new SubscriptionInfoInternal.Builder().setSimSlotIndex(
-1).setId(subId).build();
@@ -3110,7 +3091,6 @@
@Test
public void testNullCipherNotification_preferenceEnabled() {
- when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
GsmCdmaPhone phoneUT = makeNewPhoneUT();
setNullCipherNotificationPreferenceEnabled(true);
@@ -3123,7 +3103,7 @@
@Test
public void testNullCipherNotification_preferenceDisabled() {
- when(mFeatureFlags.enableModemCipherTransparencyUnsolEvents()).thenReturn(true);
+ Mockito.reset(mNullCipherNotifier);
GsmCdmaPhone phoneUT = makeNewPhoneUT();
setNullCipherNotificationPreferenceEnabled(false);