Loading OWNERS +1 −0 Original line number Diff line number Diff line amitmahajan@google.com breadley@google.com fionaxu@google.com jackyu@google.com Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +46 −1 Original line number Diff line number Diff line Loading @@ -445,7 +445,8 @@ public class GsmCdmaPhone extends Phone { CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED); filter.addAction(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED); filter.addAction(TelecomManager.ACTION_TTY_PREFERRED_MODE_CHANGED); mContext.registerReceiver(mBroadcastReceiver, filter); mContext.registerReceiver(mBroadcastReceiver, filter, android.Manifest.permission.MODIFY_PHONE_STATE, null); mCDM = new CarrierKeyDownloadManager(this); mCIM = new CarrierInfoManager(); Loading Loading @@ -2993,6 +2994,7 @@ public class GsmCdmaPhone extends Phone { updateCdmaRoamingSettingsAfterCarrierConfigChanged(b); updateNrSettingsAfterCarrierConfigChanged(b); updateVoNrSettings(b); updateSsOverCdmaSupported(b); loadAllowedNetworksFromSubscriptionDatabase(); // Obtain new radio capabilities from the modem, since some are SIM-dependent Loading Loading @@ -3305,6 +3307,10 @@ public class GsmCdmaPhone extends Phone { resetCarrierKeysForImsiEncryption(); break; } case EVENT_SET_VONR_ENABLED_DONE: logd("EVENT_SET_VONR_ENABLED_DONE is done"); break; default: super.handleMessage(msg); } Loading Loading @@ -4731,6 +4737,45 @@ public class GsmCdmaPhone extends Phone { mIsCarrierNrSupported = !ArrayUtils.isEmpty(nrAvailabilities); } private void updateVoNrSettings(PersistableBundle config) { UiccSlot slot = mUiccController.getUiccSlotForPhone(mPhoneId); // If no card is present, do nothing. if (slot == null || slot.getCardState() != IccCardStatus.CardState.CARDSTATE_PRESENT) { return; } if (config == null) { loge("didn't get the vonr_enabled_bool from the carrier config."); return; } boolean mIsVonrEnabledByCarrier = config.getBoolean(CarrierConfigManager.KEY_VONR_ENABLED_BOOL); String result = SubscriptionController.getInstance().getSubscriptionProperty( getSubId(), SubscriptionManager.NR_ADVANCED_CALLING_ENABLED); int setting = -1; if (result != null) { setting = Integer.parseInt(result); } logd("VoNR setting from telephony.db:" + setting + " ,vonr_enabled_bool:" + mIsVonrEnabledByCarrier); if (!mIsVonrEnabledByCarrier) { mCi.setVoNrEnabled(false, obtainMessage(EVENT_SET_VONR_ENABLED_DONE), null); } else if (setting == 1 || setting == -1) { mCi.setVoNrEnabled(true, obtainMessage(EVENT_SET_VONR_ENABLED_DONE), null); } else if (setting == 0) { mCi.setVoNrEnabled(false, obtainMessage(EVENT_SET_VONR_ENABLED_DONE), null); } } private void updateCdmaRoamingSettingsAfterCarrierConfigChanged(PersistableBundle config) { if (config == null) { loge("didn't get the cdma_roaming_mode changes from the carrier config."); Loading src/java/com/android/internal/telephony/IccSmsInterfaceManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -597,8 +597,8 @@ public class IccSmsInterfaceManager { String destAddr, String scAddr, String text, PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessageForNonDefaultSmsApp, int priority, boolean expectMore, int validityPeriod) { if (!mSmsPermissions.checkCallingOrSelfCanSendSms(callingPackage, callingAttributionTag, "Sending SMS message")) { if (!mSmsPermissions.checkCallingCanSendText(persistMessageForNonDefaultSmsApp, callingPackage, callingAttributionTag, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } Loading src/java/com/android/internal/telephony/NetworkTypeController.java +10 −2 Original line number Diff line number Diff line Loading @@ -944,8 +944,10 @@ public class NetworkTypeController extends StateMachine { && mNrAdvancedCapablePcoId > 0 && pcodata.pcoId == mNrAdvancedCapablePcoId ) { log("EVENT_PCO_DATA_CHANGED: Nr Advanced is allowed by PCO."); mIsNrAdvancedAllowedByPco = pcodata.contents[0] == 1; log("EVENT_PCO_DATA_CHANGED: Nr Advanced is allowed by PCO. length:" + pcodata.contents.length + ",value: " + Arrays.toString(pcodata.contents)); mIsNrAdvancedAllowedByPco = (pcodata.contents.length > 0) ? pcodata.contents[pcodata.contents.length - 1] == 1 : false; updateNrAdvancedState(); } } Loading Loading @@ -1008,6 +1010,12 @@ public class NetworkTypeController extends StateMachine { } private void updateTimers() { if ((mPhone.getCachedAllowedNetworkTypesBitmask() & TelephonyManager.NETWORK_TYPE_BITMASK_NR) == 0) { resetAllTimers(); return; } String currentState = getCurrentState().getName(); if (mIsPrimaryTimerActive && getOverrideNetworkType() == getCurrentOverrideNetworkType()) { Loading src/java/com/android/internal/telephony/Phone.java +2 −1 Original line number Diff line number Diff line Loading @@ -235,8 +235,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { protected static final int EVENT_BARRING_INFO_CHANGED = 58; protected static final int EVENT_LINK_CAPACITY_CHANGED = 59; protected static final int EVENT_RESET_CARRIER_KEY_IMSI_ENCRYPTION = 60; protected static final int EVENT_SET_VONR_ENABLED_DONE = 61; protected static final int EVENT_LAST = EVENT_RESET_CARRIER_KEY_IMSI_ENCRYPTION; protected static final int EVENT_LAST = EVENT_SET_VONR_ENABLED_DONE; // For shared prefs. private static final String GSM_ROAMING_LIST_OVERRIDE_PREFIX = "gsm_roaming_list_"; Loading Loading
OWNERS +1 −0 Original line number Diff line number Diff line amitmahajan@google.com breadley@google.com fionaxu@google.com jackyu@google.com Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +46 −1 Original line number Diff line number Diff line Loading @@ -445,7 +445,8 @@ public class GsmCdmaPhone extends Phone { CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED); filter.addAction(TelecomManager.ACTION_CURRENT_TTY_MODE_CHANGED); filter.addAction(TelecomManager.ACTION_TTY_PREFERRED_MODE_CHANGED); mContext.registerReceiver(mBroadcastReceiver, filter); mContext.registerReceiver(mBroadcastReceiver, filter, android.Manifest.permission.MODIFY_PHONE_STATE, null); mCDM = new CarrierKeyDownloadManager(this); mCIM = new CarrierInfoManager(); Loading Loading @@ -2993,6 +2994,7 @@ public class GsmCdmaPhone extends Phone { updateCdmaRoamingSettingsAfterCarrierConfigChanged(b); updateNrSettingsAfterCarrierConfigChanged(b); updateVoNrSettings(b); updateSsOverCdmaSupported(b); loadAllowedNetworksFromSubscriptionDatabase(); // Obtain new radio capabilities from the modem, since some are SIM-dependent Loading Loading @@ -3305,6 +3307,10 @@ public class GsmCdmaPhone extends Phone { resetCarrierKeysForImsiEncryption(); break; } case EVENT_SET_VONR_ENABLED_DONE: logd("EVENT_SET_VONR_ENABLED_DONE is done"); break; default: super.handleMessage(msg); } Loading Loading @@ -4731,6 +4737,45 @@ public class GsmCdmaPhone extends Phone { mIsCarrierNrSupported = !ArrayUtils.isEmpty(nrAvailabilities); } private void updateVoNrSettings(PersistableBundle config) { UiccSlot slot = mUiccController.getUiccSlotForPhone(mPhoneId); // If no card is present, do nothing. if (slot == null || slot.getCardState() != IccCardStatus.CardState.CARDSTATE_PRESENT) { return; } if (config == null) { loge("didn't get the vonr_enabled_bool from the carrier config."); return; } boolean mIsVonrEnabledByCarrier = config.getBoolean(CarrierConfigManager.KEY_VONR_ENABLED_BOOL); String result = SubscriptionController.getInstance().getSubscriptionProperty( getSubId(), SubscriptionManager.NR_ADVANCED_CALLING_ENABLED); int setting = -1; if (result != null) { setting = Integer.parseInt(result); } logd("VoNR setting from telephony.db:" + setting + " ,vonr_enabled_bool:" + mIsVonrEnabledByCarrier); if (!mIsVonrEnabledByCarrier) { mCi.setVoNrEnabled(false, obtainMessage(EVENT_SET_VONR_ENABLED_DONE), null); } else if (setting == 1 || setting == -1) { mCi.setVoNrEnabled(true, obtainMessage(EVENT_SET_VONR_ENABLED_DONE), null); } else if (setting == 0) { mCi.setVoNrEnabled(false, obtainMessage(EVENT_SET_VONR_ENABLED_DONE), null); } } private void updateCdmaRoamingSettingsAfterCarrierConfigChanged(PersistableBundle config) { if (config == null) { loge("didn't get the cdma_roaming_mode changes from the carrier config."); Loading
src/java/com/android/internal/telephony/IccSmsInterfaceManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -597,8 +597,8 @@ public class IccSmsInterfaceManager { String destAddr, String scAddr, String text, PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessageForNonDefaultSmsApp, int priority, boolean expectMore, int validityPeriod) { if (!mSmsPermissions.checkCallingOrSelfCanSendSms(callingPackage, callingAttributionTag, "Sending SMS message")) { if (!mSmsPermissions.checkCallingCanSendText(persistMessageForNonDefaultSmsApp, callingPackage, callingAttributionTag, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } Loading
src/java/com/android/internal/telephony/NetworkTypeController.java +10 −2 Original line number Diff line number Diff line Loading @@ -944,8 +944,10 @@ public class NetworkTypeController extends StateMachine { && mNrAdvancedCapablePcoId > 0 && pcodata.pcoId == mNrAdvancedCapablePcoId ) { log("EVENT_PCO_DATA_CHANGED: Nr Advanced is allowed by PCO."); mIsNrAdvancedAllowedByPco = pcodata.contents[0] == 1; log("EVENT_PCO_DATA_CHANGED: Nr Advanced is allowed by PCO. length:" + pcodata.contents.length + ",value: " + Arrays.toString(pcodata.contents)); mIsNrAdvancedAllowedByPco = (pcodata.contents.length > 0) ? pcodata.contents[pcodata.contents.length - 1] == 1 : false; updateNrAdvancedState(); } } Loading Loading @@ -1008,6 +1010,12 @@ public class NetworkTypeController extends StateMachine { } private void updateTimers() { if ((mPhone.getCachedAllowedNetworkTypesBitmask() & TelephonyManager.NETWORK_TYPE_BITMASK_NR) == 0) { resetAllTimers(); return; } String currentState = getCurrentState().getName(); if (mIsPrimaryTimerActive && getOverrideNetworkType() == getCurrentOverrideNetworkType()) { Loading
src/java/com/android/internal/telephony/Phone.java +2 −1 Original line number Diff line number Diff line Loading @@ -235,8 +235,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { protected static final int EVENT_BARRING_INFO_CHANGED = 58; protected static final int EVENT_LINK_CAPACITY_CHANGED = 59; protected static final int EVENT_RESET_CARRIER_KEY_IMSI_ENCRYPTION = 60; protected static final int EVENT_SET_VONR_ENABLED_DONE = 61; protected static final int EVENT_LAST = EVENT_RESET_CARRIER_KEY_IMSI_ENCRYPTION; protected static final int EVENT_LAST = EVENT_SET_VONR_ENABLED_DONE; // For shared prefs. private static final String GSM_ROAMING_LIST_OVERRIDE_PREFIX = "gsm_roaming_list_"; Loading