Merge "Apply telephony_config_json_parser for satellite accesss control" into main
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index baa5aa7..0f06fe7 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -130,7 +130,7 @@
<string name="enable_cdma_cw" msgid="811047045863422232">"अन गर्नुहोस्"</string>
<string name="disable_cdma_cw" msgid="7119290446496301734">"रद्द गर्नुहोस्"</string>
<string name="cdma_call_waiting_in_ims_on" msgid="6390979414188659218">"IMS अन्तर्गत CDMA कल प्रतीक्षाको सुविधा सक्रिय छ"</string>
- <string name="cdma_call_waiting_in_ims_off" msgid="1099246114368636334">"IMS अन्तर्गत CDMA कल प्रतीक्षाको सुविधा निष्क्रिय छ"</string>
+ <string name="cdma_call_waiting_in_ims_off" msgid="1099246114368636334">"IMS अन्तर्गत CDMA कल प्रतीक्षाको सुविधा अफ छ"</string>
<string name="updating_title" msgid="6130548922615719689">"कल सेटिङहरू"</string>
<string name="call_settings_admin_user_only" msgid="7238947387649986286">"कल सेटिङहरू केवल प्रशासकीय प्रयोगकर्ताद्वारा परिवर्तन गर्न सकिन्छ।"</string>
<string name="phone_account_settings_user_restriction" msgid="9142685151087208396">"एड्मिन वा कार्य प्रोफाइलका प्रयोगकर्ता मात्र फोनमा लिंक गरिएको खाताका सेटिङ बदल्न सक्नुहुन्छ।"</string>
@@ -771,7 +771,7 @@
<string name="clh_callFailed_interworking_unspecified_txt" msgid="7969686413930847182">"कल पूरा गर्न सकिएन। त्रुटिको कोड: १२७।"</string>
<string name="labelCallBarring" msgid="4180377113052853173">"कल ब्यारिङ"</string>
<string name="sum_call_barring_enabled" msgid="5184331188926370824">"सक्रिय छ"</string>
- <string name="sum_call_barring_disabled" msgid="5699448000600153096">"निष्क्रिय छ"</string>
+ <string name="sum_call_barring_disabled" msgid="5699448000600153096">"अफ छ"</string>
<string name="call_barring_baoc" msgid="7400892586336429326">"सबै बहिर्गमन"</string>
<string name="call_barring_baoc_enabled" msgid="3131509193386668182">"सबै बहिर्गमन कलहरूमाथिको रोक असक्षम पार्ने हो?"</string>
<string name="call_barring_baoc_disabled" msgid="8534224684091141509">"सबै बहिर्गमन कलहरूमाथि रोक लगाउने हो?"</string>
@@ -863,7 +863,7 @@
<string name="radioInfo_service_in" msgid="45753418231446400">"सेवामा"</string>
<string name="radioInfo_service_out" msgid="287972405416142312">"सेवा उपलब्ध छैन"</string>
<string name="radioInfo_service_emergency" msgid="4763879891415016848">"आपत्कालीन कल मात्र"</string>
- <string name="radioInfo_service_off" msgid="3456583511226783064">"रेडियो निष्क्रिय छ"</string>
+ <string name="radioInfo_service_off" msgid="3456583511226783064">"रेडियो अफ छ"</string>
<string name="radioInfo_roaming_in" msgid="3156335577793145965">"रोमिङ"</string>
<string name="radioInfo_roaming_not" msgid="1904547918725478110">"रोमिङमा छैन"</string>
<string name="radioInfo_phone_idle" msgid="2191653783170757819">"निष्क्रिय"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 966aa15..ecd6673 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -44,8 +44,8 @@
<string name="pause_prompt_yes" msgid="8184132073048369575">"Sim"</string>
<string name="pause_prompt_no" msgid="2145264674774138579">"Não"</string>
<string name="wild_prompt_str" msgid="5858910969703305375">"Substituir caractere curinga por"</string>
- <string name="no_vm_number" msgid="6623853880546176930">"Número correio de voz ausente"</string>
- <string name="no_vm_number_msg" msgid="5165161462411372504">"Não há um número correio de voz armazenado no chip."</string>
+ <string name="no_vm_number" msgid="6623853880546176930">"Não há um número do correio de voz"</string>
+ <string name="no_vm_number_msg" msgid="5165161462411372504">"Não há um número do correio de voz armazenado no chip."</string>
<string name="add_vm_number_str" msgid="7368168964435881637">"Adicionar número"</string>
<string name="voice_number_setting_primary_user_only" msgid="3394706575741912843">"As configurações do correio de voz só podem ser modificadas pelo usuário principal."</string>
<string name="puk_unlocked" msgid="4627340655215746511">"O seu chip foi desbloqueado. O seu telefone está desbloqueando…"</string>
@@ -157,7 +157,7 @@
<item msgid="6813323051965618926">"Ocultar número"</item>
<item msgid="9150034130629852635">"Mostrar número"</item>
</string-array>
- <string name="vm_changed" msgid="4739599044379692505">"Número correio de voz alterado."</string>
+ <string name="vm_changed" msgid="4739599044379692505">"Número do correio de voz alterado."</string>
<string name="vm_change_failed" msgid="7877733929455763566">"Não foi possível alterar o número do correio de voz.\nEntre em contato com sua operadora se o problema persistir."</string>
<string name="fw_change_failed" msgid="9179241823460192148">"Não foi possível alterar o número de encaminhamento.\nEntre em contato com sua operadora se o problema persistir."</string>
<string name="fw_get_in_vm_failed" msgid="2432678237218183844">"Não foi possível recuperar e salvar as configurações de número atual de encaminhamento.\nMudar para o novo provedor?"</string>
@@ -521,7 +521,7 @@
<string name="pin2_unblocked" msgid="4481107908727789303">"PIN2 não mais bloqueado"</string>
<string name="pin2_error_exception" msgid="8116103864600823641">"Erro de rede ou do chip"</string>
<string name="doneButton" msgid="7371209609238460207">"Concluído"</string>
- <string name="voicemail_settings_number_label" msgid="1265118640154688162">"Número correio de voz"</string>
+ <string name="voicemail_settings_number_label" msgid="1265118640154688162">"Número do correio de voz"</string>
<string name="card_title_dialing" msgid="8742182654254431781">"Chamando..."</string>
<string name="card_title_redialing" msgid="18130232613559964">"Rediscando"</string>
<string name="card_title_conf_call" msgid="901197309274457427">"Teleconferência"</string>
@@ -533,7 +533,7 @@
<string name="notification_voicemail_title" msgid="3932876181831601351">"Novo correio de voz"</string>
<string name="notification_voicemail_title_count" msgid="2806950319222327082">"Novo correio de voz (<xliff:g id="COUNT">%d</xliff:g>)"</string>
<string name="notification_voicemail_text_format" msgid="5720947141702312537">"Discar <xliff:g id="VOICEMAIL_NUMBER">%s</xliff:g>"</string>
- <string name="notification_voicemail_no_vm_number" msgid="3423686009815186750">"Número correio de voz desconhecido"</string>
+ <string name="notification_voicemail_no_vm_number" msgid="3423686009815186750">"Número do correio de voz desconhecido"</string>
<string name="notification_network_selection_title" msgid="255595526707809121">"Sem serviço"</string>
<string name="notification_network_selection_text" msgid="553288408722427659">"A rede selecionada (<xliff:g id="OPERATOR_NAME">%s</xliff:g>) não está disponível"</string>
<string name="incall_error_power_off" product="watch" msgid="7191184639454113633">"Ative a rede móvel e desative o modo avião ou o modo de economia de bateria para ligar."</string>
diff --git a/res/values/config.xml b/res/values/config.xml
index 847c4c5..03da05b 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -394,4 +394,10 @@
<!-- Whether to turn off OEM-enabled satellite during emergency call -->
<bool name="config_turn_off_oem_enabled_satellite_during_emergency_call">false</bool>
+
+ <!-- The timeout duration in milliseconds used to determine how long does it wait for modem to
+ get in-service state when dialing emergency routing emergency calls in airplane mode before
+ starting the call. If the value is 0, it doesn't wait and starts the call right after
+ turning radio power on. -->
+ <integer name="config_in_service_wait_timer_when_dialing_emergency_routing_ecc_in_apm">3000</integer>
</resources>
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index dcddf2b..bab260c 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -571,8 +571,10 @@
// Initialize EmergencyStateTracker if domain selection is supported
boolean isSuplDdsSwitchRequiredForEmergencyCall = getResources()
.getBoolean(R.bool.config_gnss_supl_requires_default_data_for_emergency);
+ int inServiceWaitTimeWhenDialEccInApm = getResources().getInteger(R.integer
+ .config_in_service_wait_timer_when_dialing_emergency_routing_ecc_in_apm);
EmergencyStateTracker.make(this, isSuplDdsSwitchRequiredForEmergencyCall,
- mFeatureFlags);
+ inServiceWaitTimeWhenDialEccInApm, mFeatureFlags);
DynamicRoutingController.getInstance().initialize(this);
}
diff --git a/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java b/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
index 9aca905..a47691e 100644
--- a/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
+++ b/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
@@ -171,6 +171,7 @@
protected static final int EVENT_COUNTRY_CODE_CHANGED = 5;
protected static final int EVENT_LOCATION_SETTINGS_ENABLED = 6;
protected static final int CMD_UPDATE_SYSTEM_SELECTION_CHANNELS = 7;
+ protected static final int EVENT_LOCATION_SETTINGS_DISABLED = 8;
public static final int DEFAULT_REGIONAL_SATELLITE_CONFIG_ID = 0;
public static final int UNKNOWN_REGIONAL_SATELLITE_CONFIG_ID = -1;
@@ -404,6 +405,9 @@
if (mLocationManager.isLocationEnabled()) {
plogd("Location settings is just enabled");
sendRequestAsync(EVENT_LOCATION_SETTINGS_ENABLED, null);
+ } else {
+ plogd("Location settings is just enabled");
+ sendRequestAsync(EVENT_LOCATION_SETTINGS_DISABLED, null);
}
}
}
@@ -483,6 +487,8 @@
mNotifySatelliteAvailabilityEnabled =
context.getResources().getBoolean(
R.bool.config_satellite_should_notify_availability);
+ initializeSatelliteSystemNotification(context);
+ registerDefaultSmsAppChangedBroadcastReceiver(context);
mInternalSatelliteSupportedStateCallback = new ISatelliteSupportedStateCallback.Stub() {
@Override
@@ -557,6 +563,7 @@
+ satelliteSubscriberProvisionStatus);
}
};
+ initializeSatelliteSystemNotification(context);
result = mSatelliteController.registerForSatelliteProvisionStateChanged(
mInternalSatelliteProvisionStateCallback);
plogd("registerForSatelliteProvisionStateChanged result: " + result);
@@ -572,14 +579,13 @@
// Init the SatelliteOnDeviceAccessController so that the S2 level can be cached
initSatelliteOnDeviceAccessController();
- initializeSatelliteSystemNotification(context);
registerLocationModeChangedBroadcastReceiver(context);
- registerDefaultSmsAppChangedBroadcastReceiver(context);
mCarrierConfigManager = context.getSystemService(CarrierConfigManager.class);
mCarrierConfigChangeListener =
- (slotIndex, subId, carrierId, specificCarrierId) ->
- handleCarrierConfigChanged(slotIndex, subId, carrierId, specificCarrierId);
+ (slotIndex, subId, carrierId, specificCarrierId) -> handleCarrierConfigChanged(
+ context, slotIndex, subId, carrierId, specificCarrierId);
+
if (mCarrierConfigManager != null) {
mCarrierConfigManager.registerCarrierConfigChangeListener(
new HandlerExecutor(new Handler(looper)), mCarrierConfigChangeListener);
@@ -639,6 +645,7 @@
updateSatelliteConfigData((Context) ar.userObj);
break;
case EVENT_LOCATION_SETTINGS_ENABLED:
+ case EVENT_LOCATION_SETTINGS_DISABLED:
// Fall through
case EVENT_COUNTRY_CODE_CHANGED:
handleSatelliteAllowedRegionPossiblyChanged(msg.what);
@@ -1256,9 +1263,9 @@
}
private void registerDefaultSmsAppChangedBroadcastReceiver(Context context) {
- if (!mFeatureFlags.oemEnabledSatelliteFlag()) {
+ if (!mFeatureFlags.carrierRoamingNbIotNtn()) {
plogd("registerDefaultSmsAppChangedBroadcastReceiver: Flag "
- + "oemEnabledSatellite is disabled");
+ + "carrierRoamingNbIotNtn is disabled");
return;
}
IntentFilter intentFilter = new IntentFilter();
@@ -1428,12 +1435,17 @@
logd("mSatelliteDisallowedReasons:"
+ String.join(", ", mSatelliteDisallowedReasons.toString()));
notifySatelliteDisallowedReasonsChanged();
- if (mNotifySatelliteAvailabilityEnabled) {
+ if (mFeatureFlags.carrierRoamingNbIotNtn() && mNotifySatelliteAvailabilityEnabled) {
showSatelliteSystemNotification();
}
}
private void showSatelliteSystemNotification() {
+ if (mNotificationManager == null) {
+ logd("showSatelliteSystemNotification: NotificationManager is null");
+ return;
+ }
+
if (mSatelliteDisallowedReasons.isEmpty()) {
if (!hasAlreadyNotified(KEY_AVAILABLE_NOTIFICATION_SHOWN, 0)) {
mNotificationManager.notifyAsUser(
@@ -1546,6 +1558,10 @@
);
notificationChannel.setSound(null, null);
mNotificationManager = context.getSystemService(NotificationManager.class);
+ if(mNotificationManager == null) {
+ ploge("initializeSatelliteSystemNotification: notificationManager is null");
+ return;
+ }
mNotificationManager.createNotificationChannel(notificationChannel);
createAvailableNotifications(context);
@@ -1617,42 +1633,52 @@
public void onReceive(Context context, Intent intent) {
if (intent.getAction()
.equals(Intent.ACTION_PACKAGE_CHANGED)) {
- boolean isDefaultMsgAppSupported = false;
- ComponentName componentName =
- SmsApplication.getDefaultSmsApplicationAsUser(
- context, true, context.getUser());
- logd("Current default SMS app:" + componentName);
- if (componentName != null) {
- String packageName = componentName.getPackageName();
- List<String> supportedMsgApps =
- mSatelliteController.getSatelliteSupportedMsgApps(
- mSatelliteController.getSelectedSatelliteSubId());
- if (supportedMsgApps.contains(packageName)) {
- isDefaultMsgAppSupported = true;
- }
- } else {
- logd("No default SMS app");
- }
-
- if (isDefaultMsgAppSupported) {
- if (mSatelliteDisallowedReasons.contains(Integer.valueOf(
- SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP))) {
- mSatelliteDisallowedReasons.remove(Integer.valueOf(
- SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP));
- handleEventDisallowedReasonsChanged();
- }
- } else {
- if (!mSatelliteDisallowedReasons.contains(Integer.valueOf(
- SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP))) {
- mSatelliteDisallowedReasons.add(Integer.valueOf(
- SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP));
- handleEventDisallowedReasonsChanged();
- }
- }
+ evaluatePossibleChangeInDefaultSmsApp(context);
}
}
};
+ private void evaluatePossibleChangeInDefaultSmsApp(@NonNull Context context) {
+ if (!mFeatureFlags.carrierRoamingNbIotNtn()) {
+ plogd("evaluatePossibleChangeInDefaultSmsApp: Flag "
+ + "carrierRoamingNbIotNtn is disabled");
+ return;
+ }
+
+ boolean isDefaultMsgAppSupported = false;
+ ComponentName componentName = SmsApplication.getDefaultSmsApplicationAsUser(
+ context, true, context.getUser());
+ plogd("Current default SMS app:" + componentName);
+ if (componentName != null) {
+ String packageName = componentName.getPackageName();
+ List<String> supportedMsgApps =
+ mSatelliteController.getSatelliteSupportedMsgApps(
+ mSatelliteController.getSelectedSatelliteSubId());
+ plogd("supportedMsgApps:" + String.join(", ", supportedMsgApps));
+ if (supportedMsgApps.contains(packageName)) {
+ isDefaultMsgAppSupported = true;
+ }
+ } else {
+ plogd("No default SMS app");
+ }
+
+ if (isDefaultMsgAppSupported) {
+ if (mSatelliteDisallowedReasons.contains(Integer.valueOf(
+ SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP))) {
+ mSatelliteDisallowedReasons.remove(Integer.valueOf(
+ SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP));
+ handleEventDisallowedReasonsChanged();
+ }
+ } else {
+ if (!mSatelliteDisallowedReasons.contains(Integer.valueOf(
+ SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP))) {
+ mSatelliteDisallowedReasons.add(Integer.valueOf(
+ SATELLITE_DISALLOWED_REASON_UNSUPPORTED_DEFAULT_MSG_APP));
+ handleEventDisallowedReasonsChanged();
+ }
+ }
+ }
+
private void handleSatelliteAllowedRegionPossiblyChanged(int handleEvent) {
if (!mFeatureFlags.oemEnabledSatelliteFlag()) {
ploge("handleSatelliteAllowedRegionPossiblyChanged: "
@@ -2569,6 +2595,8 @@
}
synchronized (mSatelliteDisallowedReasonsLock) {
+ logd("mSatelliteDisallowedReasons:"
+ + String.join(", ", mSatelliteDisallowedReasons.toString()));
return mSatelliteDisallowedReasons;
}
}
@@ -2869,13 +2897,16 @@
}
}
- private void handleCarrierConfigChanged(int slotIndex, int subId,
- int carrierId, int specificCarrierId) {
+ private void handleCarrierConfigChanged(@NonNull Context context, int slotIndex,
+ int subId, int carrierId, int specificCarrierId) {
if (!mFeatureFlags.carrierRoamingNbIotNtn()) {
plogd("handleCarrierConfigChanged: carrierRoamingNbIotNtn flag is disabled");
return;
}
+ plogd("handleCarrierConfigChanged: slotIndex=" + slotIndex + ", subId=" + subId
+ + ", carrierId=" + carrierId + ", specificCarrierId=" + specificCarrierId);
updateSatelliteRegionalConfig(subId);
+ evaluatePossibleChangeInDefaultSmsApp(context);
}
private void plogv(@NonNull String log) {