Loading flags/misc.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,17 @@ flag { bug: "379356026" } # OWNER=jackyu TARGET=25Q2 flag { name: "phone_type_cleanup" namespace: "telephony" description: "As CDMA deprecated, there is no need to switch phone type between CDMA and GSM" bug: "379356026" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tjstuart TARGET=25Q2 flag { name: "dynamic_do_not_ask_again_text" Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +4 −0 Original line number Diff line number Diff line Loading @@ -4570,6 +4570,10 @@ public class GsmCdmaPhone extends Phone { protected void phoneObjectUpdater(int newVoiceRadioTech) { logd("phoneObjectUpdater: newVoiceRadioTech=" + newVoiceRadioTech); if (mFeatureFlags.phoneTypeCleanup()) { logd("phoneObjectUpdater: no-op as CDMA cleanup flag is set"); return; } // Check for a voice over LTE/NR replacement if (ServiceState.isPsOnlyTech(newVoiceRadioTech) Loading src/java/com/android/internal/telephony/PhoneFactory.java +10 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.telephony.TelephonyManager.HAL_SERVICE_RADIO; import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA; import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA_LTE; import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM; import static java.util.Arrays.copyOf; Loading Loading @@ -325,11 +326,17 @@ public class PhoneFactory { } private static Phone createPhone(Context context, int phoneId) { int phoneType = TelephonyManager.getPhoneType(RILConstants.PREFERRED_NETWORK_MODE); Rlog.i(LOG_TAG, "Creating Phone with type = " + phoneType + " phoneId = " + phoneId); int phoneType; if (sFeatureFlags.phoneTypeCleanup()) { phoneType = PHONE_TYPE_GSM; } else { phoneType = TelephonyManager.getPhoneType(RILConstants.PREFERRED_NETWORK_MODE); // We always use PHONE_TYPE_CDMA_LTE now. if (phoneType == PHONE_TYPE_CDMA) phoneType = PHONE_TYPE_CDMA_LTE; } Rlog.i(LOG_TAG, "Creating Phone with type = " + phoneType + " phoneId = " + phoneId); TelephonyComponentFactory injectedComponentFactory = TelephonyComponentFactory.getInstance().inject(GsmCdmaPhone.class.getName()); Loading Loading
flags/misc.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,17 @@ flag { bug: "379356026" } # OWNER=jackyu TARGET=25Q2 flag { name: "phone_type_cleanup" namespace: "telephony" description: "As CDMA deprecated, there is no need to switch phone type between CDMA and GSM" bug: "379356026" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tjstuart TARGET=25Q2 flag { name: "dynamic_do_not_ask_again_text" Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +4 −0 Original line number Diff line number Diff line Loading @@ -4570,6 +4570,10 @@ public class GsmCdmaPhone extends Phone { protected void phoneObjectUpdater(int newVoiceRadioTech) { logd("phoneObjectUpdater: newVoiceRadioTech=" + newVoiceRadioTech); if (mFeatureFlags.phoneTypeCleanup()) { logd("phoneObjectUpdater: no-op as CDMA cleanup flag is set"); return; } // Check for a voice over LTE/NR replacement if (ServiceState.isPsOnlyTech(newVoiceRadioTech) Loading
src/java/com/android/internal/telephony/PhoneFactory.java +10 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.telephony.TelephonyManager.HAL_SERVICE_RADIO; import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA; import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA_LTE; import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM; import static java.util.Arrays.copyOf; Loading Loading @@ -325,11 +326,17 @@ public class PhoneFactory { } private static Phone createPhone(Context context, int phoneId) { int phoneType = TelephonyManager.getPhoneType(RILConstants.PREFERRED_NETWORK_MODE); Rlog.i(LOG_TAG, "Creating Phone with type = " + phoneType + " phoneId = " + phoneId); int phoneType; if (sFeatureFlags.phoneTypeCleanup()) { phoneType = PHONE_TYPE_GSM; } else { phoneType = TelephonyManager.getPhoneType(RILConstants.PREFERRED_NETWORK_MODE); // We always use PHONE_TYPE_CDMA_LTE now. if (phoneType == PHONE_TYPE_CDMA) phoneType = PHONE_TYPE_CDMA_LTE; } Rlog.i(LOG_TAG, "Creating Phone with type = " + phoneType + " phoneId = " + phoneId); TelephonyComponentFactory injectedComponentFactory = TelephonyComponentFactory.getInstance().inject(GsmCdmaPhone.class.getName()); Loading