Merge "Removed the flag enable_modem_cipher_transparency_unsol_events" into main

This commit is contained in:
Jack Yu
2025-02-10 00:47:42 -08:00
committed by Android (Google) Code Review
6 changed files with 1 additions and 93 deletions

View File

@@ -35,7 +35,6 @@ import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import com.android.internal.telephony.flags.Flags;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.network.telephony.CellularSecuritySettingsFragment;
@@ -71,8 +70,7 @@ public class CellularSecurityPreferenceController extends BasePreferenceControll
@Override
public int getAvailabilityStatus() {
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY)
|| !Flags.enableModemCipherTransparencyUnsolEvents()) {
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
return UNSUPPORTED_ON_DEVICE;
}
if (mTelephonyManager == null) {

View File

@@ -26,7 +26,6 @@ import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import com.android.internal.telephony.flags.Flags;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.network.SubscriptionUtil;
@@ -60,9 +59,6 @@ public class CellularSecurityNotificationsDividerController extends
@Override
public int getAvailabilityStatus() {
if (!Flags.enableModemCipherTransparencyUnsolEvents()) {
return UNSUPPORTED_ON_DEVICE;
}
if (!isSafetyCenterSupported()) {
return UNSUPPORTED_ON_DEVICE;
}

View File

@@ -26,7 +26,6 @@ import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import com.android.internal.telephony.flags.Flags;
import com.android.settings.network.SubscriptionUtil;
import java.util.List;
@@ -75,10 +74,6 @@ public class CellularSecurityNotificationsPreferenceController extends
return UNSUPPORTED_ON_DEVICE;
}
if (!areFlagsEnabled()) {
return UNSUPPORTED_ON_DEVICE;
}
// Check there are valid SIM cards which can be displayed to the user, otherwise this
// setting should not be shown.
List<SubscriptionInfo> availableSubs = SubscriptionUtil.getAvailableSubscriptions(mContext);
@@ -106,10 +101,6 @@ public class CellularSecurityNotificationsPreferenceController extends
*/
@Override
public boolean isChecked() {
if (!areFlagsEnabled()) {
return false;
}
try {
// Note: the default behavior for this toggle is disabled (as the underlying
// TelephonyManager APIs are disabled by default)
@@ -144,11 +135,6 @@ public class CellularSecurityNotificationsPreferenceController extends
Log.i(LOG_TAG, "Disabling cellular security notifications.");
}
// Check flag status
if (!areFlagsEnabled()) {
return false;
}
try {
setNotifications(isChecked);
} catch (Exception e) {
@@ -177,13 +163,6 @@ public class CellularSecurityNotificationsPreferenceController extends
&& mTelephonyManager.isCellularIdentifierDisclosureNotificationsEnabled();
}
private boolean areFlagsEnabled() {
if (!Flags.enableModemCipherTransparencyUnsolEvents()) {
return false;
}
return true;
}
protected boolean isSafetyCenterSupported() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
return false;