Merge "Fix API review issues for 5G Slicing feature" into sc-dev
diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml
index 2a89260..e0cbd2c 100644
--- a/res/values-az/strings.xml
+++ b/res/values-az/strings.xml
@@ -61,7 +61,7 @@
<string name="labelGsmMore_with_label" msgid="3206015314393246224">"GSM zəng ayarları (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
<string name="labelCDMAMore" msgid="7937441382611224632">"CDMA zəng parametrləri"</string>
<string name="labelCdmaMore_with_label" msgid="7759692829160238152">"CDMA zəng ayarları (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
- <string name="apn_settings" msgid="1978652203074756623">"Çatma Nöqtəsi Adları"</string>
+ <string name="apn_settings" msgid="1978652203074756623">"Giriş nöqtəsi adları"</string>
<string name="settings_label" msgid="9101778088412567956">"Şəbəkə ayarları"</string>
<string name="phone_accounts" msgid="1216879437523774604">"Hesabların çağırılması"</string>
<string name="phone_accounts_make_calls_with" msgid="16747814788918145">"Zənglər et"</string>
@@ -182,15 +182,15 @@
<string name="connect_later" msgid="1950138106010005425">"Hazırda bu şəbəkəyə qoşulmaq olmur. Sonra təkrar sınayın."</string>
<string name="registration_done" msgid="5337407023566953292">"Şəbəkədə qeydiyyatdan keçib."</string>
<string name="already_auto" msgid="8607068290733079336">"Artıq avtomatik seçimdədir."</string>
- <string name="select_automatically" msgid="779750291257872651">"Avtomatik olaraq şəbəkə seçin"</string>
+ <string name="select_automatically" msgid="779750291257872651">"Şəbəkə avtomatik seçilsin"</string>
<string name="manual_mode_disallowed_summary" msgid="3970048592179890197">"%1$s ünvanına qoşulduqda əlçatan olmur"</string>
<string name="network_select_title" msgid="4117305053881611988">"Şəbəkə"</string>
<string name="register_automatically" msgid="3907580547590554834">"Avtomatik qeydiyyat ..."</string>
- <string name="preferred_network_mode_title" msgid="5253395265169539830">"Tərcih edilən şəbəkə növü"</string>
+ <string name="preferred_network_mode_title" msgid="5253395265169539830">"Şəbəkə növü"</string>
<string name="preferred_network_mode_summary" msgid="3787989000044330064">"Şəbəkə əməliyyat rejimini dəyişin"</string>
- <string name="preferred_network_mode_dialogtitle" msgid="2781447433514459696">"Tərcih edilən şəbəkə növü"</string>
+ <string name="preferred_network_mode_dialogtitle" msgid="2781447433514459696">"Şəbəkə növü"</string>
<string name="forbidden_network" msgid="5081729819561333023">"(qadağandır)"</string>
- <string name="choose_network_title" msgid="5335832663422653082">"Şəbəkəni seçin"</string>
+ <string name="choose_network_title" msgid="5335832663422653082">"Şəbəkə seçin"</string>
<string name="network_disconnected" msgid="8844141106841160825">"Bağlantı kəsildi"</string>
<string name="network_connected" msgid="2760235679963580224">"Qoşuldu"</string>
<string name="network_connecting" msgid="160901383582774987">"Qoşulur..."</string>
@@ -282,29 +282,29 @@
<string name="data_enable_summary" msgid="696860063456536557">"Data istifadəsinə icazə verin"</string>
<string name="dialog_alert_title" msgid="5260471806940268478">"Diqqət"</string>
<string name="roaming" msgid="1576180772877858949">"Rominq"</string>
- <string name="roaming_enable" msgid="6853685214521494819">"Rouminq zamanı data xidmətlərinə qoşulun"</string>
- <string name="roaming_disable" msgid="8856224638624592681">"Rouminq zamanı data xidmətlərinə qoşulun"</string>
+ <string name="roaming_enable" msgid="6853685214521494819">"Rominq zamanı data xidmətinə qoşulun"</string>
+ <string name="roaming_disable" msgid="8856224638624592681">"Rominq zamanı data xidmətinə qoşulun"</string>
<string name="roaming_reenable_message" msgid="1951802463885727915">"Data rominqi deaktivdir. Aktiv etmək üçün klikləyin."</string>
<string name="roaming_enabled_message" msgid="9022249120750897">"Rominq xərcləri çıxıla bilər. Dəyişmək üçün toxunun."</string>
<string name="roaming_notification_title" msgid="3590348480688047320">"Mobil data bağlantısı itdi"</string>
<string name="roaming_on_notification_title" msgid="7451473196411559173">"Data rominqi aktivdir"</string>
<string name="roaming_warning" msgid="7855681468067171971">"Sizə əhəmiyyətli xərclər tətbiq edilə bilər."</string>
<string name="roaming_check_price_warning" msgid="8212484083990570215">"Qiymətləndirmə üçün şəbəkə provayderi ilə yoxlayın."</string>
- <string name="roaming_alert_title" msgid="5689615818220960940">"Məlumat rominqinə icazə verilsin?"</string>
+ <string name="roaming_alert_title" msgid="5689615818220960940">"Data rominqə icazə verilsin?"</string>
<string name="limited_sim_function_notification_title" msgid="612715399099846281">"Məhdud SIM funksionallığı"</string>
<string name="limited_sim_function_with_phone_num_notification_message" msgid="5928988883403677610">"<xliff:g id="PHONE_NUMBER">%2$s</xliff:g> nömrəsindən istifadə edərkən <xliff:g id="CARRIER_NAME">%1$s</xliff:g> zəng və data xidmətləri bloklana bilər."</string>
<string name="limited_sim_function_notification_message" msgid="5338638075496721160">"Başqa SIM-dən istifadə edərkən <xliff:g id="CARRIER_NAME">%1$s</xliff:g> zəng və data xidmətləri bloklana bilər."</string>
<string name="sip_accounts_removed_notification_title" msgid="3528076957535736095">"Ləğv edilmiş SIP hesabları tapıldı və silindi"</string>
<string name="sip_accounts_removed_notification_message" msgid="1916856744869791592">"SIP zəngi artıq Android platforması tərəfindən dəstəklənmir.\nMövcud SIP hesablarınız <xliff:g id="REMOVED_SIP_ACCOUNTS">%s</xliff:g> silinib.\nDefolt zəng hesabı ayarınızı təsdiq edin."</string>
<string name="sip_accounts_removed_notification_action" msgid="3772778402370555562">"Ayarlara keçin"</string>
- <string name="data_usage_title" msgid="8438592133893837464">"Tətbiq data istifadəsi"</string>
+ <string name="data_usage_title" msgid="8438592133893837464">"Tətbiq trafiki"</string>
<string name="data_usage_template" msgid="6287906680674061783">"<xliff:g id="ID_2">%2$s</xliff:g> ərzində <xliff:g id="ID_1">%1$s</xliff:g> mobil data istifadə edildi"</string>
<string name="advanced_options_title" msgid="9208195294513520934">"Qabaqcıl"</string>
<string name="carrier_settings_euicc" msgid="1190237227261337749">"Mobil Operator"</string>
<string name="keywords_carrier_settings_euicc" msgid="8540160967922063745">"operator, esim, sim, euicc, operatoru dəyişin, operator əlavə edin"</string>
<string name="carrier_settings_euicc_summary" msgid="2027941166597330117">"<xliff:g id="CARRIER_NAME">%1$s</xliff:g> — <xliff:g id="PHONE_NUMBER">%2$s</xliff:g>"</string>
<string name="mobile_data_settings_title" msgid="7228249980933944101">"Mobil data"</string>
- <string name="mobile_data_settings_summary" msgid="5012570152029118471">"Mobil şəbəkədən istifadə edərək dataya daxil olun"</string>
+ <string name="mobile_data_settings_summary" msgid="5012570152029118471">"Mobil internetə giriş"</string>
<string name="data_usage_disable_mobile" msgid="5669109209055988308">"Mobil data söndürülsün?"</string>
<string name="sim_selection_required_pref" msgid="6985901872978341314">"Seçim tələb olunur"</string>
<string name="sim_change_data_title" msgid="9142726786345906606">"Data SİM-i dəyişilsin?"</string>
@@ -465,7 +465,7 @@
<string name="get_pin2" msgid="4221654606863196332">"PIN2 daxil edin"</string>
<string name="name" msgid="1347432469852527784">"Ad"</string>
<string name="number" msgid="1564053487748491000">"Nömrə"</string>
- <string name="save" msgid="983805790346099749">"Yadda saxla"</string>
+ <string name="save" msgid="983805790346099749">"Yadda saxlayın"</string>
<string name="add_fdn_contact" msgid="1169713422306640887">"Sabit yığım nömrəsi əlavə edin"</string>
<string name="adding_fdn_contact" msgid="3112531600824361259">"Sabit yığım nömrəsi əlavə olunur..."</string>
<string name="fdn_contact_added" msgid="2840016151693394596">"Sabit yığım nömrəsi əlavə edildi."</string>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index c81102b..57aec7d 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -483,9 +483,9 @@
<string name="simContacts_empty" msgid="1135632055473689521">"Nema kontakata na SIM kartici."</string>
<string name="simContacts_title" msgid="2714029230160136647">"Izbor kontakata za uvoz"</string>
<string name="simContacts_airplaneMode" msgid="4654884030631503808">"Isključite režim rada u avionu da biste uvezli kontakte sa SIM kartice."</string>
- <string name="enable_pin" msgid="967674051730845376">"Omogućavanje/onemogućavanje SIM PIN-a"</string>
- <string name="change_pin" msgid="3657869530942905790">"Promena SIM PIN-a"</string>
- <string name="enter_pin_text" msgid="3182311451978663356">"SIM PIN:"</string>
+ <string name="enable_pin" msgid="967674051730845376">"Omogućavanje/onemogućavanje PIN-a za SIM"</string>
+ <string name="change_pin" msgid="3657869530942905790">"Promena PIN-a za SIM"</string>
+ <string name="enter_pin_text" msgid="3182311451978663356">"PIN za SIM:"</string>
<string name="oldPinLabel" msgid="8618515202411987721">"Stari PIN"</string>
<string name="newPinLabel" msgid="3585899083055354732">"Novi PIN"</string>
<string name="confirmPinLabel" msgid="7783531218662473778">"Potvrdite novi PIN"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index dbfb33d..41876dc 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -182,7 +182,7 @@
<string name="connect_later" msgid="1950138106010005425">"No se puede conectar a la red en este momento. Inténtalo de nuevo más tarde."</string>
<string name="registration_done" msgid="5337407023566953292">"Conexión con la red establecida"</string>
<string name="already_auto" msgid="8607068290733079336">"Ya estás en la selección automática."</string>
- <string name="select_automatically" msgid="779750291257872651">"Seleccionar una red automáticamente"</string>
+ <string name="select_automatically" msgid="779750291257872651">"Seleccionar red automáticamente"</string>
<string name="manual_mode_disallowed_summary" msgid="3970048592179890197">"No disponible cuando se ha conectado con %1$s"</string>
<string name="network_select_title" msgid="4117305053881611988">"Red"</string>
<string name="register_automatically" msgid="3907580547590554834">"Registro automático..."</string>
@@ -308,7 +308,7 @@
<string name="data_usage_disable_mobile" msgid="5669109209055988308">"¿Quieres desactivar los datos móviles?"</string>
<string name="sim_selection_required_pref" msgid="6985901872978341314">"Debes seleccionar una opción"</string>
<string name="sim_change_data_title" msgid="9142726786345906606">"¿Cambiar la SIM de datos?"</string>
- <string name="sim_change_data_message" msgid="3567358694255933280">"¿Quieres usar la tarjeta <xliff:g id="NEW_SIM">%1$s</xliff:g> en lugar de <xliff:g id="OLD_SIM">%2$s</xliff:g> para los datos móviles?"</string>
+ <string name="sim_change_data_message" msgid="3567358694255933280">"¿Usar la tarjeta <xliff:g id="NEW_SIM">%1$s</xliff:g> en lugar de <xliff:g id="OLD_SIM">%2$s</xliff:g> para los datos móviles?"</string>
<string name="wifi_calling_settings_title" msgid="5800018845662016507">"Llamadas por Wi-Fi"</string>
<string name="video_calling_settings_title" msgid="342829454913266078">"Videollamadas a través del operador"</string>
<string name="gsm_umts_options" msgid="4968446771519376808">"Opciones GSM/UMTS"</string>
@@ -483,7 +483,7 @@
<string name="simContacts_empty" msgid="1135632055473689521">"No hay ningún contacto en la tarjeta SIM."</string>
<string name="simContacts_title" msgid="2714029230160136647">"Seleccionar contactos para importar"</string>
<string name="simContacts_airplaneMode" msgid="4654884030631503808">"Desactiva el modo avión para importar contactos de la tarjeta SIM."</string>
- <string name="enable_pin" msgid="967674051730845376">"Habilitar/inhabilitar PIN de tarjeta SIM"</string>
+ <string name="enable_pin" msgid="967674051730845376">"Habilitar/Inhabilitar PIN de tarjeta SIM"</string>
<string name="change_pin" msgid="3657869530942905790">"Cambiar PIN de tarjeta SIM"</string>
<string name="enter_pin_text" msgid="3182311451978663356">"PIN de la tarjeta SIM:"</string>
<string name="oldPinLabel" msgid="8618515202411987721">"PIN antiguo"</string>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index f0307a4..4d9cf49 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -700,7 +700,7 @@
<string name="change_pin_enter_new_pin_header" msgid="4739465616733486118">"Ezarri PIN kode berria"</string>
<string name="change_pin_enter_new_pin_hint" msgid="2326038476516364210">"<xliff:g id="MIN">%1$d</xliff:g> eta <xliff:g id="MAX">%2$d</xliff:g> digituren artean izan behar ditu PIN kodeak."</string>
<string name="change_pin_confirm_pin_header" msgid="2606303906320705726">"Berretsi PIN kodea"</string>
- <string name="change_pin_confirm_pins_dont_match" msgid="305164501222587215">"Ez datoz bat PIN kodeak"</string>
+ <string name="change_pin_confirm_pins_dont_match" msgid="305164501222587215">"PINak ez datoz bat"</string>
<string name="change_pin_succeeded" msgid="2504705600693014403">"Eguneratu da erantzungailuaren PIN kodea"</string>
<string name="change_pin_system_error" msgid="7772788809875146873">"Ezin da ezarri PIN kodea"</string>
<string name="mobile_data_status_roaming_turned_off_subtext" msgid="6840673347416227054">"Desaktibatuta daude ibiltaritzako datuak"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 877f906..10f2348 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -186,9 +186,9 @@
<string name="manual_mode_disallowed_summary" msgid="3970048592179890197">"هنگام اتصال به %1$s دردسترس نیست"</string>
<string name="network_select_title" msgid="4117305053881611988">"شبکه"</string>
<string name="register_automatically" msgid="3907580547590554834">"ثبت خودکار..."</string>
- <string name="preferred_network_mode_title" msgid="5253395265169539830">"نوع شبکه برگزیده"</string>
+ <string name="preferred_network_mode_title" msgid="5253395265169539830">"نوع شبکه ترجیحی"</string>
<string name="preferred_network_mode_summary" msgid="3787989000044330064">"تغییر حالت عملکرد شبکه"</string>
- <string name="preferred_network_mode_dialogtitle" msgid="2781447433514459696">"نوع شبکه برگزیده"</string>
+ <string name="preferred_network_mode_dialogtitle" msgid="2781447433514459696">"نوع شبکه ترجیحی"</string>
<string name="forbidden_network" msgid="5081729819561333023">"(ممنوع است)"</string>
<string name="choose_network_title" msgid="5335832663422653082">"انتخاب شبکه"</string>
<string name="network_disconnected" msgid="8844141106841160825">"قطع اتصال"</string>
@@ -231,44 +231,44 @@
<item msgid="3869566732842046032">"NR/LTE/TDSCDMA/GSM/WCDMA"</item>
<item msgid="3942770927563146543">"NR/LTE/TDSCDMA/CDMA/EvDo/GSM/WCDMA"</item>
</string-array>
- <string name="preferred_network_mode_wcdma_perf_summary" msgid="7851493369130750126">"حالت شبکه برگزیده: WCDMA برگزیده"</string>
- <string name="preferred_network_mode_gsm_only_summary" msgid="4323367929994392830">"حالت شبکه برگزیده: فقط GSM"</string>
- <string name="preferred_network_mode_wcdma_only_summary" msgid="3585482191951442207">"حالت شبکه برگزیده: فقط WCDMA"</string>
- <string name="preferred_network_mode_gsm_wcdma_summary" msgid="2988950751948316810">"حالت شبکه برگزیده: GSM / WCDMA"</string>
+ <string name="preferred_network_mode_wcdma_perf_summary" msgid="7851493369130750126">"حالت شبکه ترجیحی: WCDMA برگزیده"</string>
+ <string name="preferred_network_mode_gsm_only_summary" msgid="4323367929994392830">"حالت شبکه ترجیحی: فقط GSM"</string>
+ <string name="preferred_network_mode_wcdma_only_summary" msgid="3585482191951442207">"حالت شبکه ترجیحی: فقط WCDMA"</string>
+ <string name="preferred_network_mode_gsm_wcdma_summary" msgid="2988950751948316810">"حالت شبکه ترجیحی: GSM / WCDMA"</string>
<string name="preferred_network_mode_cdma_summary" msgid="9127141320343936911">"حالت شبکه ترجیحی: CDMA"</string>
<string name="preferred_network_mode_cdma_evdo_summary" msgid="3629440709757307077">"حالت شبکه ترجیحی: CDMA / EvDo"</string>
- <string name="preferred_network_mode_cdma_only_summary" msgid="211164451887102568">"حالت شبکه برگزیده: فقط CDMA"</string>
- <string name="preferred_network_mode_evdo_only_summary" msgid="939116631952132878">"حالت شبکه برگزیده: فقط EvDo"</string>
- <string name="preferred_network_mode_cdma_evdo_gsm_wcdma_summary" msgid="7891131456022601976">"حالت شبکه برگزیده: CDMA/EvDo/GSM/WCDMA"</string>
- <string name="preferred_network_mode_lte_summary" msgid="8050539466545797149">"حالت شبکه برگزیده: LTE"</string>
- <string name="preferred_network_mode_lte_gsm_wcdma_summary" msgid="2217794334331254936">"حالت شبکه برگزیده: GSM/WCDMA/LTE"</string>
- <string name="preferred_network_mode_lte_cdma_evdo_summary" msgid="5559198623419981805">"حالت شبکه برگزیده: CDMA+LTE/EVDO"</string>
- <string name="preferred_network_mode_lte_cdma_evdo_gsm_wcdma_summary" msgid="6707224437925495615">"حالت شبکه برگزیده: LTE/CDMA/EvDo/GSM/WCDMA"</string>
- <string name="preferred_network_mode_global_summary" msgid="3847086258439582411">"حالت شبکه برگزیده: سراسری"</string>
- <string name="preferred_network_mode_lte_wcdma_summary" msgid="7001804022020813865">"حالت شبکه برگزیده: LTE / WCDMA"</string>
- <string name="preferred_network_mode_lte_gsm_umts_summary" msgid="6484203890156282179">"حالت شبکه برگزیده: LTE / GSM / UMTS"</string>
- <string name="preferred_network_mode_lte_cdma_summary" msgid="8187929456614068518">"حالت شبکه برگزیده: LTE / CDMA"</string>
- <string name="preferred_network_mode_tdscdma_summary" msgid="3602127224234207206">"حالت شبکه برگزیده: TDSCDMA"</string>
- <string name="preferred_network_mode_tdscdma_wcdma_summary" msgid="7076968749402201123">"حالت شبکه برگزیده: TDSCDMA / WCDMA"</string>
- <string name="preferred_network_mode_lte_tdscdma_summary" msgid="3001058390866953624">"حالت شبکه برگزیده: LTE / TDSCDMA"</string>
- <string name="preferred_network_mode_tdscdma_gsm_summary" msgid="1716983444872465309">"حالت شبکه برگزیده: TDSCDMA / GSM"</string>
- <string name="preferred_network_mode_lte_tdscdma_gsm_summary" msgid="1349057007230669585">"حالت شبکه برگزیده: LTE/GSM/TDSCDMA"</string>
- <string name="preferred_network_mode_tdscdma_gsm_wcdma_summary" msgid="2092262901885164194">"حالت شبکه برگزیده: TDSCDMA/GSM/WCDMA"</string>
- <string name="preferred_network_mode_lte_tdscdma_wcdma_summary" msgid="56422129430744466">"حالت شبکه برگزیده: LTE/TDSCDMA/WCDMA"</string>
- <string name="preferred_network_mode_lte_tdscdma_gsm_wcdma_summary" msgid="2993923113350341106">"حالت شبکه برگزیده: LTE/TDSCDMA/GSM/WCDMA"</string>
- <string name="preferred_network_mode_tdscdma_cdma_evdo_gsm_wcdma_summary" msgid="2779089629254220257">"حالت شبکه برگزیده: TDSCDMA/CDMA/EvDo/GSM/WCDMA"</string>
- <string name="preferred_network_mode_lte_tdscdma_cdma_evdo_gsm_wcdma_summary" msgid="9065672185435798587">"حالت شبکه برگزیده: LTE/TDSCDMA/CDMA/EvDo/GSM/WCDMA"</string>
- <string name="preferred_network_mode_nr_only_summary" msgid="1467452233297987391">"حالت شبکه برگزیده: فقط NR"</string>
- <string name="preferred_network_mode_nr_lte_summary" msgid="5890170406507535976">"حالت شبکه برگزیده: NR / LTE"</string>
- <string name="preferred_network_mode_nr_lte_cdma_evdo_summary" msgid="5507940227264296616">"حالت شبکه برگزیده: NR/LTE/CDMA/EvDo"</string>
- <string name="preferred_network_mode_nr_lte_gsm_wcdma_summary" msgid="2811179121638665248">"حالت شبکه برگزیده: NR/LTE/GSM/WCDMA"</string>
- <string name="preferred_network_mode_nr_lte_cdma_evdo_gsm_wcdma_summary" msgid="7631365223836621902">"حالت شبکه برگزیده: NR/LTE/CDMA/EvDo/GSM/WCDMA"</string>
- <string name="preferred_network_mode_nr_lte_wcdma_summary" msgid="8696016062943591864">"حالت شبکه برگزیده: NR/LTE/WCDMA"</string>
- <string name="preferred_network_mode_nr_lte_tdscdma_summary" msgid="1236182344680726751">"حالت شبکه برگزیده: NR/LTE/TDSCDMA"</string>
- <string name="preferred_network_mode_nr_lte_tdscdma_gsm_summary" msgid="8384454155773415993">"حالت شبکه برگزیده: NR/LTE/TDSCDMA/GSM"</string>
- <string name="preferred_network_mode_nr_lte_tdscdma_wcdma_summary" msgid="5912457779733343522">"حالت شبکه برگزیده: NR/LTE/TDSCDMA/WCDMA"</string>
- <string name="preferred_network_mode_nr_lte_tdscdma_gsm_wcdma_summary" msgid="6769797110309412576">"حالت شبکه برگزیده: NR/LTE/TDSCDMA/GSM/WCDMA"</string>
- <string name="preferred_network_mode_nr_lte_tdscdma_cdma_evdo_gsm_wcdma_summary" msgid="4260661428277578573">"حالت شبکه برگزیده: NR/LTE/TDSCDMA/CDMA/EvDo/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_cdma_only_summary" msgid="211164451887102568">"حالت شبکه ترجیحی: فقط CDMA"</string>
+ <string name="preferred_network_mode_evdo_only_summary" msgid="939116631952132878">"حالت شبکه ترجیحی: فقط EvDo"</string>
+ <string name="preferred_network_mode_cdma_evdo_gsm_wcdma_summary" msgid="7891131456022601976">"حالت شبکه ترجیحی: CDMA/EvDo/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_lte_summary" msgid="8050539466545797149">"حالت شبکه ترجیحی: LTE"</string>
+ <string name="preferred_network_mode_lte_gsm_wcdma_summary" msgid="2217794334331254936">"حالت شبکه ترجیحی: GSM/WCDMA/LTE"</string>
+ <string name="preferred_network_mode_lte_cdma_evdo_summary" msgid="5559198623419981805">"حالت شبکه ترجیحی: CDMA+LTE/EVDO"</string>
+ <string name="preferred_network_mode_lte_cdma_evdo_gsm_wcdma_summary" msgid="6707224437925495615">"حالت شبکه ترجیحی: LTE/CDMA/EvDo/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_global_summary" msgid="3847086258439582411">"حالت شبکه ترجیحی: سراسری"</string>
+ <string name="preferred_network_mode_lte_wcdma_summary" msgid="7001804022020813865">"حالت شبکه ترجیحی: LTE / WCDMA"</string>
+ <string name="preferred_network_mode_lte_gsm_umts_summary" msgid="6484203890156282179">"حالت شبکه ترجیحی: LTE / GSM / UMTS"</string>
+ <string name="preferred_network_mode_lte_cdma_summary" msgid="8187929456614068518">"حالت شبکه ترجیحی: LTE / CDMA"</string>
+ <string name="preferred_network_mode_tdscdma_summary" msgid="3602127224234207206">"حالت شبکه ترجیحی: TDSCDMA"</string>
+ <string name="preferred_network_mode_tdscdma_wcdma_summary" msgid="7076968749402201123">"حالت شبکه ترجیحی: TDSCDMA / WCDMA"</string>
+ <string name="preferred_network_mode_lte_tdscdma_summary" msgid="3001058390866953624">"حالت شبکه ترجیحی: LTE / TDSCDMA"</string>
+ <string name="preferred_network_mode_tdscdma_gsm_summary" msgid="1716983444872465309">"حالت شبکه ترجیحی: TDSCDMA / GSM"</string>
+ <string name="preferred_network_mode_lte_tdscdma_gsm_summary" msgid="1349057007230669585">"حالت شبکه ترجیحی: LTE/GSM/TDSCDMA"</string>
+ <string name="preferred_network_mode_tdscdma_gsm_wcdma_summary" msgid="2092262901885164194">"حالت شبکه ترجیحی: TDSCDMA/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_lte_tdscdma_wcdma_summary" msgid="56422129430744466">"حالت شبکه ترجیحی: LTE/TDSCDMA/WCDMA"</string>
+ <string name="preferred_network_mode_lte_tdscdma_gsm_wcdma_summary" msgid="2993923113350341106">"حالت شبکه ترجیحی: LTE/TDSCDMA/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_tdscdma_cdma_evdo_gsm_wcdma_summary" msgid="2779089629254220257">"حالت شبکه ترجیحی: TDSCDMA/CDMA/EvDo/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_lte_tdscdma_cdma_evdo_gsm_wcdma_summary" msgid="9065672185435798587">"حالت شبکه ترجیحی: LTE/TDSCDMA/CDMA/EvDo/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_nr_only_summary" msgid="1467452233297987391">"حالت شبکه ترجیحی: فقط NR"</string>
+ <string name="preferred_network_mode_nr_lte_summary" msgid="5890170406507535976">"حالت شبکه ترجیحی: NR / LTE"</string>
+ <string name="preferred_network_mode_nr_lte_cdma_evdo_summary" msgid="5507940227264296616">"حالت شبکه ترجیحی: NR/LTE/CDMA/EvDo"</string>
+ <string name="preferred_network_mode_nr_lte_gsm_wcdma_summary" msgid="2811179121638665248">"حالت شبکه ترجیحی: NR/LTE/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_nr_lte_cdma_evdo_gsm_wcdma_summary" msgid="7631365223836621902">"حالت شبکه ترجیحی: NR/LTE/CDMA/EvDo/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_nr_lte_wcdma_summary" msgid="8696016062943591864">"حالت شبکه ترجیحی: NR/LTE/WCDMA"</string>
+ <string name="preferred_network_mode_nr_lte_tdscdma_summary" msgid="1236182344680726751">"حالت شبکه ترجیحی: NR/LTE/TDSCDMA"</string>
+ <string name="preferred_network_mode_nr_lte_tdscdma_gsm_summary" msgid="8384454155773415993">"حالت شبکه ترجیحی: NR/LTE/TDSCDMA/GSM"</string>
+ <string name="preferred_network_mode_nr_lte_tdscdma_wcdma_summary" msgid="5912457779733343522">"حالت شبکه ترجیحی: NR/LTE/TDSCDMA/WCDMA"</string>
+ <string name="preferred_network_mode_nr_lte_tdscdma_gsm_wcdma_summary" msgid="6769797110309412576">"حالت شبکه ترجیحی: NR/LTE/TDSCDMA/GSM/WCDMA"</string>
+ <string name="preferred_network_mode_nr_lte_tdscdma_cdma_evdo_gsm_wcdma_summary" msgid="4260661428277578573">"حالت شبکه ترجیحی: NR/LTE/TDSCDMA/CDMA/EvDo/GSM/WCDMA"</string>
<string name="call_category" msgid="4394703838833058138">"درحال تماس"</string>
<string name="network_operator_category" msgid="4992217193732304680">"شبکه"</string>
<string name="enhanced_4g_lte_mode_title" msgid="4213420368777080540">"حالت پیشرفته 4G LTE"</string>
@@ -898,7 +898,7 @@
<string name="radio_info_voice_network_type_label" msgid="2395347336419593265">"نوع شبکه صوتی:"</string>
<string name="radio_info_data_network_type_label" msgid="8886597029237501929">"نوع شبکه داده:"</string>
<string name="phone_index_label" msgid="6222406512768964268">"انتخاب نمایه تلفن"</string>
- <string name="radio_info_set_perferred_label" msgid="7408131389363136210">"تنظیم نوع شبکه برگزیده:"</string>
+ <string name="radio_info_set_perferred_label" msgid="7408131389363136210">"تنظیم نوع شبکه ترجیحی:"</string>
<string name="radio_info_ping_hostname_v4" msgid="6951237885381284790">"پینگ کردن نام میزبان (www.google.com) IPv4:"</string>
<string name="radio_info_ping_hostname_v6" msgid="2748637889486554603">"پینگ کردن نام میزبان (www.google.com) IPv6:"</string>
<string name="radio_info_http_client_test" msgid="1329583721088428238">"آزمایش کارخواه HTTP:"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 6f830f9..a0a6b2c 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -30,7 +30,7 @@
<string name="mmiStarted" msgid="9212975136944568623">"MMI-koodi aloitettu"</string>
<string name="ussdRunning" msgid="1163586813106772717">"USSD-koodi käytössä..."</string>
<string name="mmiCancelled" msgid="5339191899200678272">"MMI-koodi peruutettu"</string>
- <string name="cancel" msgid="8984206397635155197">"Peruuta"</string>
+ <string name="cancel" msgid="8984206397635155197">"Peru"</string>
<string name="enter_input" msgid="6193628663039958990">"USSD-viestin pituuden täytyy olla <xliff:g id="MIN_LEN">%1$d</xliff:g>–<xliff:g id="MAX_LEN">%2$d</xliff:g> merkkiä. Yritä uudelleen."</string>
<string name="manageConferenceLabel" msgid="8415044818156353233">"Hallinnoi puhelinneuvottelua"</string>
<string name="ok" msgid="7818974223666140165">"OK"</string>
@@ -128,7 +128,7 @@
<string name="cdma_call_waiting" msgid="4565070960879673216">"Otetaanko koputus käyttöön?"</string>
<string name="enable_cdma_call_waiting_setting" msgid="5906811747921744307">"Sinulle ilmoitetaan puhelun aikana saapuvista puheluista"</string>
<string name="enable_cdma_cw" msgid="811047045863422232">"Ota käyttöön"</string>
- <string name="disable_cdma_cw" msgid="7119290446496301734">"Peruuta"</string>
+ <string name="disable_cdma_cw" msgid="7119290446496301734">"Peru"</string>
<string name="cdma_call_waiting_in_ims_on" msgid="6390979414188659218">"IMS:n alainen CDMA-koputus pois käytöstä"</string>
<string name="cdma_call_waiting_in_ims_off" msgid="1099246114368636334">"IMS:n alainen CDMA-koputus pois käytöstä"</string>
<string name="updating_title" msgid="6130548922615719689">"Puheluasetukset"</string>
@@ -693,7 +693,7 @@
<string name="callFailed_wfc_service_not_available_in_this_location" msgid="3624536608369524988">"Wi-Fi-puheluja ei voi soittaa tässä paikassa."</string>
<string name="change_pin_title" msgid="3564254326626797321">"Vaihda vastaajan PIN-koodi."</string>
<string name="change_pin_continue_label" msgid="5177011752453506371">"Jatka"</string>
- <string name="change_pin_cancel_label" msgid="2301711566758827936">"Peruuta"</string>
+ <string name="change_pin_cancel_label" msgid="2301711566758827936">"Peru"</string>
<string name="change_pin_ok_label" msgid="6861082678817785330">"OK"</string>
<string name="change_pin_enter_old_pin_header" msgid="853151335217594829">"Vahvista vanha PIN-koodi."</string>
<string name="change_pin_enter_old_pin_hint" msgid="8801292976275169367">"Jatka antamalla vastaajasi PIN-koodi."</string>
@@ -842,7 +842,7 @@
<string name="dsds_dialog_title" msgid="8494569893941847575">"Käynnistä uudelleen?"</string>
<string name="dsds_dialog_message" msgid="4047480385678538850">"Laite on käynnistettävä uudelleen asetuksen muuttamiseksi."</string>
<string name="dsds_dialog_confirm" msgid="9032004888134129885">"Käynnistä uudelleen"</string>
- <string name="dsds_dialog_cancel" msgid="3245958947099586655">"Peruuta"</string>
+ <string name="dsds_dialog_cancel" msgid="3245958947099586655">"Peru"</string>
<string name="radio_info_radio_power" msgid="8805595022160471587">"Mobiiliradion voimakkuus"</string>
<string name="radioInfo_menu_viewADN" msgid="4533179730908559846">"Näytä SIM-kortin osoitekirja"</string>
<string name="radioInfo_menu_viewFDN" msgid="1847236480527032061">"Näytä sallitut numerot"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 2c7d23f..3906196 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -282,8 +282,8 @@
<string name="data_enable_summary" msgid="696860063456536557">"Izinkan penggunaan data"</string>
<string name="dialog_alert_title" msgid="5260471806940268478">"Perhatian"</string>
<string name="roaming" msgid="1576180772877858949">"Roaming"</string>
- <string name="roaming_enable" msgid="6853685214521494819">"Sambungkan ke layanan data ketika roaming"</string>
- <string name="roaming_disable" msgid="8856224638624592681">"Sambungkan ke layanan data ketika roaming"</string>
+ <string name="roaming_enable" msgid="6853685214521494819">"Hubungkan ke layanan data ketika roaming"</string>
+ <string name="roaming_disable" msgid="8856224638624592681">"Hubungkan ke layanan data ketika roaming"</string>
<string name="roaming_reenable_message" msgid="1951802463885727915">"Roaming data dinonaktifkan. Ketuk untuk mengaktifkan."</string>
<string name="roaming_enabled_message" msgid="9022249120750897">"Biaya roaming dapat berlaku. Ketuk untuk mengubah."</string>
<string name="roaming_notification_title" msgid="3590348480688047320">"Koneksi data seluler terputus"</string>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index cfe23c5..5278fd2 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -794,7 +794,7 @@
<string name="call_barring_change_pwd" msgid="1730691950940338387">"Breyta aðgangsorði"</string>
<string name="call_barring_change_pwd_description" msgid="1274245130382054227">"Breyta aðgangsorði fyrir útilokun símtala"</string>
<string name="call_barring_change_pwd_description_disabled" msgid="2911647051915343920">"Ekki var hægt að breyta aðgangsorði fyrir útilokun símtala"</string>
- <string name="call_barring_pwd_not_match" msgid="7638198747579019826">"Aðgangsorðin stemma ekki."</string>
+ <string name="call_barring_pwd_not_match" msgid="7638198747579019826">"Aðgangsorðin stemma ekki"</string>
<string name="call_barring_right_pwd_number" msgid="3860630926460851330">"Sláðu inn aðgangsorð sem inniheldur fjóra tölustafi."</string>
<string name="call_barring_change_pwd_success" msgid="1837437691277936903">"Aðgangsorði breytt"</string>
<string name="call_barring_old_pwd" msgid="5500085633281388281">"Eldra aðgangsorð"</string>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index 085952a..3360d56 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -285,7 +285,7 @@
<string name="roaming_enable" msgid="6853685214521494819">"Роуминг кезінде дерек тасымалдау қызметтеріне қосылу"</string>
<string name="roaming_disable" msgid="8856224638624592681">"Роуминг кезінде дерек тасымалдау қызметтеріне қосылу"</string>
<string name="roaming_reenable_message" msgid="1951802463885727915">"Роуминг өшірулі. Қосу үшін түртіңіз."</string>
- <string name="roaming_enabled_message" msgid="9022249120750897">"Роуминг ақылары алынуы мүмкін. Өзгерту үшін түртіңіз."</string>
+ <string name="roaming_enabled_message" msgid="9022249120750897">"Роуминг үшін ақы алынуы мүмкін. Өзгерту үшін түртіңіз."</string>
<string name="roaming_notification_title" msgid="3590348480688047320">"Ұялы байланыс жоғалып кетті"</string>
<string name="roaming_on_notification_title" msgid="7451473196411559173">"Деректер роумингі қосулы"</string>
<string name="roaming_warning" msgid="7855681468067171971">"Қомақты ақы алынуы мүмкін."</string>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index 625135d..68fbf51 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -282,8 +282,8 @@
<string name="data_enable_summary" msgid="696860063456536557">"Дайындарды пайдаланууга уруксат берүү"</string>
<string name="dialog_alert_title" msgid="5260471806940268478">"Көңүл буруңуз"</string>
<string name="roaming" msgid="1576180772877858949">"Роуминг"</string>
- <string name="roaming_enable" msgid="6853685214521494819">"Роуминг учурунда дайын-даректерди өткөрүүчү кызматтарга туташуу"</string>
- <string name="roaming_disable" msgid="8856224638624592681">"Роуминг учурунда дайын-даректерди өткөрүүчү кызматтарга туташуу"</string>
+ <string name="roaming_enable" msgid="6853685214521494819">"Роуминг учурунда маалыматтарды өткөрүүчү кызматтарга туташасыз"</string>
+ <string name="roaming_disable" msgid="8856224638624592681">"Роуминг учурунда маалыматтарды өткөрүүчү кызматтарга туташасыз"</string>
<string name="roaming_reenable_message" msgid="1951802463885727915">"Интернет-роуминг өчүрүлгөн. Күйгүзүү үчүн басыңыз."</string>
<string name="roaming_enabled_message" msgid="9022249120750897">"Роуминг акысын төлөп калышыңыз мүмкүн. Өзгөртүү үчүн таптап коюңуз."</string>
<string name="roaming_notification_title" msgid="3590348480688047320">"Мобилдик интернет туташуусу үзүлдү"</string>
@@ -411,7 +411,7 @@
<string name="enable_disable_multi_category" msgid="5958248155437940625">"Мульти-категория"</string>
<string name="multi_category_enable" msgid="4531915767817483960">"Мульти-категория иштетилген"</string>
<string name="multi_category_disable" msgid="6325934413701238104">"Мульти-категория өчүрүлгөн"</string>
- <string name="network_recommended" msgid="3444321100580250926">" (сунушталган)"</string>
+ <string name="network_recommended" msgid="3444321100580250926">" (сунушталат)"</string>
<string name="network_lte" msgid="7206879277095094280">"LTE (сунушталат)"</string>
<string name="network_4G" msgid="6800527815504223913">"4G (сунушталат)"</string>
<string name="network_global" msgid="3289646154407617631">"Дүйнө жүзү"</string>
@@ -672,7 +672,7 @@
<string name="preference_category_ringtone" msgid="8787281191375434976">"Рингтон жана Титирөө"</string>
<string name="pstn_connection_service_label" msgid="9200102709997537069">"Кыналган SIM карталар"</string>
<string name="enable_video_calling_title" msgid="7246600931634161830">"Видео чалууну күйгүзүү"</string>
- <string name="enable_video_calling_dialog_msg" msgid="7141478720386203540">"Видео чалууну күйгүзүү үчүн, тармак жөндөөлөрүнөн Жакшыртылган 4G LTE режимин иштетишиңиз керек."</string>
+ <string name="enable_video_calling_dialog_msg" msgid="7141478720386203540">"Видео чалууну күйгүзүү үчүн тармак жөндөөлөрүнөн Жакшыртылган 4G LTE режимин иштетишиңиз керек."</string>
<string name="enable_video_calling_dialog_settings" msgid="8697890611305307110">"Тармак жөндөөлөрү"</string>
<string name="enable_video_calling_dialog_close" msgid="4298929725917045270">"Жабуу"</string>
<string name="sim_label_emergency_calls" msgid="9078241989421522310">"Шашылыш чалуулар"</string>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 3982c90..e8cd6ae 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -191,7 +191,7 @@
<string name="preferred_network_mode_dialogtitle" msgid="2781447433514459696">"Претпочитан тип мрежа"</string>
<string name="forbidden_network" msgid="5081729819561333023">"(забрането)"</string>
<string name="choose_network_title" msgid="5335832663422653082">"Изберете мрежа"</string>
- <string name="network_disconnected" msgid="8844141106841160825">"Исклучено"</string>
+ <string name="network_disconnected" msgid="8844141106841160825">"Не е поврзано"</string>
<string name="network_connected" msgid="2760235679963580224">"Поврзано"</string>
<string name="network_connecting" msgid="160901383582774987">"Се поврзува…"</string>
<string name="network_could_not_connect" msgid="6547460848093727998">"Не може да се поврзе"</string>
@@ -297,7 +297,7 @@
<string name="sip_accounts_removed_notification_title" msgid="3528076957535736095">"Најдени и отстранети се неподдржани сметки на SIP"</string>
<string name="sip_accounts_removed_notification_message" msgid="1916856744869791592">"Платформата Android веќе не поддржува повикување преку SIP.\nВашите постојни сметки на SIP <xliff:g id="REMOVED_SIP_ACCOUNTS">%s</xliff:g> се отстранети.\nПотврдете ја вашата стандардна поставка за повикување."</string>
<string name="sip_accounts_removed_notification_action" msgid="3772778402370555562">"Одете во „Поставки“"</string>
- <string name="data_usage_title" msgid="8438592133893837464">"Потрошен сообраќај на апликациите"</string>
+ <string name="data_usage_title" msgid="8438592133893837464">"Потрошен интернет од апликации"</string>
<string name="data_usage_template" msgid="6287906680674061783">"<xliff:g id="ID_1">%1$s</xliff:g> потрошен мобилен интернет во периодот <xliff:g id="ID_2">%2$s</xliff:g>"</string>
<string name="advanced_options_title" msgid="9208195294513520934">"Напредни"</string>
<string name="carrier_settings_euicc" msgid="1190237227261337749">"Оператор"</string>
@@ -863,7 +863,7 @@
<string name="radioInfo_phone_idle" msgid="2191653783170757819">"Мирување"</string>
<string name="radioInfo_phone_ringing" msgid="8100354169567413370">"Ѕвонење"</string>
<string name="radioInfo_phone_offhook" msgid="7564601639749936170">"Повик во тек"</string>
- <string name="radioInfo_data_disconnected" msgid="8085447971880814541">"Исклучен"</string>
+ <string name="radioInfo_data_disconnected" msgid="8085447971880814541">"Не е поврзано"</string>
<string name="radioInfo_data_connecting" msgid="925092271092152472">"Се поврзува"</string>
<string name="radioInfo_data_connected" msgid="7637335645634239508">"Поврзан"</string>
<string name="radioInfo_data_suspended" msgid="8695262782642002785">"Суспендиран"</string>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index db43ae1..72c3daf 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -484,7 +484,7 @@
<string name="simContacts_title" msgid="2714029230160136647">"सम्पर्कहरू आयात गर्न चयन गर्नुहोस्"</string>
<string name="simContacts_airplaneMode" msgid="4654884030631503808">"SIM कार्डबाट सम्पर्कहरू आयात गर्न हवाइजहाज मोड बन्द गर्नुहोस्।"</string>
<string name="enable_pin" msgid="967674051730845376">"SIM PIN सक्षम/अक्षम गर्नुहोस्"</string>
- <string name="change_pin" msgid="3657869530942905790">"SIM PIN परिवर्तन गर्नुहोस्"</string>
+ <string name="change_pin" msgid="3657869530942905790">"SIM को PIN परिवर्तन गर्नुहोस्"</string>
<string name="enter_pin_text" msgid="3182311451978663356">"SIM PIN:"</string>
<string name="oldPinLabel" msgid="8618515202411987721">"पुरानो PIN"</string>
<string name="newPinLabel" msgid="3585899083055354732">"नयाँ PIN"</string>
@@ -567,7 +567,7 @@
<string name="dial_emergency_error" msgid="825822413209026039">"कल गर्न सकिँदैन। <xliff:g id="NON_EMERGENCY_NUMBER">%s</xliff:g> आपत्कालीन नम्बर होइन।"</string>
<string name="dial_emergency_empty_error" msgid="2785803395047793634">"कल गर्न सकिँदैन। आपत्कालीन नम्बर डायल गर्नुहोस्।"</string>
<string name="dial_emergency_calling_not_available" msgid="6485846193794727823">"आपत्कालीन कल सेवा उपलब्ध छैन"</string>
- <string name="pin_puk_system_user_only" msgid="1045147220686867922">"यन्त्रका मालिक मात्र PIN/PUK कोडहरू प्रविष्टि गर्न सक्नुहुन्छ।"</string>
+ <string name="pin_puk_system_user_only" msgid="1045147220686867922">"डिभाइसका मालिक मात्र PIN/PUK कोडहरू प्रविष्टि गर्न सक्नुहुन्छ।"</string>
<string name="police_type_description" msgid="2819533883972081757">"प्रहरी"</string>
<string name="ambulance_type_description" msgid="6798237503553180461">"एम्बुलेन्स सेवा"</string>
<string name="fire_type_description" msgid="6565200468934914930">"दमकल सेवा"</string>
@@ -592,7 +592,7 @@
<string name="failedToImportSingleContactMsg" msgid="228095510489830266">"सम्पर्क आयात गर्न असफल"</string>
<string name="hac_mode_title" msgid="4127986689621125468">"श्रवणका लागि सहयोगी यन्त्रहरू"</string>
<string name="hac_mode_summary" msgid="7774989500136009881">"श्रवण सहायता अनुकूलता खोल्नुहोस्"</string>
- <string name="rtt_mode_title" msgid="3075948111362818043">"द्रुत पाठ सन्देश (RTT) कल"</string>
+ <string name="rtt_mode_title" msgid="3075948111362818043">"द्रुत टेक्स्ट म्यासेज (RTT) कल"</string>
<string name="rtt_mode_summary" msgid="8631541375609989562">"भ्वाइस कलभित्रै सन्देश प्रवाह गर्ने अनुमति दिनुहोस्"</string>
<string name="rtt_mode_more_information" msgid="587500128658756318">"RTT ले बहिरा, सुन्नमा कठिन हुने, बोल्न नसक्ने र आवाज मात्र नभई कल गर्दा थप कुराहरू चाहिने मान्छेहरूलाई सहायता गर्छ!<br> <a href=<xliff:g id="URL">http://support.google.com/mobile?p=telephony_rtt</xliff:g>>थप जान्नुहोस्</a>\n <br><br> - RTT कलहरूलाई सन्देशसम्बन्धी ट्रान्सक्रिप्टका रूपमा सुरक्षित गरिन्छ\n <br> - RTT भिडियो कलहरूमा उपलब्ध छैन"</string>
<string name="no_rtt_when_roaming" msgid="5268008247378355389">"टिपोट: रोमिङमा हुँदा RTT उपलब्ध हुँदैन"</string>
@@ -656,7 +656,7 @@
</plurals>
<string name="voicemail_provider" msgid="4158806657253745294">"सेवा"</string>
<string name="voicemail_settings" msgid="4451045613238972776">"सेटअप"</string>
- <string name="voicemail_number_not_set" msgid="8831561283386938155">"सेट गरेको छैन"</string>
+ <string name="voicemail_number_not_set" msgid="8831561283386938155">"सेट गरिएको छैन"</string>
<string name="other_settings" msgid="8895088007393598447">"अन्य कल सेटिङहरू"</string>
<string name="calling_via_template" msgid="1791323450703751750">"<xliff:g id="PROVIDER_NAME">%s</xliff:g> को मार्फत कल गर्दै"</string>
<string name="contactPhoto" msgid="7885089213135154834">"सम्पर्क फोटो"</string>
@@ -821,7 +821,7 @@
<string name="supp_service_forwarded_call" msgid="6475776013771821457">"कल फर्वार्ड गरियो।"</string>
<string name="supp_service_conference_call" msgid="4004193534408317148">"सम्मेलन कलमा सामेल हुँदै छ।"</string>
<string name="supp_service_held_call_released" msgid="2847835124639112410">"होल्डमा राखिएको कललाई विच्छेद गरियो।"</string>
- <string name="callFailed_otasp_provisioning_in_process" msgid="3345666183602879326">"यन्त्रमा हाल सेवाहरूको व्यवस्था गरिँदै हुनाले कल गर्न सकिँदैन।"</string>
+ <string name="callFailed_otasp_provisioning_in_process" msgid="3345666183602879326">"डिभाइसमा हाल सेवाहरूको व्यवस्था गरिँदै हुनाले कल गर्न सकिँदैन।"</string>
<string name="callFailed_already_dialing" msgid="7250591188960691086">"अर्को बहिर्गमन कल पहिले नै डायल भएका हुनाले कल गर्न सकिँदैन।"</string>
<string name="callFailed_already_ringing" msgid="2376603543544289303">"जवाफ नदिइएको आगमन कल जारी रहेकाले नयाँ कल गर्न सकिँदैन। कुनै नयाँ कल गर्नुअघि आगमन कलको जवाफ दिनुहोस् वा त्यसलाई अस्वीकार गर्नुहोस्।"</string>
<string name="callFailed_calling_disabled" msgid="5010992739401206283">"ro.telephony.disable-call प्रणालीको गुण प्रयोग गरेर कल गर्ने सुविधा असक्षम पारिएको हुनाले कल गर्न सकिँदैन।"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index cabb43f..d26cc50 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -483,9 +483,9 @@
<string name="simContacts_empty" msgid="1135632055473689521">"Нема контаката на SIM картици."</string>
<string name="simContacts_title" msgid="2714029230160136647">"Избор контаката за увоз"</string>
<string name="simContacts_airplaneMode" msgid="4654884030631503808">"Искључите режим рада у авиону да бисте увезли контакте са SIM картице."</string>
- <string name="enable_pin" msgid="967674051730845376">"Омогућавање/онемогућавање SIM PIN-а"</string>
- <string name="change_pin" msgid="3657869530942905790">"Промена SIM PIN-а"</string>
- <string name="enter_pin_text" msgid="3182311451978663356">"SIM PIN:"</string>
+ <string name="enable_pin" msgid="967674051730845376">"Омогућавање/онемогућавање PIN-а за SIM"</string>
+ <string name="change_pin" msgid="3657869530942905790">"Промена PIN-а за SIM"</string>
+ <string name="enter_pin_text" msgid="3182311451978663356">"PIN за SIM:"</string>
<string name="oldPinLabel" msgid="8618515202411987721">"Стари PIN"</string>
<string name="newPinLabel" msgid="3585899083055354732">"Нови PIN"</string>
<string name="confirmPinLabel" msgid="7783531218662473778">"Потврдите нови PIN"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 77c941f..f998c5e 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -533,7 +533,7 @@
<string name="notification_voicemail_no_vm_number" msgid="3423686009815186750">"無語音信箱號碼"</string>
<string name="notification_network_selection_title" msgid="255595526707809121">"沒有服務"</string>
<string name="notification_network_selection_text" msgid="553288408722427659">"所選網路 (<xliff:g id="OPERATOR_NAME">%s</xliff:g>) 無法使用"</string>
- <string name="incall_error_power_off" product="watch" msgid="7191184639454113633">"如要撥打電話,請開啟行動網路,並關閉飛航模式或節約耗電量模式。"</string>
+ <string name="incall_error_power_off" product="watch" msgid="7191184639454113633">"如要撥打電話,請開啟行動網路,並關閉飛航模式或省電模式。"</string>
<string name="incall_error_power_off" product="default" msgid="8131672264311208673">"關閉飛航模式即可撥打電話。"</string>
<string name="incall_error_power_off_wfc" msgid="9125661184694727052">"關閉飛航模式或連上無線網路即可撥打電話。"</string>
<string name="incall_error_ecm_emergency_only" msgid="5622379058883722080">"結束緊急回撥模式,以便撥打非緊急電話。"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 46eaaaf..88d2f1a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1132,6 +1132,8 @@
<string name="puk2_blocked">PUK2 is permanently blocked.</string>
<!-- SIM PIN2 screen: error message -->
<string name="pin2_attempts">\nYou have <xliff:g id="number">%d</xliff:g> remaining attempts.</string>
+ <!-- SIM PIN2 screen: error message displayed in a dialog -->
+ <string name="puk2_locked">PUK2 locked. Contact service provider to unlock.</string>
<!-- SIM PIN screen: status message displayed in a popup (toast) -->
<string name="pin2_unblocked">PIN2 no longer blocked</string>
<!-- SIM PIN screen: error message shown in dialog when there is a network or sim error.
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index e729d28..2b91a24 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -168,6 +168,7 @@
private static final int EVENT_BIND_DEFAULT_FOR_NO_SIM_CONFIG_TIMEOUT = 21;
// Fetching config timed out from the default app for no SIM config.
private static final int EVENT_FETCH_DEFAULT_FOR_NO_SIM_CONFIG_TIMEOUT = 22;
+ // NOTE: any new EVENT_* values must be added to method eventToString().
private static final int BIND_TIMEOUT_MILLIS = 30000;
@@ -210,7 +211,7 @@
@Override
public void handleMessage(Message msg) {
final int phoneId = msg.arg1;
- logdWithLocalLog("mHandler: " + msg.what + " phoneId: " + phoneId);
+ logdWithLocalLog("mHandler: " + eventToString(msg.what) + " phoneId: " + phoneId);
if (!SubscriptionManager.isValidPhoneId(phoneId)
&& msg.what != EVENT_MULTI_SIM_CONFIG_CHANGED) {
return;
@@ -293,7 +294,7 @@
} else {
// Put a stub bundle in place so that the rest of the logic continues
// smoothly.
- mConfigFromDefaultApp[phoneId] = PersistableBundle.EMPTY;
+ mConfigFromDefaultApp[phoneId] = new PersistableBundle();
// Send broadcast if bind fails.
notifySubscriptionInfoUpdater(phoneId);
// TODO: We *must* call unbindService even if bindService returns false.
@@ -320,13 +321,13 @@
@Override
public void onReceiveResult(int resultCode, Bundle resultData) {
unbindIfBound(mContext, conn, phoneId);
+ removeMessages(EVENT_FETCH_DEFAULT_TIMEOUT,
+ getMessageToken(phoneId));
// If new service connection has been created, this is stale.
if (mServiceConnection[phoneId] != conn) {
loge("Received response for stale request.");
return;
}
- removeMessages(EVENT_FETCH_DEFAULT_TIMEOUT,
- getMessageToken(phoneId));
if (resultCode == RESULT_ERROR || resultData == null) {
// On error, abort config fetching.
loge("Failed to get carrier config");
@@ -378,7 +379,7 @@
broadcastConfigChangedIntent(phoneId);
}
// Put a stub bundle in place so that the rest of the logic continues smoothly.
- mConfigFromDefaultApp[phoneId] = PersistableBundle.EMPTY;
+ mConfigFromDefaultApp[phoneId] = new PersistableBundle();
notifySubscriptionInfoUpdater(phoneId);
break;
}
@@ -425,7 +426,7 @@
} else {
// Put a stub bundle in place so that the rest of the logic continues
// smoothly.
- mConfigFromCarrierApp[phoneId] = PersistableBundle.EMPTY;
+ mConfigFromCarrierApp[phoneId] = new PersistableBundle();
// Send broadcast if bind fails.
broadcastConfigChangedIntent(phoneId);
loge("Bind to carrier app: " + carrierPackageName + " fails");
@@ -450,13 +451,13 @@
@Override
public void onReceiveResult(int resultCode, Bundle resultData) {
unbindIfBound(mContext, conn, phoneId);
+ removeMessages(EVENT_FETCH_CARRIER_TIMEOUT,
+ getMessageToken(phoneId));
// If new service connection has been created, this is stale.
if (mServiceConnection[phoneId] != conn) {
loge("Received response for stale request.");
return;
}
- removeMessages(EVENT_FETCH_CARRIER_TIMEOUT,
- getMessageToken(phoneId));
if (resultCode == RESULT_ERROR || resultData == null) {
// On error, abort config fetching.
loge("Failed to get carrier config from carrier app: "
@@ -469,7 +470,15 @@
resultData.getParcelable(KEY_CONFIG_BUNDLE);
saveConfigToXml(getCarrierPackageForPhoneId(phoneId), "",
phoneId, carrierId, config);
- mConfigFromCarrierApp[phoneId] = config;
+ if (config != null) {
+ mConfigFromCarrierApp[phoneId] = config;
+ } else {
+ logdWithLocalLog("Config from carrier app is null "
+ + "for phoneId " + phoneId);
+ // Put a stub bundle in place so that the rest of the logic
+ // continues smoothly.
+ mConfigFromCarrierApp[phoneId] = new PersistableBundle();
+ }
sendMessage(
obtainMessage(
EVENT_FETCH_CARRIER_DONE, phoneId, -1));
@@ -510,7 +519,7 @@
broadcastConfigChangedIntent(phoneId);
}
// Put a stub bundle in place so that the rest of the logic continues smoothly.
- mConfigFromCarrierApp[phoneId] = PersistableBundle.EMPTY;
+ mConfigFromCarrierApp[phoneId] = new PersistableBundle();
notifySubscriptionInfoUpdater(phoneId);
break;
}
@@ -698,7 +707,7 @@
mConfigFromCarrierApp = new PersistableBundle[numPhones];
mPersistentOverrideConfigs = new PersistableBundle[numPhones];
mOverrideConfigs = new PersistableBundle[numPhones];
- mNoSimConfig = PersistableBundle.EMPTY;
+ mNoSimConfig = new PersistableBundle();
mServiceConnection = new CarrierServiceConnection[numPhones];
mServiceBound = new boolean[numPhones];
mHasSentConfigChange = new boolean[numPhones];
@@ -768,7 +777,7 @@
}
if (configToSend == null) {
- configToSend = PersistableBundle.EMPTY;
+ configToSend = new PersistableBundle();
}
// mOverrideConfigs is for testing. And it will override current configs.
@@ -1178,20 +1187,20 @@
@Override
@NonNull
- public PersistableBundle getConfigForSubId(int subId, String callingPackage) {
- return getConfigForSubIdWithFeature(subId, callingPackage, null);
+ public PersistableBundle getConfigForSubId(int subscriptionId, String callingPackage) {
+ return getConfigForSubIdWithFeature(subscriptionId, callingPackage, null);
}
@Override
@NonNull
- public PersistableBundle getConfigForSubIdWithFeature(int subId, String callingPackage,
+ public PersistableBundle getConfigForSubIdWithFeature(int subscriptionId, String callingPackage,
String callingFeatureId) {
- if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mContext, subId, callingPackage,
- callingFeatureId, "getCarrierConfig")) {
- return PersistableBundle.EMPTY;
+ if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mContext, subscriptionId,
+ callingPackage, callingFeatureId, "getCarrierConfig")) {
+ return new PersistableBundle();
}
- int phoneId = SubscriptionManager.getPhoneId(subId);
+ int phoneId = SubscriptionManager.getPhoneId(subscriptionId);
PersistableBundle retConfig = CarrierConfigManager.getDefaultConfig();
if (SubscriptionManager.isValidPhoneId(phoneId)) {
PersistableBundle config = mConfigFromDefaultApp[phoneId];
@@ -1235,7 +1244,8 @@
int phoneId = SubscriptionManager.getPhoneId(subscriptionId);
if (!SubscriptionManager.isValidPhoneId(phoneId)) {
logd("Ignore invalid phoneId: " + phoneId + " for subId: " + subscriptionId);
- return;
+ throw new IllegalArgumentException(
+ "Invalid phoneId " + phoneId + " for subId " + subscriptionId);
}
// Post to run on handler thread on which all states should be confined.
mHandler.post(() -> {
@@ -1265,7 +1275,7 @@
private void overrideConfig(@NonNull PersistableBundle[] currentOverrides, int phoneId,
@Nullable PersistableBundle overrides) {
if (overrides == null) {
- currentOverrides[phoneId] = PersistableBundle.EMPTY;
+ currentOverrides[phoneId] = new PersistableBundle();
} else if (currentOverrides[phoneId] == null) {
currentOverrides[phoneId] = overrides;
} else {
@@ -1274,17 +1284,18 @@
}
@Override
- public void notifyConfigChangedForSubId(int subId) {
- int phoneId = SubscriptionManager.getPhoneId(subId);
- if (!SubscriptionManager.isValidPhoneId(phoneId)) {
- logd("Ignore invalid phoneId: " + phoneId + " for subId: " + subId);
- return;
- }
-
+ public void notifyConfigChangedForSubId(int subscriptionId) {
// Requires the calling app to be either a carrier privileged app for this subId or
// system privileged app with MODIFY_PHONE_STATE permission.
- TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(mContext, subId,
- "Require carrier privileges or MODIFY_PHONE_STATE permission.");
+ TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(mContext,
+ subscriptionId, "Require carrier privileges or MODIFY_PHONE_STATE permission.");
+
+ int phoneId = SubscriptionManager.getPhoneId(subscriptionId);
+ if (!SubscriptionManager.isValidPhoneId(phoneId)) {
+ logd("Ignore invalid phoneId: " + phoneId + " for subId: " + subscriptionId);
+ throw new IllegalArgumentException(
+ "Invalid phoneId " + phoneId + " for subId " + subscriptionId);
+ }
// This method should block until deleting has completed, so that an error which prevents us
// from clearing the cache is passed back to the carrier app. With the files successfully
@@ -1301,7 +1312,7 @@
android.Manifest.permission.MODIFY_PHONE_STATE, null);
logdWithLocalLog("Update config for phoneId: " + phoneId + " simState: " + simState);
if (!SubscriptionManager.isValidPhoneId(phoneId)) {
- return;
+ throw new IllegalArgumentException("Invalid phoneId: " + phoneId);
}
// requires Java 7 for switch on string.
switch (simState) {
@@ -1651,6 +1662,56 @@
}
}
+ // Get readable string for the message code supported in this class.
+ private static String eventToString(int code) {
+ switch (code) {
+ case EVENT_CLEAR_CONFIG:
+ return "EVENT_CLEAR_CONFIG";
+ case EVENT_CONNECTED_TO_DEFAULT:
+ return "EVENT_CONNECTED_TO_DEFAULT";
+ case EVENT_CONNECTED_TO_CARRIER:
+ return "EVENT_CONNECTED_TO_CARRIER";
+ case EVENT_FETCH_DEFAULT_DONE:
+ return "EVENT_FETCH_DEFAULT_DONE";
+ case EVENT_FETCH_CARRIER_DONE:
+ return "EVENT_FETCH_CARRIER_DONE";
+ case EVENT_DO_FETCH_DEFAULT:
+ return "EVENT_DO_FETCH_DEFAULT";
+ case EVENT_DO_FETCH_CARRIER:
+ return "EVENT_DO_FETCH_CARRIER";
+ case EVENT_PACKAGE_CHANGED:
+ return "EVENT_PACKAGE_CHANGED";
+ case EVENT_BIND_DEFAULT_TIMEOUT:
+ return "EVENT_BIND_DEFAULT_TIMEOUT";
+ case EVENT_BIND_CARRIER_TIMEOUT:
+ return "EVENT_BIND_CARRIER_TIMEOUT";
+ case EVENT_CHECK_SYSTEM_UPDATE:
+ return "EVENT_CHECK_SYSTEM_UPDATE";
+ case EVENT_SYSTEM_UNLOCKED:
+ return "EVENT_SYSTEM_UNLOCKED";
+ case EVENT_FETCH_DEFAULT_TIMEOUT:
+ return "EVENT_FETCH_DEFAULT_TIMEOUT";
+ case EVENT_FETCH_CARRIER_TIMEOUT:
+ return "EVENT_FETCH_CARRIER_TIMEOUT";
+ case EVENT_SUBSCRIPTION_INFO_UPDATED:
+ return "EVENT_SUBSCRIPTION_INFO_UPDATED";
+ case EVENT_MULTI_SIM_CONFIG_CHANGED:
+ return "EVENT_MULTI_SIM_CONFIG_CHANGED";
+ case EVENT_DO_FETCH_DEFAULT_FOR_NO_SIM_CONFIG:
+ return "EVENT_DO_FETCH_DEFAULT_FOR_NO_SIM_CONFIG";
+ case EVENT_FETCH_DEFAULT_FOR_NO_SIM_CONFIG_DONE:
+ return "EVENT_FETCH_DEFAULT_FOR_NO_SIM_CONFIG_DONE";
+ case EVENT_CONNECTED_TO_DEFAULT_FOR_NO_SIM_CONFIG:
+ return "EVENT_CONNECTED_TO_DEFAULT_FOR_NO_SIM_CONFIG";
+ case EVENT_BIND_DEFAULT_FOR_NO_SIM_CONFIG_TIMEOUT:
+ return "EVENT_BIND_DEFAULT_FOR_NO_SIM_CONFIG_TIMEOUT";
+ case EVENT_FETCH_DEFAULT_FOR_NO_SIM_CONFIG_TIMEOUT:
+ return "EVENT_FETCH_DEFAULT_FOR_NO_SIM_CONFIG_TIMEOUT";
+ default:
+ return "UNKNOWN(" + code + ")";
+ }
+ }
+
private void logd(String msg) {
Log.d(LOG_TAG, msg);
}
diff --git a/src/com/android/phone/ImsRcsController.java b/src/com/android/phone/ImsRcsController.java
index ad33302..bd6ba6b 100644
--- a/src/com/android/phone/ImsRcsController.java
+++ b/src/com/android/phone/ImsRcsController.java
@@ -104,7 +104,7 @@
*/
@Override
public void registerImsRegistrationCallback(int subId, IImsRegistrationCallback callback) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "registerImsRegistrationCallback");
final long token = Binder.clearCallingIdentity();
try {
@@ -122,7 +122,7 @@
*/
@Override
public void unregisterImsRegistrationCallback(int subId, IImsRegistrationCallback callback) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "unregisterImsRegistrationCallback");
final long token = Binder.clearCallingIdentity();
try {
@@ -139,7 +139,7 @@
*/
@Override
public void getImsRcsRegistrationState(int subId, IIntegerConsumer consumer) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getImsRcsRegistrationState");
final long token = Binder.clearCallingIdentity();
try {
@@ -161,7 +161,7 @@
*/
@Override
public void getImsRcsRegistrationTransportType(int subId, IIntegerConsumer consumer) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getImsRcsRegistrationTransportType");
final long token = Binder.clearCallingIdentity();
try {
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 77aca8a..4632e56 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3775,7 +3775,7 @@
@Override
public int getNetworkSelectionMode(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getNetworkSelectionMode");
final long identity = Binder.clearCallingIdentity();
try {
@@ -3812,7 +3812,7 @@
@Override
public void registerImsRegistrationCallback(int subId, IImsRegistrationCallback c)
throws RemoteException {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "registerImsRegistrationCallback");
if (!ImsManager.isImsSupportedOnDevice(mApp)) {
@@ -3838,7 +3838,7 @@
*/
@Override
public void unregisterImsRegistrationCallback(int subId, IImsRegistrationCallback c) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "unregisterImsRegistrationCallback");
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
throw new IllegalArgumentException("Invalid Subscription ID: " + subId);
@@ -3895,7 +3895,7 @@
*/
@Override
public void getImsMmTelRegistrationTransportType(int subId, IIntegerConsumer consumer) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getImsMmTelRegistrationTransportType");
if (!ImsManager.isImsSupportedOnDevice(mApp)) {
throw new ServiceSpecificException(ImsException.CODE_ERROR_UNSUPPORTED_OPERATION,
@@ -3935,7 +3935,7 @@
@Override
public void registerMmTelCapabilityCallback(int subId, IImsCapabilityCallback c)
throws RemoteException {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "registerMmTelCapabilityCallback");
if (!ImsManager.isImsSupportedOnDevice(mApp)) {
throw new ServiceSpecificException(ImsException.CODE_ERROR_UNSUPPORTED_OPERATION,
@@ -3960,7 +3960,7 @@
*/
@Override
public void unregisterMmTelCapabilityCallback(int subId, IImsCapabilityCallback c) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "unregisterMmTelCapabilityCallback");
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
throw new IllegalArgumentException("Invalid Subscription ID: " + subId);
@@ -4060,7 +4060,7 @@
*/
@Override
public boolean isAdvancedCallingSettingEnabled(int subId) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isAdvancedCallingSettingEnabled");
// TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
@@ -4097,7 +4097,7 @@
*/
@Override
public boolean isVtSettingEnabled(int subId) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isVtSettingEnabled");
final long identity = Binder.clearCallingIdentity();
try {
@@ -4131,7 +4131,7 @@
*/
@Override
public boolean isVoWiFiSettingEnabled(int subId) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isVoWiFiSettingEnabled");
final long identity = Binder.clearCallingIdentity();
try {
@@ -4167,7 +4167,7 @@
*/
@Override
public boolean isCrossSimCallingEnabledByUser(int subId) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isCrossSimCallingEnabledByUser");
final long identity = Binder.clearCallingIdentity();
try {
@@ -4209,8 +4209,9 @@
* @param subId The subscription to use to check the configuration.
*/
@Override
+
public boolean isVoWiFiRoamingSettingEnabled(int subId) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isVoWiFiRoamingSettingEnabled");
final long identity = Binder.clearCallingIdentity();
try {
@@ -4262,7 +4263,7 @@
*/
@Override
public int getVoWiFiModeSetting(int subId) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getVoWiFiModeSetting");
final long identity = Binder.clearCallingIdentity();
try {
@@ -4344,7 +4345,7 @@
*/
@Override
public boolean isTtyOverVolteEnabled(int subId) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isTtyOverVolteEnabled");
final long identity = Binder.clearCallingIdentity();
try {
@@ -5736,7 +5737,7 @@
@ImsFeature.FeatureType int featureType) {
int[] subIds = SubscriptionManager.getSubId(slotId);
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, (subIds != null ? subIds[0] : SubscriptionManager.INVALID_SUBSCRIPTION_ID),
"getBoundImsServicePackage");
@@ -5873,7 +5874,7 @@
@Override
public String getManualNetworkSelectionPlmn(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getManualNetworkSelectionPlmn");
final long identity = Binder.clearCallingIdentity();
@@ -6228,7 +6229,7 @@
@Override
public int getAllowedNetworkTypesBitmask(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getAllowedNetworkTypesBitmask");
final long identity = Binder.clearCallingIdentity();
@@ -6253,7 +6254,7 @@
@Override
public long getAllowedNetworkTypesForReason(int subId,
@TelephonyManager.AllowedNetworkTypesReason int reason) {
- TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getAllowedNetworkTypesForReason");
final long identity = Binder.clearCallingIdentity();
try {
@@ -6306,7 +6307,7 @@
@Override
public boolean isNrDualConnectivityEnabled(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isNRDualConnectivityEnabled");
if (!isRadioInterfaceCapabilitySupported(
TelephonyManager.CAPABILITY_NR_DUAL_CONNECTIVITY_CONFIGURATION_AVAILABLE)) {
@@ -6559,8 +6560,9 @@
private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, int uid,
Phone phone) {
- if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
- // Skip the check if it's one of these special uids
+ if (uid == Process.PHONE_UID) {
+ // Skip the check if it's the phone UID (system UID removed in b/184713596)
+ // TODO (b/184954344): Check for system/phone UID at call site instead of here
return TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
}
@@ -7114,7 +7116,7 @@
Phone phone = PhoneFactory.getPhone(phoneId);
try {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, phone.getSubId(), "getRadioAccessFamily");
} catch (SecurityException e) {
EventLog.writeEvent(0x534e4554, "150857259", -1, "Missing Permission");
@@ -7127,7 +7129,7 @@
final long identity = Binder.clearCallingIdentity();
try {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, phone.getSubId(), "getRadioAccessFamily");
raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
} finally {
@@ -7441,7 +7443,7 @@
@Override
public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp,
subscriptionId,
"getPhoneAccountHandleForSubscriptionId, " + "subscriptionId: " + subscriptionId);
@@ -8395,7 +8397,7 @@
mApp.enforceCallingOrSelfPermission(android.Manifest.permission.ACCESS_NETWORK_STATE,
null);
} catch (Exception e) {
- TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
+ TelephonyPermissions.enforceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isDataRoamingEnabled");
}
@@ -8440,7 +8442,7 @@
@Override
public boolean isManualNetworkSelectionAllowed(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "isManualNetworkSelectionAllowed");
boolean isAllowed = true;
@@ -8726,7 +8728,7 @@
@Override
public int getCdmaRoamingMode(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getCdmaRoamingMode");
final long identity = Binder.clearCallingIdentity();
@@ -8753,7 +8755,7 @@
@Override
public int getCdmaSubscriptionMode(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getCdmaSubscriptionMode");
final long identity = Binder.clearCallingIdentity();
@@ -8807,7 +8809,7 @@
final Phone defaultPhone = getDefaultPhone();
if (!exactMatch) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
}
final long identity = Binder.clearCallingIdentity();
@@ -9298,7 +9300,7 @@
@Override
public List<RadioAccessSpecifier> getSystemSelectionChannels(int subId) {
TelephonyPermissions
- .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
+ .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mApp, subId, "getSystemSelectionChannels");
WorkSource workSource = getWorkSource(Binder.getCallingUid());
final long identity = Binder.clearCallingIdentity();
diff --git a/src/com/android/phone/RcsProvisioningMonitor.java b/src/com/android/phone/RcsProvisioningMonitor.java
index 8d975ec..9e30728 100644
--- a/src/com/android/phone/RcsProvisioningMonitor.java
+++ b/src/com/android/phone/RcsProvisioningMonitor.java
@@ -840,10 +840,9 @@
}
void unregisterRcsFeatureListener(RcsProvisioningInfo info) {
- int slotId = SubscriptionManager.getSlotIndex(info.getSubId());
- RcsFeatureListener cb = mRcsFeatureListeners.get(slotId);
- if (cb != null) {
- cb.removeRcsProvisioningInfo(info);
+ // make sure the info to be removed in any case, even the slotId changed or invalid.
+ for (int i = 0; i < mRcsFeatureListeners.size(); i++) {
+ mRcsFeatureListeners.valueAt(i).removeRcsProvisioningInfo(info);
}
}
diff --git a/src/com/android/phone/SimPhonebookProvider.java b/src/com/android/phone/SimPhonebookProvider.java
index 6a27130..4a15950 100644
--- a/src/com/android/phone/SimPhonebookProvider.java
+++ b/src/com/android/phone/SimPhonebookProvider.java
@@ -818,15 +818,15 @@
int efid;
if (efName != null) {
switch (efName) {
- case ElementaryFiles.EF_ADN_PATH_SEGMENT:
+ case ElementaryFiles.PATH_SEGMENT_EF_ADN:
efType = ElementaryFiles.EF_ADN;
efid = IccConstants.EF_ADN;
break;
- case ElementaryFiles.EF_FDN_PATH_SEGMENT:
+ case ElementaryFiles.PATH_SEGMENT_EF_FDN:
efType = ElementaryFiles.EF_FDN;
efid = IccConstants.EF_FDN;
break;
- case ElementaryFiles.EF_SDN_PATH_SEGMENT:
+ case ElementaryFiles.PATH_SEGMENT_EF_SDN:
efType = ElementaryFiles.EF_SDN;
efid = IccConstants.EF_SDN;
break;
diff --git a/src/com/android/phone/callcomposer/CallComposerPictureManager.java b/src/com/android/phone/callcomposer/CallComposerPictureManager.java
index 818994a..efb149e 100644
--- a/src/com/android/phone/callcomposer/CallComposerPictureManager.java
+++ b/src/com/android/phone/callcomposer/CallComposerPictureManager.java
@@ -96,7 +96,8 @@
InputStream input,
Executor executor,
OutcomeReceiver<Uri, CallLog.CallComposerLoggingException> callback) {
- CallLog.storeCallComposerPictureAsUser(context, user, input, executor, callback);
+ CallLog.storeCallComposerPicture(context.createContextAsUser(user, 0),
+ input, executor, callback);
}
}
diff --git a/src/com/android/phone/settings/fdn/BaseFdnContactScreen.java b/src/com/android/phone/settings/fdn/BaseFdnContactScreen.java
new file mode 100644
index 0000000..5beff34
--- /dev/null
+++ b/src/com/android/phone/settings/fdn/BaseFdnContactScreen.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.phone.settings.fdn;
+
+import static android.view.Window.PROGRESS_VISIBILITY_OFF;
+import static android.view.Window.PROGRESS_VISIBILITY_ON;
+
+import android.app.Activity;
+import android.app.FragmentManager;
+import android.app.FragmentTransaction;
+import android.content.AsyncQueryHandler;
+import android.content.ContentResolver;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.AsyncResult;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+import android.view.Window;
+import android.widget.Toast;
+
+import com.android.internal.telephony.CommandException;
+import com.android.internal.telephony.Phone;
+import com.android.phone.PhoneGlobals;
+import com.android.phone.R;
+import com.android.phone.SubscriptionInfoHelper;
+
+/**
+ * Base activity for FDN contact screen.
+ */
+public abstract class BaseFdnContactScreen extends Activity
+ implements Pin2LockedDialogFragment.Listener {
+ protected static final String LOG_TAG = PhoneGlobals.LOG_TAG;
+ protected static final boolean DBG = false;
+
+ protected static final int EVENT_PIN2_ENTRY_COMPLETE = 10;
+ protected static final int PIN2_REQUEST_CODE = 100;
+
+ protected static final String INTENT_EXTRA_NAME = "name";
+ protected static final String INTENT_EXTRA_NUMBER = "number";
+
+ protected String mName;
+ protected String mNumber;
+ protected String mPin2;
+
+ protected SubscriptionInfoHelper mSubscriptionInfoHelper;
+ protected BaseFdnContactScreen.QueryHandler mQueryHandler;
+
+ protected Handler mHandler = new Handler();
+ protected Phone mPhone;
+
+ protected abstract void pin2AuthenticationSucceed();
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ resolveIntent();
+ getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+ }
+
+ protected void authenticatePin2() {
+ Intent intent = new Intent();
+ intent.setClass(this, GetPin2Screen.class);
+ intent.setData(FdnList.getContentUri(mSubscriptionInfoHelper));
+ startActivityForResult(intent, PIN2_REQUEST_CODE);
+ }
+
+ protected void displayProgress(boolean flag) {
+ getWindow().setFeatureInt(
+ Window.FEATURE_INDETERMINATE_PROGRESS,
+ flag ? PROGRESS_VISIBILITY_ON : PROGRESS_VISIBILITY_OFF);
+ }
+
+ protected void handleResult(boolean success) {
+ }
+
+ protected void handleResult(boolean success, boolean invalidNumber) {
+ }
+
+ protected void log(String msg) {
+ Log.d(LOG_TAG, getClass().getSimpleName() + " : " + msg);
+ }
+
+ // Add method to check if Pin2 supplied is correct.
+ protected void processPin2(String pin) {
+ Message onComplete = mFDNHandler
+ .obtainMessage(EVENT_PIN2_ENTRY_COMPLETE);
+ mPhone.getIccCard().supplyPin2(pin, onComplete);
+ }
+
+ protected void resolveIntent() {
+ Intent intent = getIntent();
+
+ mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, intent);
+ mPhone = mSubscriptionInfoHelper.getPhone();
+
+ mName = intent.getStringExtra(INTENT_EXTRA_NAME);
+ mNumber = intent.getStringExtra(INTENT_EXTRA_NUMBER);
+ }
+
+ /**
+ * Removed the status field, with preference to displaying a toast
+ * to match the rest of settings UI.
+ */
+ protected void showStatus(CharSequence statusMsg) {
+ if (statusMsg != null) {
+ Toast.makeText(this, statusMsg, Toast.LENGTH_LONG).show();
+ }
+ }
+
+ private Handler mFDNHandler = new Handler() {
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case EVENT_PIN2_ENTRY_COMPLETE:
+ AsyncResult ar = (AsyncResult) msg.obj;
+ if (ar.exception != null) {
+ // see if PUK2 is requested and alert the user accordingly.
+ CommandException ce = (CommandException) ar.exception;
+ if (ce.getCommandError() == CommandException.Error.SIM_PUK2) {
+ // make sure we set the PUK2 state so that we can skip some
+ // redundant behaviour.
+ showPin2LockedDialog();
+ } else {
+ final int attemptsRemaining = msg.arg1;
+ if (attemptsRemaining > 0) {
+ Toast.makeText(
+ BaseFdnContactScreen.this,
+ getString(R.string.pin2_invalid)
+ + getString(R.string.pin2_attempts,
+ attemptsRemaining), Toast.LENGTH_LONG)
+ .show();
+ finish();
+ }
+ }
+ } else {
+ pin2AuthenticationSucceed();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ };
+
+ protected class QueryHandler extends AsyncQueryHandler {
+ protected QueryHandler(ContentResolver cr) {
+ super(cr);
+ }
+
+ @Override
+ protected void onInsertComplete(int token, Object cookie, Uri uri) {
+ if (DBG) log("onInsertComplete");
+ displayProgress(false);
+ handleResult(uri != null, false);
+ }
+
+ @Override
+ protected void onUpdateComplete(int token, Object cookie, int result) {
+ if (DBG) log("onUpdateComplete");
+ displayProgress(false);
+ handleResult(result > 0, false);
+ }
+
+ @Override
+ protected void onDeleteComplete(int token, Object cookie, int result) {
+ if (DBG) log("onDeleteComplete");
+ displayProgress(false);
+ handleResult(result > 0);
+ }
+ }
+
+ private void showPin2LockedDialog() {
+ final FragmentManager fragmentManager = getFragmentManager();
+ Pin2LockedDialogFragment dialogFragment = (Pin2LockedDialogFragment) fragmentManager
+ .findFragmentByTag(Pin2LockedDialogFragment.TAG_PIN2_LOCKED_DIALOG);
+ if (dialogFragment == null) {
+ dialogFragment = new Pin2LockedDialogFragment();
+ Bundle args = new Bundle();
+ args.putInt(Pin2LockedDialogFragment.KEY_DIALOG_ID,
+ Pin2LockedDialogFragment.DIALOG_ID_PUK2_REQUESTED_ON_PIN_ENTRY);
+ dialogFragment.setArguments(args);
+ dialogFragment.show(fragmentManager, Pin2LockedDialogFragment.TAG_PIN2_LOCKED_DIALOG);
+ } else {
+ FragmentTransaction transaction = fragmentManager.beginTransaction();
+ transaction.show(dialogFragment);
+ transaction.commitNow();
+ }
+ }
+
+ @Override
+ public void onRequestPuk2(int id) {
+ finish();
+ }
+}
diff --git a/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java b/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java
index 8b17cfb..7cd4c93 100644
--- a/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java
+++ b/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java
@@ -16,58 +16,24 @@
package com.android.phone.settings.fdn;
-import static android.view.Window.PROGRESS_VISIBILITY_OFF;
-import static android.view.Window.PROGRESS_VISIBILITY_ON;
-
-import android.app.Activity;
-import android.content.AsyncQueryHandler;
-import android.content.ContentResolver;
import android.content.Intent;
-import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Handler;
import android.text.TextUtils;
-import android.util.Log;
-import android.view.Window;
-import android.widget.Toast;
-import com.android.phone.PhoneGlobals;
import com.android.phone.R;
-import com.android.phone.SubscriptionInfoHelper;
/**
* Activity to let the user delete an FDN contact.
*/
-public class DeleteFdnContactScreen extends Activity {
- private static final String LOG_TAG = PhoneGlobals.LOG_TAG;
- private static final boolean DBG = false;
-
- private static final String INTENT_EXTRA_NAME = "name";
- private static final String INTENT_EXTRA_NUMBER = "number";
-
- private static final int PIN2_REQUEST_CODE = 100;
-
- private SubscriptionInfoHelper mSubscriptionInfoHelper;
-
- private String mName;
- private String mNumber;
- private String mPin2;
-
- protected QueryHandler mQueryHandler;
-
- private Handler mHandler = new Handler();
+public class DeleteFdnContactScreen extends BaseFdnContactScreen {
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
- resolveIntent();
-
// Starts PIN2 authentication only for the first time.
if (icicle == null) authenticatePin2();
-
- getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.delete_fdn_contact_screen);
}
@@ -80,9 +46,7 @@
Bundle extras = (intent != null) ? intent.getExtras() : null;
if (extras != null) {
mPin2 = extras.getString("pin2");
- showStatus(getResources().getText(
- R.string.deleting_fdn_contact));
- deleteContact();
+ processPin2(mPin2);
} else {
// if they cancelled, then we just cancel too.
if (DBG) log("onActivityResult: CANCELLED");
@@ -93,13 +57,9 @@
}
}
- private void resolveIntent() {
- Intent intent = getIntent();
-
- mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, intent);
-
- mName = intent.getStringExtra(INTENT_EXTRA_NAME);
- mNumber = intent.getStringExtra(INTENT_EXTRA_NUMBER);
+ @Override
+ protected void resolveIntent() {
+ super.resolveIntent();
if (TextUtils.isEmpty(mNumber)) {
finish();
@@ -127,29 +87,8 @@
displayProgress(true);
}
- private void authenticatePin2() {
- Intent intent = new Intent();
- intent.setClass(this, GetPin2Screen.class);
- intent.setData(FdnList.getContentUri(mSubscriptionInfoHelper));
- startActivityForResult(intent, PIN2_REQUEST_CODE);
- }
-
- private void displayProgress(boolean flag) {
- getWindow().setFeatureInt(
- Window.FEATURE_INDETERMINATE_PROGRESS,
- flag ? PROGRESS_VISIBILITY_ON : PROGRESS_VISIBILITY_OFF);
- }
-
- // Replace the status field with a toast to make things appear similar
- // to the rest of the settings. Removed the useless status field.
- private void showStatus(CharSequence statusMsg) {
- if (statusMsg != null) {
- Toast.makeText(this, statusMsg, Toast.LENGTH_SHORT)
- .show();
- }
- }
-
- private void handleResult(boolean success) {
+ @Override
+ protected void handleResult(boolean success) {
if (success) {
if (DBG) log("handleResult: success!");
showStatus(getResources().getText(R.string.fdn_contact_deleted));
@@ -157,43 +96,12 @@
if (DBG) log("handleResult: failed!");
showStatus(getResources().getText(R.string.pin2_invalid));
}
-
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- finish();
- }
- }, 2000);
-
+ mHandler.postDelayed(() -> finish(), 2000);
}
- private class QueryHandler extends AsyncQueryHandler {
- public QueryHandler(ContentResolver cr) {
- super(cr);
- }
-
- @Override
- protected void onQueryComplete(int token, Object cookie, Cursor c) {
- }
-
- @Override
- protected void onInsertComplete(int token, Object cookie, Uri uri) {
- }
-
- @Override
- protected void onUpdateComplete(int token, Object cookie, int result) {
- }
-
- @Override
- protected void onDeleteComplete(int token, Object cookie, int result) {
- if (DBG) log("onDeleteComplete");
- displayProgress(false);
- handleResult(result > 0);
- }
-
- }
-
- private void log(String msg) {
- Log.d(LOG_TAG, "[DeleteFdnContact] " + msg);
+ @Override
+ protected void pin2AuthenticationSucceed() {
+ showStatus(getResources().getText(R.string.deleting_fdn_contact));
+ deleteContact();
}
}
diff --git a/src/com/android/phone/settings/fdn/EditFdnContactScreen.java b/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
index 140cc74..468d38f 100644
--- a/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
+++ b/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
@@ -16,21 +16,18 @@
package com.android.phone.settings.fdn;
-import static android.view.Window.PROGRESS_VISIBILITY_OFF;
-import static android.view.Window.PROGRESS_VISIBILITY_ON;
-import android.app.Activity;
-import android.content.AsyncQueryHandler;
-import android.content.ContentResolver;
+import static android.app.Activity.RESULT_OK;
+
import android.content.ContentValues;
import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Handler;
import android.os.PersistableBundle;
import android.provider.ContactsContract.CommonDataKinds;
+import android.telephony.CarrierConfigManager;
import android.telephony.PhoneNumberUtils;
import android.text.Editable;
import android.text.Selection;
@@ -42,50 +39,31 @@
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
-import android.widget.Toast;
import com.android.internal.telephony.PhoneFactory;
import com.android.phone.PhoneGlobals;
import com.android.phone.R;
-import com.android.phone.SubscriptionInfoHelper;
-import android.telephony.CarrierConfigManager;
/**
* Activity to let the user add or edit an FDN contact.
*/
-public class EditFdnContactScreen extends Activity {
- private static final String LOG_TAG = PhoneGlobals.LOG_TAG;
- private static final boolean DBG = false;
+public class EditFdnContactScreen extends BaseFdnContactScreen {
// Menu item codes
private static final int MENU_IMPORT = 1;
private static final int MENU_DELETE = 2;
- private static final String INTENT_EXTRA_NAME = "name";
- private static final String INTENT_EXTRA_NUMBER = "number";
-
- private static final int PIN2_REQUEST_CODE = 100;
-
- private SubscriptionInfoHelper mSubscriptionInfoHelper;
-
- private String mName;
- private String mNumber;
- private String mPin2;
private boolean mAddContact;
- private QueryHandler mQueryHandler;
private EditText mNameField;
private EditText mNumberField;
private LinearLayout mPinFieldContainer;
private Button mButton;
- private Handler mHandler = new Handler();
-
/**
* Constants used in importing from contacts
*/
@@ -108,13 +86,10 @@
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
- resolveIntent();
-
- getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.edit_fdn_contact_screen);
setupView();
setTitle(mAddContact ? R.string.add_fdn_contact : R.string.edit_fdn_contact);
- PersistableBundle b = null;
+ PersistableBundle b;
if (mSubscriptionInfoHelper.hasSubId()) {
b = PhoneGlobals.getInstance().getCarrierConfigForSubId(
mSubscriptionInfoHelper.getSubId());
@@ -145,11 +120,7 @@
Bundle extras = (intent != null) ? intent.getExtras() : null;
if (extras != null) {
mPin2 = extras.getString("pin2");
- if (mAddContact) {
- addContact();
- } else {
- updateContact();
- }
+ processPin2(mPin2);
} else if (resultCode != RESULT_OK) {
// if they cancelled, then we just cancel too.
if (DBG) log("onActivityResult: cancelled.");
@@ -231,20 +202,15 @@
return super.onOptionsItemSelected(item);
}
- private void resolveIntent() {
- Intent intent = getIntent();
-
- mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, intent);
-
- mName = intent.getStringExtra(INTENT_EXTRA_NAME);
- mNumber = intent.getStringExtra(INTENT_EXTRA_NUMBER);
-
+ @Override
+ protected void resolveIntent() {
+ super.resolveIntent();
mAddContact = TextUtils.isEmpty(mNumber);
}
/**
* We have multiple layouts, one to indicate that the user needs to
- * open the keyboard to enter information (if the keybord is hidden).
+ * open the keyboard to enter information (if the keyboard is hidden).
* So, we need to make sure that the layout here matches that in the
* layout file.
*/
@@ -374,36 +340,18 @@
finish();
}
- private void authenticatePin2() {
- Intent intent = new Intent();
- intent.setClass(this, GetPin2Screen.class);
- intent.setData(FdnList.getContentUri(mSubscriptionInfoHelper));
- startActivityForResult(intent, PIN2_REQUEST_CODE);
- }
-
- private void displayProgress(boolean flag) {
+ @Override
+ protected void displayProgress(boolean flag) {
+ super.displayProgress(flag);
// indicate we are busy.
mDataBusy = flag;
- getWindow().setFeatureInt(
- Window.FEATURE_INDETERMINATE_PROGRESS,
- mDataBusy ? PROGRESS_VISIBILITY_ON : PROGRESS_VISIBILITY_OFF);
// make sure we don't allow calls to save when we're
// not ready for them.
mButton.setClickable(!mDataBusy);
}
- /**
- * Removed the status field, with preference to displaying a toast
- * to match the rest of settings UI.
- */
- private void showStatus(CharSequence statusMsg) {
- if (statusMsg != null) {
- Toast.makeText(this, statusMsg, Toast.LENGTH_LONG)
- .show();
- }
- }
-
- private void handleResult(boolean success, boolean invalidNumber) {
+ @Override
+ protected void handleResult(boolean success, boolean invalidNumber) {
if (success) {
if (DBG) log("handleResult: success!");
showStatus(getResources().getText(mAddContact ?
@@ -426,13 +374,7 @@
}
}
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- finish();
- }
- }, 2000);
-
+ mHandler.postDelayed(() -> finish(), 2000);
}
private final View.OnClickListener mClicked = new View.OnClickListener() {
@@ -486,35 +428,12 @@
}
};
- private class QueryHandler extends AsyncQueryHandler {
- public QueryHandler(ContentResolver cr) {
- super(cr);
+ @Override
+ protected void pin2AuthenticationSucceed() {
+ if (mAddContact) {
+ addContact();
+ } else {
+ updateContact();
}
-
- @Override
- protected void onQueryComplete(int token, Object cookie, Cursor c) {
- }
-
- @Override
- protected void onInsertComplete(int token, Object cookie, Uri uri) {
- if (DBG) log("onInsertComplete");
- displayProgress(false);
- handleResult(uri != null, false);
- }
-
- @Override
- protected void onUpdateComplete(int token, Object cookie, int result) {
- if (DBG) log("onUpdateComplete");
- displayProgress(false);
- handleResult(result > 0, false);
- }
-
- @Override
- protected void onDeleteComplete(int token, Object cookie, int result) {
- }
- }
-
- private void log(String msg) {
- Log.d(LOG_TAG, "[EditFdnContact] " + msg);
}
}
diff --git a/src/com/android/phone/settings/fdn/FdnSetting.java b/src/com/android/phone/settings/fdn/FdnSetting.java
index 8b5afa4..8f46c85 100644
--- a/src/com/android/phone/settings/fdn/FdnSetting.java
+++ b/src/com/android/phone/settings/fdn/FdnSetting.java
@@ -17,8 +17,8 @@
package com.android.phone.settings.fdn;
import android.app.ActionBar;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
+import android.app.FragmentManager;
+import android.app.FragmentTransaction;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
@@ -27,7 +27,6 @@
import android.preference.PreferenceScreen;
import android.util.Log;
import android.view.MenuItem;
-import android.view.WindowManager;
import android.widget.Toast;
import com.android.internal.telephony.CommandException;
@@ -42,7 +41,7 @@
* Rewritten to look and behave closer to the other preferences.
*/
public class FdnSetting extends PreferenceActivity
- implements EditPinPreference.OnPinEnteredListener, DialogInterface.OnCancelListener {
+ implements EditPinPreference.OnPinEnteredListener, Pin2LockedDialogFragment.Listener {
private static final String LOG_TAG = PhoneGlobals.LOG_TAG;
private static final boolean DBG = false;
@@ -56,6 +55,7 @@
*/
private static final int EVENT_PIN2_ENTRY_COMPLETE = 100;
private static final int EVENT_PIN2_CHANGE_COMPLETE = 200;
+ private static final int EVENT_PIN2_CHANGE_COMPLETE_TOGGLE_FDN = 300;
// String keys for preference lookup
private static final String BUTTON_FDN_ENABLE_KEY = "button_fdn_enable_key";
@@ -82,8 +82,11 @@
private static final String PIN_CHANGE_STATE_KEY = "pin_change_state_key";
private static final String OLD_PIN_KEY = "old_pin_key";
private static final String NEW_PIN_KEY = "new_pin_key";
+ private static final String PUK_KEY = "puk_key";
private static final String DIALOG_MESSAGE_KEY = "dialog_message_key";
private static final String DIALOG_PIN_ENTRY_KEY = "dialog_pin_entry_key";
+ private static final String FDN_DIALOG_MESSAGE_KEY = "fdn_dialog_message_key";
+ private static final String FDN_DIALOG_PIN_ENTRY_KEY = "fdn_dialog_pin_entry_key";
// size limits for the pin.
private static final int MIN_PIN_LENGTH = 4;
@@ -94,10 +97,10 @@
*/
@Override
public void onPinEntered(EditPinPreference preference, boolean positiveResult) {
- if (preference == mButtonEnableFDN) {
+ if (preference == mButtonEnableFDN && (!mIsPuk2Locked || !positiveResult)) {
toggleFDNEnable(positiveResult);
- } else if (preference == mButtonChangePin2){
- updatePINChangeState(positiveResult);
+ } else {
+ updatePINChangeState(preference, positiveResult);
}
}
@@ -106,6 +109,12 @@
*/
private void toggleFDNEnable(boolean positiveResult) {
if (!positiveResult) {
+ // reset the state on cancel, either to expect PUK2 or PIN2
+ if (!mIsPuk2Locked) {
+ resetPinChangeState();
+ } else {
+ resetPinChangeStateForPUK2();
+ }
return;
}
@@ -129,10 +138,10 @@
/**
* Attempt to change the pin.
*/
- private void updatePINChangeState(boolean positiveResult) {
+ private void updatePINChangeState(EditPinPreference button, boolean positiveResult) {
if (DBG) log("updatePINChangeState positive=" + positiveResult
+ " mPinChangeState=" + mPinChangeState
- + " mSkipOldPin=" + mIsPuk2Locked);
+ + " mIsPuk2Locked=" + mIsPuk2Locked);
if (!positiveResult) {
// reset the state on cancel, either to expect PUK2 or PIN2
@@ -155,80 +164,95 @@
// appears with text to indicate what the issue is.
switch (mPinChangeState) {
case PIN_CHANGE_OLD:
- mOldPin = mButtonChangePin2.getText();
- mButtonChangePin2.setText("");
+ mOldPin = button.getText();
+ button.setText("");
// if the pin is not valid, display a message and reset the state.
if (validatePin (mOldPin, false)) {
mPinChangeState = PIN_CHANGE_NEW;
- displayPinChangeDialog();
+ displayPinChangeDialog(button);
} else {
- displayPinChangeDialog(R.string.invalidPin2, true);
+ displayPinChangeDialog(button, R.string.invalidPin2, true);
}
break;
case PIN_CHANGE_NEW:
- mNewPin = mButtonChangePin2.getText();
- mButtonChangePin2.setText("");
+ mNewPin = button.getText();
+ button.setText("");
// if the new pin is not valid, display a message and reset the state.
if (validatePin (mNewPin, false)) {
mPinChangeState = PIN_CHANGE_REENTER;
- displayPinChangeDialog();
+ displayPinChangeDialog(button);
} else {
- displayPinChangeDialog(R.string.invalidPin2, true);
+ displayPinChangeDialog(button, R.string.invalidPin2, true);
}
break;
case PIN_CHANGE_REENTER:
- // if the re-entered pin is not valid, display a message and reset the state.
- if (!mNewPin.equals(mButtonChangePin2.getText())) {
- mPinChangeState = PIN_CHANGE_NEW;
- mButtonChangePin2.setText("");
- displayPinChangeDialog(R.string.mismatchPin2, true);
+ if (validatePin(button.getText(), false)) {
+ // if the re-entered pin is not valid, display a message and reset the state.
+ if (!mNewPin.equals(button.getText())) {
+ mPinChangeState = PIN_CHANGE_NEW;
+ button.setText("");
+ displayPinChangeDialog(button, R.string.mismatchPin2, true);
+ } else {
+ // If the PIN is valid, then we submit the change PIN request or
+ // display the PUK2 dialog if we KNOW that we're PUK2 locked.
+ button.setText("");
+ Message onComplete = mFDNHandler.obtainMessage(
+ EVENT_PIN2_CHANGE_COMPLETE);
+ if (!mIsPuk2Locked) {
+ mPhone.getIccCard().changeIccFdnPassword(mOldPin,
+ mNewPin, onComplete);
+ } else {
+ mPhone.getIccCard().supplyPuk2(mPuk2, mNewPin,
+ onComplete);
+ }
+ }
} else {
- // If the PIN is valid, then we submit the change PIN request.
- mButtonChangePin2.setText("");
- Message onComplete = mFDNHandler.obtainMessage(
- EVENT_PIN2_CHANGE_COMPLETE);
- mPhone.getIccCard().changeIccFdnPassword(
- mOldPin, mNewPin, onComplete);
+ button.setText("");
+ displayPinChangeDialog(button, R.string.invalidPin2, true);
}
break;
- case PIN_CHANGE_PUK: {
- // Doh! too many incorrect requests, PUK requested.
- mPuk2 = mButtonChangePin2.getText();
- mButtonChangePin2.setText("");
- // if the puk is not valid, display
- // a message and reset the state.
- if (validatePin (mPuk2, true)) {
- mPinChangeState = PIN_CHANGE_NEW_PIN_FOR_PUK;
- displayPinChangeDialog();
- } else {
- displayPinChangeDialog(R.string.invalidPuk2, true);
- }
+ case PIN_CHANGE_PUK:
+ // Doh! too many incorrect requests, PUK requested.
+ mPuk2 = button.getText();
+ button.setText("");
+ // if the puk is not valid, display
+ // a message and reset the state.
+ if (validatePin(mPuk2, true)) {
+ mPinChangeState = PIN_CHANGE_NEW_PIN_FOR_PUK;
+ displayPinChangeDialog(button);
+ } else {
+ displayPinChangeDialog(button, R.string.invalidPuk2, true);
}
break;
case PIN_CHANGE_NEW_PIN_FOR_PUK:
- mNewPin = mButtonChangePin2.getText();
- mButtonChangePin2.setText("");
+ mNewPin = button.getText();
+ button.setText("");
// if the new pin is not valid, display
// a message and reset the state.
if (validatePin (mNewPin, false)) {
mPinChangeState = PIN_CHANGE_REENTER_PIN_FOR_PUK;
- displayPinChangeDialog();
+ displayPinChangeDialog(button);
} else {
- displayPinChangeDialog(R.string.invalidPin2, true);
+ displayPinChangeDialog(button, R.string.invalidPin2, true);
}
break;
case PIN_CHANGE_REENTER_PIN_FOR_PUK:
// if the re-entered pin is not valid, display
// a message and reset the state.
- if (!mNewPin.equals(mButtonChangePin2.getText())) {
+ if (!mNewPin.equals(button.getText())) {
mPinChangeState = PIN_CHANGE_NEW_PIN_FOR_PUK;
- mButtonChangePin2.setText("");
- displayPinChangeDialog(R.string.mismatchPin2, true);
+ button.setText("");
+ displayPinChangeDialog(button, R.string.mismatchPin2, true);
} else {
// Both puk2 and new pin2 are ready to submit
- mButtonChangePin2.setText("");
- Message onComplete = mFDNHandler.obtainMessage(
- EVENT_PIN2_CHANGE_COMPLETE);
+ Message onComplete = null;
+ if (button == mButtonChangePin2) {
+ button.setText("");
+ onComplete = mFDNHandler.obtainMessage(EVENT_PIN2_CHANGE_COMPLETE);
+ } else {
+ onComplete = mFDNHandler.obtainMessage(
+ EVENT_PIN2_CHANGE_COMPLETE_TOGGLE_FDN);
+ }
mPhone.getIccCard().supplyPuk2(mPuk2, mNewPin, onComplete);
}
break;
@@ -246,6 +270,7 @@
// when we are enabling FDN, either we are unsuccessful and display
// a toast, or just update the UI.
case EVENT_PIN2_ENTRY_COMPLETE: {
+ if (DBG) log("Handle EVENT_PIN2_ENTRY_COMPLETE");
AsyncResult ar = (AsyncResult) msg.obj;
if (ar.exception != null) {
if (ar.exception instanceof CommandException) {
@@ -255,11 +280,8 @@
((CommandException) ar.exception).getCommandError();
switch (e) {
case SIM_PUK2:
- // make sure we set the PUK2 state so that we can skip
- // some redundant behaviour.
- displayMessage(R.string.fdn_enable_puk2_requested,
- attemptsRemaining);
- resetPinChangeStateForPUK2();
+ showPin2OrPuk2LockedDialog(Pin2LockedDialogFragment
+ .DIALOG_ID_PUK2_REQUESTED_ON_PIN_ENTRY);
break;
case PASSWORD_INCORRECT:
displayMessage(R.string.pin2_invalid, attemptsRemaining);
@@ -279,7 +301,8 @@
// when changing the pin we need to pay attention to whether or not
// the error requests a PUK (usually after too many incorrect tries)
// Set the state accordingly.
- case EVENT_PIN2_CHANGE_COMPLETE: {
+ case EVENT_PIN2_CHANGE_COMPLETE:
+ case EVENT_PIN2_CHANGE_COMPLETE_TOGGLE_FDN: {
if (DBG)
log("Handle EVENT_PIN2_CHANGE_COMPLETE");
AsyncResult ar = (AsyncResult) msg.obj;
@@ -291,34 +314,24 @@
CommandException ce = (CommandException) ar.exception;
if (ce.getCommandError() == CommandException.Error.SIM_PUK2) {
// throw an alert dialog on the screen, displaying the
- // request for a PUK2. set the cancel listener to
- // FdnSetting.onCancel().
- AlertDialog a = new AlertDialog.Builder(FdnSetting.this)
- .setMessage(R.string.puk2_requested)
- .setCancelable(true)
- .setOnCancelListener(FdnSetting.this)
- .setNeutralButton(android.R.string.ok,
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog,
- int which) {
- resetPinChangeStateForPUK2();
- displayPinChangeDialog(0,true);
- }
- })
- .create();
- a.getWindow().addFlags(
- WindowManager.LayoutParams.FLAG_DIM_BEHIND);
- a.show();
+ // request for a PUK2.
+ showPin2OrPuk2LockedDialog(Pin2LockedDialogFragment
+ .DIALOG_ID_PUK2_REQUESTED_ON_PIN_CHANGED);
} else {
- // set the correct error message depending upon the state.
- // Reset the state depending upon or knowledge of the PUK state.
- if (!mIsPuk2Locked) {
- displayMessage(R.string.badPin2, attemptsRemaining);
- resetPinChangeState();
+ if (mIsPuk2Locked && attemptsRemaining == 0) {
+ showPin2OrPuk2LockedDialog(Pin2LockedDialogFragment
+ .DIALOG_ID_PUK2_LOCKED_OUT);
} else {
- displayMessage(R.string.badPuk2, attemptsRemaining);
- resetPinChangeStateForPUK2();
+ // set the correct error message depending upon the state.
+ // Reset the state depending upon or knowledge of the PUK
+ // state.
+ if (!mIsPuk2Locked) {
+ displayMessage(R.string.badPin2, attemptsRemaining);
+ resetPinChangeState();
+ } else {
+ displayMessage(R.string.badPuk2, attemptsRemaining);
+ resetPinChangeStateForPUK2();
+ }
}
}
} else {
@@ -332,28 +345,25 @@
}
// reset to normal behaviour on successful change.
+ if (msg.what == EVENT_PIN2_CHANGE_COMPLETE_TOGGLE_FDN) {
+ log("Handle EVENT_PIN2_CHANGE_COMPLETE_TOGGLE_FDN");
+ // activate/deactivate FDN
+ toggleFDNEnable(true);
+ }
resetPinChangeState();
}
}
+ mButtonChangePin2.setText("");
+ mButtonEnableFDN.setText("");
break;
}
}
};
/**
- * Cancel listener for the PUK2 request alert dialog.
- */
- @Override
- public void onCancel(DialogInterface dialog) {
- // set the state of the preference and then display the dialog.
- resetPinChangeStateForPUK2();
- displayPinChangeDialog(0, true);
- }
-
- /**
* Display a toast for message, like the rest of the settings.
*/
- private final void displayMessage(int strId, int attemptsRemaining) {
+ private void displayMessage(int strId, int attemptsRemaining) {
String s = getString(strId);
if ((strId == R.string.badPin2) || (strId == R.string.badPuk2) ||
(strId == R.string.pin2_invalid)) {
@@ -367,22 +377,27 @@
Toast.makeText(this, s, Toast.LENGTH_SHORT).show();
}
- private final void displayMessage(int strId) {
+ private void displayMessage(int strId) {
displayMessage(strId, -1);
}
/**
* The next two functions are for updating the message field on the dialog.
*/
- private final void displayPinChangeDialog() {
- displayPinChangeDialog(0, true);
+ private void displayPinChangeDialog(EditPinPreference button) {
+ displayPinChangeDialog(button, 0, true);
}
- private final void displayPinChangeDialog(int strId, boolean shouldDisplay) {
+ private void displayPinChangeDialog(EditPinPreference button,
+ int strId, boolean shouldDisplay) {
int msgId;
switch (mPinChangeState) {
case PIN_CHANGE_OLD:
- msgId = R.string.oldPin2Label;
+ if (button == mButtonEnableFDN) {
+ msgId = R.string.enter_pin2_text;
+ } else {
+ msgId = R.string.oldPin2Label;
+ }
break;
case PIN_CHANGE_NEW:
case PIN_CHANGE_NEW_PIN_FOR_PUK:
@@ -400,14 +415,14 @@
// append the note / additional message, if needed.
if (strId != 0) {
- mButtonChangePin2.setDialogMessage(getText(msgId) + "\n" + getText(strId));
+ button.setDialogMessage(getText(msgId) + "\n" + getText(strId));
} else {
- mButtonChangePin2.setDialogMessage(msgId);
+ button.setDialogMessage(msgId);
}
// only display if requested.
if (shouldDisplay) {
- mButtonChangePin2.showPinDialog();
+ button.showPinDialog();
}
}
@@ -417,7 +432,8 @@
private final void resetPinChangeState() {
if (DBG) log("resetPinChangeState");
mPinChangeState = PIN_CHANGE_OLD;
- displayPinChangeDialog(0, false);
+ displayPinChangeDialog(mButtonEnableFDN, 0, false);
+ displayPinChangeDialog(mButtonChangePin2, 0, false);
mOldPin = mNewPin = "";
mIsPuk2Locked = false;
}
@@ -428,7 +444,8 @@
private final void resetPinChangeStateForPUK2() {
if (DBG) log("resetPinChangeStateForPUK2");
mPinChangeState = PIN_CHANGE_PUK;
- displayPinChangeDialog(0, false);
+ displayPinChangeDialog(mButtonEnableFDN, 0, false);
+ displayPinChangeDialog(mButtonChangePin2, 0, false);
mOldPin = mNewPin = mPuk2 = "";
mIsPuk2Locked = true;
}
@@ -472,7 +489,10 @@
* Reflect the updated change PIN2 state in the UI.
*/
private void updateChangePIN2() {
- if (mPhone.getIccCard().getIccPin2Blocked()) {
+ if (mPhone.getIccCard().getIccPuk2Blocked()) {
+ showPin2OrPuk2LockedDialog(Pin2LockedDialogFragment.DIALOG_ID_PUK2_LOCKED_OUT);
+ resetPinChangeStateForPUK2();
+ } else if (mPhone.getIccCard().getIccPin2Blocked()) {
// If the pin2 is blocked, the state of the change pin2 dialog
// should be set for puk2 use (that is, the user should be prompted
// to enter puk2 code instead of old pin2).
@@ -514,8 +534,14 @@
mPinChangeState = icicle.getInt(PIN_CHANGE_STATE_KEY);
mOldPin = icicle.getString(OLD_PIN_KEY);
mNewPin = icicle.getString(NEW_PIN_KEY);
- mButtonChangePin2.setDialogMessage(icicle.getString(DIALOG_MESSAGE_KEY));
- mButtonChangePin2.setText(icicle.getString(DIALOG_PIN_ENTRY_KEY));
+ mPuk2 = icicle.getString(PUK_KEY);
+ mButtonChangePin2.setDialogMessage(
+ icicle.getString(DIALOG_MESSAGE_KEY));
+ mButtonChangePin2.setText(
+ icicle.getString(DIALOG_PIN_ENTRY_KEY));
+ mButtonEnableFDN.setDialogMessage(
+ icicle.getString(FDN_DIALOG_MESSAGE_KEY));
+ mButtonEnableFDN.setText(icicle.getString(FDN_DIALOG_PIN_ENTRY_KEY));
}
ActionBar actionBar = getActionBar();
@@ -545,8 +571,19 @@
out.putInt(PIN_CHANGE_STATE_KEY, mPinChangeState);
out.putString(OLD_PIN_KEY, mOldPin);
out.putString(NEW_PIN_KEY, mNewPin);
- out.putString(DIALOG_MESSAGE_KEY, mButtonChangePin2.getDialogMessage().toString());
- out.putString(DIALOG_PIN_ENTRY_KEY, mButtonChangePin2.getText());
+ out.putString(PUK_KEY, mPuk2);
+ if (mButtonChangePin2.isEnabled()) {
+ out.putString(DIALOG_MESSAGE_KEY, mButtonChangePin2.getDialogMessage().toString());
+ out.putString(DIALOG_PIN_ENTRY_KEY, mButtonChangePin2.getText());
+ }
+ if (mButtonEnableFDN.isEnabled()) {
+ CharSequence dialogMsg = mButtonEnableFDN.getDialogMessage();
+ if (dialogMsg != null) {
+ out.putString(FDN_DIALOG_MESSAGE_KEY,
+ mButtonEnableFDN.getDialogMessage().toString());
+ }
+ out.putString(FDN_DIALOG_PIN_ENTRY_KEY, mButtonEnableFDN.getText());
+ }
}
@Override
@@ -562,5 +599,31 @@
private void log(String msg) {
Log.d(LOG_TAG, "FdnSetting: " + msg);
}
+
+ @Override
+ public void onRequestPuk2(int id) {
+ resetPinChangeStateForPUK2();
+ final EditPinPreference button =
+ (id == Pin2LockedDialogFragment.DIALOG_ID_PUK2_REQUESTED_ON_PIN_CHANGED)
+ ? mButtonChangePin2 : mButtonEnableFDN;
+ displayPinChangeDialog(button, 0, true);
+ }
+
+ private void showPin2OrPuk2LockedDialog(int id) {
+ final FragmentManager fragmentManager = getFragmentManager();
+ Pin2LockedDialogFragment dialogFragment = (Pin2LockedDialogFragment) fragmentManager
+ .findFragmentByTag(Pin2LockedDialogFragment.TAG_PIN2_LOCKED_DIALOG);
+ if (dialogFragment == null) {
+ dialogFragment = new Pin2LockedDialogFragment();
+ Bundle args = new Bundle();
+ args.putInt(Pin2LockedDialogFragment.KEY_DIALOG_ID, id);
+ dialogFragment.setArguments(args);
+ dialogFragment.show(fragmentManager, Pin2LockedDialogFragment.TAG_PIN2_LOCKED_DIALOG);
+ } else {
+ FragmentTransaction transaction = fragmentManager.beginTransaction();
+ transaction.show(dialogFragment);
+ transaction.commitNow();
+ }
+ }
}
diff --git a/src/com/android/phone/settings/fdn/Pin2LockedDialogFragment.java b/src/com/android/phone/settings/fdn/Pin2LockedDialogFragment.java
new file mode 100644
index 0000000..ff16a7f
--- /dev/null
+++ b/src/com/android/phone/settings/fdn/Pin2LockedDialogFragment.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.phone.settings.fdn;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.view.WindowManager;
+
+import com.android.phone.R;
+
+/**
+ * Dialog Fragment that displays dialogs indicating that PIN2/PUK2 has been locked out.
+ *
+ * 1. When user fails PIN2 authentication and PIN2 is locked, show the dialog indicating that PIN2
+ * is locked and PUK2 must be entered.
+ * 2. When user fails PUK2 authentication and PUK2 is locked, show the dialog indicating that PUK2
+ * is locked and user must contact service provider to unlock PUK2.
+ */
+public class Pin2LockedDialogFragment extends DialogFragment {
+
+ static final String TAG_PIN2_LOCKED_DIALOG = "tag_pin2_locked_dialog";
+ static final String KEY_DIALOG_ID = "key_dialog_id";
+
+ // AlertDialog IDs
+ static final int DIALOG_ID_PUK2_LOCKED_OUT = 10;
+ static final int DIALOG_ID_PUK2_REQUESTED_ON_PIN_ENTRY = 11;
+ static final int DIALOG_ID_PUK2_REQUESTED_ON_PIN_CHANGED = 12;
+
+ private Listener mListener;
+ private int mId;
+
+ interface Listener {
+ void onRequestPuk2(int id);
+ }
+
+ @Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ super.onCreateDialog(savedInstanceState);
+ Activity activity = getActivity();
+ if (!(activity instanceof Listener)) {
+ return null;
+ }
+ mListener = (Listener) activity;
+ mId = getArguments().getInt(KEY_DIALOG_ID);
+
+ if (mId == DIALOG_ID_PUK2_LOCKED_OUT) {
+ AlertDialog alert = new AlertDialog.Builder(activity)
+ .setMessage(R.string.puk2_locked)
+ .setCancelable(true)
+ .create();
+ alert.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
+ alert.setButton(DialogInterface.BUTTON_NEUTRAL, getText(R.string.ok),
+ (dialog, which) -> {
+ });
+ return alert;
+ }
+
+ if (mId == DIALOG_ID_PUK2_REQUESTED_ON_PIN_CHANGED
+ || mId == DIALOG_ID_PUK2_REQUESTED_ON_PIN_ENTRY) {
+ AlertDialog alert = new AlertDialog.Builder(activity)
+ .setMessage(R.string.puk2_requested)
+ .setCancelable(true)
+ .create();
+ alert.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
+ alert.setButton(DialogInterface.BUTTON_NEUTRAL, getText(R.string.ok),
+ (dialog, which) -> {
+ mListener.onRequestPuk2(mId);
+ dialog.dismiss();
+ });
+ return alert;
+ }
+ return null;
+ }
+
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ if (mId == DIALOG_ID_PUK2_REQUESTED_ON_PIN_CHANGED
+ || mId == DIALOG_ID_PUK2_REQUESTED_ON_PIN_ENTRY) {
+ mListener.onRequestPuk2(mId);
+ }
+ dialog.dismiss();
+ }
+}
+
diff --git a/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java b/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java
index c42472d..daafeb2 100644
--- a/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java
+++ b/src/com/android/services/telephony/rcs/MessageTransportStateTracker.java
@@ -190,7 +190,7 @@
* dialog be released as the SIP dialog is now closed.
*/
@Override
- public void closeDialog(String callId) {
+ public void cleanupSession(String callId) {
long token = Binder.clearCallingIdentity();
try {
mExecutor.execute(() -> {
@@ -202,7 +202,7 @@
try {
// TODO track the SIP Dialogs created/destroyed on the associated
// SipDelegate.
- mSipDelegate.closeDialog(callId);
+ mSipDelegate.cleanupSession(callId);
} catch (RemoteException e) {
logw("SipDelegate not available when closeDialog was called "
+ "for call id: " + callId);
diff --git a/testapps/TestRcsApp/TestApp/Android.bp b/testapps/TestRcsApp/TestApp/Android.bp
index 4496a8e..cda7d17 100644
--- a/testapps/TestRcsApp/TestApp/Android.bp
+++ b/testapps/TestRcsApp/TestApp/Android.bp
@@ -21,6 +21,8 @@
"libphonenumber-platform"
],
+ libs: ["org.apache.http.legacy"],
+
certificate: "platform",
privileged: true,
product_specific: true,
diff --git a/testapps/TestRcsApp/TestApp/AndroidManifest.xml b/testapps/TestRcsApp/TestApp/AndroidManifest.xml
index 460a1ce..7538df7 100644
--- a/testapps/TestRcsApp/TestApp/AndroidManifest.xml
+++ b/testapps/TestRcsApp/TestApp/AndroidManifest.xml
@@ -19,8 +19,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.sample.rcsclient"
- android:versionCode="12"
- android:versionName="1.0.11">
+ android:versionCode="13"
+ android:versionName="1.0.12">
<uses-sdk
android:minSdkVersion="30"
diff --git a/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/FileUploadActivity.java b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/FileUploadActivity.java
index 3bc1c24..b9078f8 100644
--- a/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/FileUploadActivity.java
+++ b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/FileUploadActivity.java
@@ -156,6 +156,7 @@
Log.i(TAG, "FileTransferController null");
return;
}
+ mUploadResult.setText("");
Futures.addCallback(
fileTransferController.uploadFile(UUID.randomUUID().toString(),
mFile),
diff --git a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/FileUploadController.java b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/FileUploadController.java
index d8e38e0..0d45828 100644
--- a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/FileUploadController.java
+++ b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/FileUploadController.java
@@ -34,10 +34,11 @@
import com.google.common.util.concurrent.MoreExecutors;
import org.apache.http.Header;
-import org.apache.http.HeaderElement;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.auth.AUTH;
+import org.apache.http.auth.AuthScheme;
+import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.params.AuthPolicy;
@@ -96,7 +97,7 @@
ListenableFuture<HttpResponse> initialResponseFuture = sendEmptyPost(httpClient);
BasicHttpContext httpContext = new BasicHttpContext();
- ListenableFuture<Void> prepareAuthFuture =
+ ListenableFuture<AuthScheme> prepareAuthFuture =
Futures.transform(
initialResponseFuture,
initialResponse -> {
@@ -117,17 +118,16 @@
// Override nonce and realm in the HTTP context.
RFC2617Scheme authScheme = createAuthScheme(initialResponse);
httpContext.setAttribute(ATTRIBUTE_PREEMPTIVE_AUTH, authScheme);
-
- return null;
+ return authScheme;
},
executor);
// Executing the post with credentials.
return Futures.transformAsync(
prepareAuthFuture,
- unused ->
+ authScheme ->
executeAuthenticatedPost(
- httpClient, httpContext, transactionId, file),
+ httpClient, httpContext, authScheme, transactionId, file),
executor);
}
@@ -141,27 +141,12 @@
String scheme = authHeader.getValue();
if (scheme.contains(AuthPolicy.DIGEST)) {
- HeaderElement[] elements = authHeader.getElements();
-
- if (elements == null || elements.length == 0) {
- throw new IllegalArgumentException(
- "Unable to find header elements. Cannot perform Digest authentication.");
- }
-
DigestScheme digestScheme = new DigestScheme();
- for (HeaderElement element : elements) {
- // TODO(b/180601658): Add checks for the realm, which should start with
- // 3GPP-bootstrapping@.
- if (element.getName().contains(PARAM_REALM)) {
- digestScheme.overrideParamter(PARAM_REALM, element.getValue());
- Log.i(TAG, "Realm: " + element.getValue());
- }
- if (element.getName().contains(PARAM_NONCE)) {
- digestScheme.overrideParamter(PARAM_NONCE, element.getValue());
- Log.i(TAG, "Nonce: " + element.getValue());
- }
+ try {
+ digestScheme.processChallenge(authHeader);
+ } catch (MalformedChallengeException e) {
+ throw new IllegalArgumentException(e);
}
-
return digestScheme;
} else {
throw new IllegalArgumentException("Unable to create authentication scheme " + scheme);
@@ -195,13 +180,14 @@
private ListenableFuture<String> executeAuthenticatedPost(
DefaultHttpClient httpClient,
HttpContext context,
+ AuthScheme authScheme,
String transactionId,
File file)
throws IOException {
Part[] parts = {
new StringPart(TRANSFER_ID_PART_NAME, transactionId),
- new FilePart(file.getName(), file)
+ new FilePart(FILE_PART_NAME, file)
};
MultipartEntity entity = new MultipartEntity(parts);
@@ -211,7 +197,8 @@
Log.i(TAG, "Created file upload POST:" + contentServerUri);
ListenableFuture<HttpResponse> responseFuture =
- requestExecutor.executeAuthenticatedRequest(httpClient, context, postRequest);
+ requestExecutor.executeAuthenticatedRequest(httpClient, context, postRequest,
+ authScheme);
Futures.addCallback(
responseFuture,
@@ -227,7 +214,7 @@
@Override
public void onFailure(Throwable t) {
- Log.i(TAG, "onFailure");
+ Log.e(TAG, "onFailure", t);
throw new IllegalArgumentException(t);
}
},
diff --git a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaAuthenticationProvider.java b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaAuthenticationProvider.java
index 0bfa4cb..008fb76 100644
--- a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaAuthenticationProvider.java
+++ b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaAuthenticationProvider.java
@@ -64,11 +64,12 @@
Log.i(TAG, "organization:" + organization + ", protocol:" + protocol + ", cipherSuite:"
+ cipherSuite + ", contentServerUrl:" + contentServerUrl);
- builder.setOrg(UaSecurityProtocolIdentifier.ORG_3GPP)
- .setProtocol(
- UaSecurityProtocolIdentifier.UA_SECURITY_PROTOCOL_3GPP_TLS_DEFAULT);
+ builder.setOrg(organization)
+ .setProtocol(protocol);
if (cipherSuite == TlsParams.TLS_NULL_WITH_NULL_NULL) {
builder.setTlsCipherSuite(TlsParams.TLS_RSA_WITH_AES_128_CBC_SHA);
+ } else {
+ builder.setTlsCipherSuite(cipherSuite);
}
} catch (IllegalArgumentException e) {
Log.e(TAG, e.getMessage());
diff --git a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaRequestExecutor.java b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaRequestExecutor.java
index 856fec1..83d5a8a 100644
--- a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaRequestExecutor.java
+++ b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/GbaRequestExecutor.java
@@ -24,9 +24,12 @@
import com.google.common.util.concurrent.MoreExecutors;
import org.apache.http.HttpResponse;
+import org.apache.http.auth.AuthScheme;
import org.apache.http.auth.AuthScope;
+import org.apache.http.auth.AuthState;
import org.apache.http.auth.Credentials;
import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.client.protocol.ClientContext;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.protocol.HttpContext;
@@ -48,7 +51,8 @@
@Override
@SuppressWarnings("CheckReturnValue")
public ListenableFuture<HttpResponse> executeAuthenticatedRequest(
- DefaultHttpClient httpClient, HttpContext context, HttpRequestBase request) {
+ DefaultHttpClient httpClient, HttpContext context, HttpRequestBase request,
+ AuthScheme authScheme) {
// Set authentication for the client.
ListenableFuture<Credentials> credentialsFuture =
@@ -61,8 +65,13 @@
Log.i(TAG,
"Obtained credentialsFuture, making the POST with credentials"
+ ".");
- httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY,
- credentials);
+ httpClient.addRequestInterceptor((req, ctx) -> {
+ AuthState authState = (AuthState) context.getAttribute(
+ ClientContext.TARGET_AUTH_STATE);
+ authState.setAuthScope(AuthScope.ANY);
+ authState.setAuthScheme(authScheme);
+ authState.setCredentials(credentials);
+ }, /* index= */ 0);
// Make the first request.
return executor.submit(() -> httpClient.execute(request, context));
diff --git a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/HttpRequestExecutor.java b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/HttpRequestExecutor.java
index 59a3aa9..0026790 100644
--- a/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/HttpRequestExecutor.java
+++ b/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/HttpRequestExecutor.java
@@ -19,6 +19,7 @@
import com.google.common.util.concurrent.ListenableFuture;
import org.apache.http.HttpResponse;
+import org.apache.http.auth.AuthScheme;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.protocol.HttpContext;
@@ -29,6 +30,7 @@
public interface HttpRequestExecutor {
ListenableFuture<HttpResponse> executeAuthenticatedRequest(
- DefaultHttpClient httpClient, HttpContext context, HttpRequestBase request)
+ DefaultHttpClient httpClient, HttpContext context, HttpRequestBase request,
+ AuthScheme authScheme)
throws IOException;
}
diff --git a/tests/src/com/android/phone/CarrierConfigLoaderTest.java b/tests/src/com/android/phone/CarrierConfigLoaderTest.java
index 7fd9069..f58e6cc 100644
--- a/tests/src/com/android/phone/CarrierConfigLoaderTest.java
+++ b/tests/src/com/android/phone/CarrierConfigLoaderTest.java
@@ -28,7 +28,6 @@
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import android.content.Intent;
@@ -149,6 +148,20 @@
}
/**
+ * Verifies that IllegalArgumentException should throw when call #updateConfigForPhoneId() with
+ * invalid phoneId.
+ */
+ @Test
+ public void testUpdateConfigForPhoneId_invalidPhoneId() throws Exception {
+ mContext.grantPermission(STUB_PERMISSION_ENABLE_ALL);
+
+ assertThrows(IllegalArgumentException.class,
+ () -> mCarrierConfigLoader.updateConfigForPhoneId(
+ SubscriptionManager.INVALID_PHONE_INDEX,
+ IccCardConstants.INTENT_VALUE_ICC_ABSENT));
+ }
+
+ /**
* Verifies that when call #updateConfigForPhoneId() with SIM absence, both carrier config from
* default app and carrier should be cleared but no-sim config should be loaded.
*/
@@ -219,6 +232,17 @@
}
/**
+ * Verifies IllegalArgumentException should throw if call #overrideConfig() with invalid subId.
+ */
+ @Test
+ public void testOverrideConfig_invalidSubId() throws Exception {
+ mContext.grantPermission(STUB_PERMISSION_ENABLE_ALL);
+
+ assertThrows(IllegalArgumentException.class, () -> mCarrierConfigLoader.overrideConfig(
+ SubscriptionManager.INVALID_SUBSCRIPTION_ID, new PersistableBundle(), false));
+ }
+
+ /**
* Verifies that override config is not null when calling #overrideConfig with null bundle.
*/
@Test
@@ -233,8 +257,7 @@
false/*persistent*/);
mTestableLooper.processAllMessages();
- assertThat(mCarrierConfigLoader.getOverrideConfig(DEFAULT_PHONE_ID)).isEqualTo(
- PersistableBundle.EMPTY);
+ assertThat(mCarrierConfigLoader.getOverrideConfig(DEFAULT_PHONE_ID).isEmpty()).isTrue();
verify(mSubscriptionInfoUpdater).updateSubscriptionByCarrierConfigAndNotifyComplete(
eq(DEFAULT_PHONE_ID), eq(PLATFORM_CARRIER_CONFIG_PACKAGE),
any(PersistableBundle.class), any(Message.class));
@@ -264,20 +287,16 @@
}
/**
- * Verifies that calling #notifyConfigChangedForSubId() with invalid subId will be ignored.
+ * Verifies that IllegalArgumentException should throw when calling
+ * #notifyConfigChangedForSubId() with invalid subId.
*/
@Test
public void testNotifyConfigChangedForSubId_invalidSubId() throws Exception {
mContext.grantPermission(STUB_PERMISSION_ENABLE_ALL);
- mCarrierConfigLoader.notifyConfigChangedForSubId(
- SubscriptionManager.INVALID_SUBSCRIPTION_ID);
-
- // verifying the behavior following the permission check is not actually performed.
- // It against "verify value instead of behavior", but we don't have other alternatives.
- verify(mPackageManager, never()).getNameForUid(anyInt());
- verify(mContext, never()).checkCallingOrSelfPermission(
- eq(android.Manifest.permission.MODIFY_PHONE_STATE));
+ assertThrows(IllegalArgumentException.class,
+ () -> mCarrierConfigLoader.notifyConfigChangedForSubId(
+ SubscriptionManager.INVALID_SUBSCRIPTION_ID));
}
// TODO(b/184040111): Enable test case when support disabling carrier privilege
diff --git a/tests/src/com/android/phone/RcsProvisioningMonitorTest.java b/tests/src/com/android/phone/RcsProvisioningMonitorTest.java
index c7d0c8f..57e01f0 100644
--- a/tests/src/com/android/phone/RcsProvisioningMonitorTest.java
+++ b/tests/src/com/android/phone/RcsProvisioningMonitorTest.java
@@ -85,28 +85,56 @@
*/
public class RcsProvisioningMonitorTest {
private static final String TAG = "RcsProvisioningMonitorTest";
- private static final String CONFIG_DEFAULT = "<RCSConfig>\n"
- + "\t<rcsVolteSingleRegistration>1</rcsVolteSingleRegistration>\n"
- + "\t<SERVICES>\n"
- + "\t\t<SupportedRCSProfileVersions>UP_2.0</SupportedRCSProfileVersions>\n"
- + "\t\t<ChatAuth>1</ChatAuth>\n"
- + "\t\t<GroupChatAuth>1</GroupChatAuth>\n"
- + "\t\t<ftAuth>1</ftAuth>\n"
- + "\t\t<standaloneMsgAuth>1</standaloneMsgAuth>\n"
- + "\t\t<geolocPushAuth>1</geolocPushAuth>\n"
- + "\t\t<Ext>\n"
- + "\t\t\t<DataOff>\n"
- + "\t\t\t\t<rcsMessagingDataOff>1</rcsMessagingDataOff>\n"
- + "\t\t\t\t<fileTransferDataOff>1</fileTransferDataOff>\n"
- + "\t\t\t\t<mmsDataOff>1</mmsDataOff>\n"
- + "\t\t\t\t<syncDataOff>1</syncDataOff>\n"
- + "\t\t\t</DataOff>\n"
- + "\t\t</Ext>\n"
- + "\t</SERVICES>\n"
- + "</RCSConfig>";
- private static final String CONFIG_SINGLE_REGISTRATION_DISABLED = "<RCSConfig>\n"
- + "\t<rcsVolteSingleRegistration>0</rcsVolteSingleRegistration>\n"
- + "</RCSConfig>";
+ private static final String CONFIG_DEFAULT = "<?xml version=\"1.0\"?>\n"
+ + "<wap-provisioningdoc version=\"1.1\">\n"
+ + "\t<characteristic type=\"APPLICATION\">\n"
+ + "\t\t<parm name=\"AppID\" value=\"urn:oma:mo:ext-3gpp-ims:1.0\"/>\n"
+ + "\t\t<characteristic type=\"3GPP_IMS\">\n"
+ + "\t\t\t<parm name=\"AppID\" value=\"ap2001\"/>\n"
+ + "\t\t\t<parm name=\"Name\" value=\"RCS IMS Settings\"/>\n"
+ + "\t\t\t<characteristic type=\"Ext\">\n"
+ + "\t\t\t\t<characteristic type=\"GSMA\">\n"
+ + "\t\t\t\t\t<parm name=\"AppRef\" value=\"IMS-Setting\"/>\n"
+ + "\t\t\t\t\t<parm name=\"rcsVolteSingleRegistration\" value=\"1\"/>\n"
+ + "\t\t\t\t</characteristic>\n"
+ + "\t\t\t</characteristic>\n"
+ + "\t\t</characteristic>\n"
+ + "\t\t<characteristic type=\"SERVICES\">\n"
+ + "\t\t\t<parm name=\"SupportedRCSProfileVersions\" value=\"UP2.3\"/>\n"
+ + "\t\t\t<parm name=\"ChatAuth\" value=\"1\"/>\n"
+ + "\t\t\t<parm name=\"GroupChatAuth\" value=\"1\"/>\n"
+ + "\t\t\t<parm name=\"ftAuth\" value=\"1\"/>\n"
+ + "\t\t\t<parm name=\"standaloneMsgAuth\" value=\"1\"/>\n"
+ + "\t\t\t<parm name=\"geolocPushAuth\" value=\"1\"/>\n"
+ + "\t\t\t<characteristic type=\"Ext\">\n"
+ + "\t\t\t\t<characteristic type=\"DataOff\">\n"
+ + "\t\t\t\t\t<parm name=\"rcsMessagingDataOff\" value=\"1\"/>\n"
+ + "\t\t\t\t\t<parm name=\"fileTransferDataOff\" value=\"1\"/>\n"
+ + "\t\t\t\t\t<parm name=\"mmsDataOff\" value=\"1\"/>\n"
+ + "\t\t\t\t\t<parm name=\"syncDataOff\" value=\"1\"/>\n"
+ + "\t\t\t\t\t<characteristic type=\"Ext\"/>\n"
+ + "\t\t\t\t</characteristic>\n"
+ + "\t\t\t</characteristic>\n"
+ + "\t\t</characteristic>\n"
+ + "\t</characteristic>\n"
+ + "</wap-provisioningdoc>\n";
+
+ private static final String CONFIG_SINGLE_REGISTRATION_DISABLED = "<?xml version=\"1.0\"?>\n"
+ + "<wap-provisioningdoc version=\"1.1\">\n"
+ + "\t<characteristic type=\"APPLICATION\">\n"
+ + "\t\t<parm name=\"AppID\" value=\"urn:oma:mo:ext-3gpp-ims:1.0\"/>\n"
+ + "\t\t<characteristic type=\"3GPP_IMS\">\n"
+ + "\t\t\t<parm name=\"AppID\" value=\"ap2001\"/>\n"
+ + "\t\t\t<parm name=\"Name\" value=\"RCS IMS Settings\"/>\n"
+ + "\t\t\t<characteristic type=\"Ext\">\n"
+ + "\t\t\t\t<characteristic type=\"GSMA\">\n"
+ + "\t\t\t\t\t<parm name=\"AppRef\" value=\"IMS-Setting\"/>\n"
+ + "\t\t\t\t\t<parm name=\"rcsVolteSingleRegistration\" value=\"0\"/>\n"
+ + "\t\t\t\t</characteristic>\n"
+ + "\t\t\t</characteristic>\n"
+ + "\t\t</characteristic>\n"
+ + "\t</characteristic>\n"
+ + "</wap-provisioningdoc>\n";
private static final int FAKE_SUB_ID_BASE = 0x0FFFFFF0;
private static final String DEFAULT_MESSAGING_APP1 = "DMA1";
private static final String DEFAULT_MESSAGING_APP2 = "DMA2";
diff --git a/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java b/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java
index 5e05085..f69b9a8 100644
--- a/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java
+++ b/tests/src/com/android/services/telephony/rcs/MessageTransportStateTrackerTest.java
@@ -173,12 +173,12 @@
@SmallTest
@Test
- public void testDelegateConnectionCloseDialog() throws Exception {
+ public void testDelegateConnectionCloseSession() throws Exception {
MessageTransportStateTracker tracker = new MessageTransportStateTracker(TEST_SUB_ID,
Runnable::run, mDelegateMessageCallback);
tracker.openTransport(mISipDelegate, Collections.emptySet());
- tracker.getDelegateConnection().closeDialog("testCallId");
- verify(mISipDelegate).closeDialog("testCallId");
+ tracker.getDelegateConnection().cleanupSession("testCallId");
+ verify(mISipDelegate).cleanupSession("testCallId");
}
@SmallTest