Merge TQ1A.230105.002 to aosp-master - DO NOT MERGE
Merged-In: Ie707d0f843e4d2a73bf36befe9d21825267ca101
Merged-In: I8208a85190c514f450ee932166e6e7fae07c6dcd
Change-Id: I01a0627c446136d162639c53ba8db24acff19a24
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d122ff8..c26650c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -277,7 +277,7 @@
<activity android:name=".settings.EnableAccountPreferenceActivity"
android:label="@string/enable_account_preference_title"
android:configChanges="orientation|screenSize|keyboardHidden"
- android:theme="@style/Theme.Telecom.DialerSettings"
+ android:theme="@style/Theme.Telecom.EnableAccount"
android:process=":ui"
android:exported="true">
<intent-filter>
diff --git a/OWNERS b/OWNERS
index 39be2c1..97cc81f 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,6 +1,8 @@
breadley@google.com
-hallliu@google.com
tgunn@google.com
xiaotonj@google.com
-shuoq@google.com
+chinmayd@google.com
+tjstuart@google.com
rgreenwalt@google.com
+pmadapurmath@google.com
+grantmenke@google.com
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index e281256..fe39603 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -30,8 +30,7 @@
<string name="notification_disconnectedCall_body" msgid="600491714584417536">"تم قطع اتصالك بجهة الاتصال <xliff:g id="CALLER">%s</xliff:g> بسبب إجراء مكالمة طوارئ."</string>
<string name="notification_disconnectedCall_generic_body" msgid="5282765206349184853">"تم قطع مكالمتك بسبب إجراء مكالمة طوارئ."</string>
<string name="notification_audioProcessing_title" msgid="1619035039880584575">"مكالمة في الخلفية"</string>
- <!-- no translation found for notification_audioProcessing_body (8811420157964118913) -->
- <skip />
+ <string name="notification_audioProcessing_body" msgid="8811420157964118913">"يعالج تطبيق <xliff:g id="AUDIO_PROCESSING_APP_NAME">%s</xliff:g> مكالمة في الخلفية. يمكن لهذا التطبيق الوصول إلى الصوت وتشغيله عبر المكالمة."</string>
<string name="notification_incallservice_not_responding_title" msgid="5347557574288598548">"توقّف <xliff:g id="IN_CALL_SERVICE_APP_NAME">%s</xliff:g> عن الاستجابة"</string>
<string name="notification_incallservice_not_responding_body" msgid="9209308270131968623">"تمت مكالمتك باستخدام تطبيق \"الهاتف\" الذي أتى مع جهازك."</string>
<string name="accessibility_call_muted" msgid="2968461092554300779">"تم كتم صوت المكالمة."</string>
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index af53521..13b1ad7 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -37,8 +37,8 @@
<string name="accessibility_speakerphone_enabled" msgid="555386652061614267">"স্পীকাৰফ\'ন সক্ষম কৰা হৈছে।"</string>
<string name="respond_via_sms_canned_response_1" msgid="6332561460870382561">"এতিয়া কথা পাতিব নোৱাৰোঁ। কি খবৰ?"</string>
<string name="respond_via_sms_canned_response_2" msgid="2052951316129952406">"মই আপোনাক লগে লগে কলবেক কৰি আছোঁ।"</string>
- <string name="respond_via_sms_canned_response_3" msgid="6656147963478092035">"মই আপোনাক পিছত কল কৰিম।"</string>
- <string name="respond_via_sms_canned_response_4" msgid="9141132488345561047">"এতিয়া কথা পাতিব নোৱাৰোঁ। মোক পিছত কল কৰিবনে?"</string>
+ <string name="respond_via_sms_canned_response_3" msgid="6656147963478092035">"মই আপোনাক পাছত কল কৰিম।"</string>
+ <string name="respond_via_sms_canned_response_4" msgid="9141132488345561047">"এতিয়া কথা পাতিব নোৱাৰোঁ। মোক পাছত কল কৰিবনে?"</string>
<string name="respond_via_sms_setting_title" msgid="4762275482898830160">"ক্ষীপ্ৰ উত্তৰসমূহ"</string>
<string name="respond_via_sms_setting_title_2" msgid="4914853536609553457">"ক্ষীপ্ৰ উত্তৰসমূহ সম্পাদনা কৰক"</string>
<string name="respond_via_sms_setting_summary" msgid="8054571501085436868"></string>
@@ -57,9 +57,9 @@
<string name="change_default_dialer_dialog_affirmative" msgid="8604665314757739550">"ডিফ\'ল্ট ছেট কৰক"</string>
<string name="change_default_dialer_dialog_negative" msgid="8648669840052697821">"বাতিল কৰক"</string>
<string name="change_default_dialer_warning_message" msgid="8461963987376916114">"<xliff:g id="NEW_APP">%s</xliff:g>এ কল কৰা লগতে কলৰ সকলো দিশ নিয়ন্ত্ৰণ কৰিবলৈ সক্ষম হ\'ব। কেৱল আপুনি সম্পূৰ্ণৰূপে বিশ্বাস কৰা এপক হে আপোনাৰ ডিফ\'ল্ট ফ\'ন এপ্ হিচাপে চিহ্নিত কৰা উচিত।"</string>
- <string name="change_default_call_screening_dialog_title" msgid="5365787219927262408">"<xliff:g id="NEW_APP">%s</xliff:g>ক আপোনাৰ ডিফ\'ল্ট কল স্ক্ৰীণ কৰা এপ্ হিচাপে ছেট কৰিবনে?"</string>
- <string name="change_default_call_screening_warning_message_for_disable_old_app" msgid="2039830033533243164">"<xliff:g id="OLD_APP">%s</xliff:g>য়ে আৰু কল স্ক্ৰীণ কৰিব নোৱাৰিব।"</string>
- <string name="change_default_call_screening_warning_message" msgid="9020537562292754269">"<xliff:g id="NEW_APP">%s</xliff:g>য়ে আপোনাৰ সম্পৰ্কসূচীত নথকা কল কৰোঁতাৰ বিষয়ে তথ্য চাব আৰু এই কলবোৰ অৱৰোধ কৰিব পাৰিব। আপুনি বিশ্বাস কৰা এপবোৰহে ডিফ\'ল্ট কল স্ক্ৰীণ কৰা এপ্ হিচাপে ছেট কৰা উচিত।"</string>
+ <string name="change_default_call_screening_dialog_title" msgid="5365787219927262408">"<xliff:g id="NEW_APP">%s</xliff:g>ক আপোনাৰ ডিফ\'ল্ট কল স্ক্ৰীন কৰা এপ্ হিচাপে ছেট কৰিবনে?"</string>
+ <string name="change_default_call_screening_warning_message_for_disable_old_app" msgid="2039830033533243164">"<xliff:g id="OLD_APP">%s</xliff:g>য়ে আৰু কল স্ক্ৰীন কৰিব নোৱাৰিব।"</string>
+ <string name="change_default_call_screening_warning_message" msgid="9020537562292754269">"<xliff:g id="NEW_APP">%s</xliff:g>য়ে আপোনাৰ সম্পৰ্কসূচীত নথকা কল কৰোঁতাৰ বিষয়ে তথ্য চাব আৰু এই কলবোৰ অৱৰোধ কৰিব পাৰিব। আপুনি বিশ্বাস কৰা এপবোৰহে ডিফ\'ল্ট কল স্ক্ৰীন কৰা এপ্ হিচাপে ছেট কৰা উচিত।"</string>
<string name="change_default_call_screening_dialog_affirmative" msgid="7162433828280058647">"ডিফ\'ল্ট ছেট কৰক"</string>
<string name="change_default_call_screening_dialog_negative" msgid="1839266125623106342">"বাতিল কৰক"</string>
<string name="blocked_numbers" msgid="8322134197039865180">"অৱৰোধ কৰা নম্বৰসমূহ"</string>
@@ -73,7 +73,7 @@
<string name="non_primary_user" msgid="315564589279622098">"কেৱল ডিভাইচটোৰ গৰাকীয়েহে অৱৰোধ কৰা নম্বৰসমূহ চাব আৰু পৰিচালনা কৰিব পাৰে।"</string>
<string name="delete_icon_description" msgid="5335959254954774373">"অৱৰোধৰ পৰা আঁতৰাওক"</string>
<string name="blocked_numbers_butter_bar_title" msgid="582982373755950791">"সাময়িকভাৱে অৱৰোধৰ সুবিধা বন্ধ কৰি থোৱা হৈছে"</string>
- <string name="blocked_numbers_butter_bar_body" msgid="1261213114919301485">"আপুনি জৰুৰীকালীন নম্বৰ এটা ডায়েল কৰাৰ পিছত বা সেই নম্বৰটোলৈ পাঠ বাৰ্তা পঠিওৱাৰ পিছত নম্বৰটো অৱৰোধৰ পৰা আঁতৰোৱা হয় যাতে জৰুৰীকালীন সেৱাসমূহে আপোনাৰ সৈতে যোগাযোগ কৰিব পাৰে।"</string>
+ <string name="blocked_numbers_butter_bar_body" msgid="1261213114919301485">"আপুনি জৰুৰীকালীন নম্বৰ এটা ডায়েল কৰাৰ পাছত বা সেই নম্বৰটোলৈ পাঠ বাৰ্তা পঠিওৱাৰ পাছত নম্বৰটো অৱৰোধৰ পৰা আঁতৰোৱা হয় যাতে জৰুৰীকালীন সেৱাসমূহে আপোনাৰ সৈতে যোগাযোগ কৰিব পাৰে।"</string>
<string name="blocked_numbers_butter_bar_button" msgid="2704456308072489793">"এতিয়াই পুনঃসক্ষম কৰক"</string>
<string name="blocked_numbers_number_blocked_message" msgid="4314736791180919167">"<xliff:g id="BLOCKED_NUMBER">%1$s</xliff:g> অৱৰোধ কৰা হৈছে"</string>
<string name="blocked_numbers_number_unblocked_message" msgid="2933071624674945601">"<xliff:g id="UNBLOCKED_NUMBER">%1$s</xliff:g> অৱৰোধৰ পৰা আঁতৰ কৰা হৈছে"</string>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index 52a1c64..55df474 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -16,7 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="telecommAppLabel" product="default" msgid="1825598513414129827">"Phone calls"</string>
+ <string name="telecommAppLabel" product="default" msgid="1825598513414129827">"Phone Calls"</string>
<string name="userCallActivityLabel" product="default" msgid="3605391260292846248">"Phone"</string>
<string name="unknown" msgid="6993977514360123431">"Unknown"</string>
<string name="notification_missedCallTitle" msgid="5060387047205532974">"Missed call"</string>
@@ -35,8 +35,8 @@
<string name="notification_incallservice_not_responding_body" msgid="9209308270131968623">"Your call used the phone app that came with your device"</string>
<string name="accessibility_call_muted" msgid="2968461092554300779">"Call muted."</string>
<string name="accessibility_speakerphone_enabled" msgid="555386652061614267">"Speakerphone enabled."</string>
- <string name="respond_via_sms_canned_response_1" msgid="6332561460870382561">"I am so sorry, I can\'t answer the phone right now. How can I help you?"</string>
- <string name="respond_via_sms_canned_response_2" msgid="2052951316129952406">"I\'ll call you back."</string>
+ <string name="respond_via_sms_canned_response_1" msgid="6332561460870382561">"Can\'t talk now. What\'s up?"</string>
+ <string name="respond_via_sms_canned_response_2" msgid="2052951316129952406">"I\'ll call you right back."</string>
<string name="respond_via_sms_canned_response_3" msgid="6656147963478092035">"I\'ll call you later."</string>
<string name="respond_via_sms_canned_response_4" msgid="9141132488345561047">"Can\'t talk now. Call me later?"</string>
<string name="respond_via_sms_setting_title" msgid="4762275482898830160">"Quick responses"</string>
@@ -47,7 +47,7 @@
<string name="respond_via_sms_failure_format" msgid="5198680980054596391">"Message failed to send to <xliff:g id="PHONE_NUMBER">%s</xliff:g>."</string>
<string name="enable_account_preference_title" msgid="6949224486748457976">"Calling accounts"</string>
<string name="outgoing_call_not_allowed_user_restriction" msgid="3424338207838851646">"Only emergency calls are allowed."</string>
- <string name="outgoing_call_not_allowed_no_permission" msgid="8590468836581488679">"This application cannot make outgoing calls without Phone permission."</string>
+ <string name="outgoing_call_not_allowed_no_permission" msgid="8590468836581488679">"This application cannot make outgoing calls without the Phone permission."</string>
<string name="outgoing_call_error_no_phone_number_supplied" msgid="7665135102566099778">"To place a call, enter a valid number."</string>
<string name="duplicate_video_call_not_allowed" msgid="5754746140185781159">"Call cannot be added at this time."</string>
<string name="no_vm_number" msgid="2179959110602180844">"Missing voicemail number"</string>
@@ -56,10 +56,10 @@
<string name="change_default_dialer_dialog_title" msgid="5861469279421508060">"Make <xliff:g id="NEW_APP">%s</xliff:g> your default Phone app?"</string>
<string name="change_default_dialer_dialog_affirmative" msgid="8604665314757739550">"Set Default"</string>
<string name="change_default_dialer_dialog_negative" msgid="8648669840052697821">"Cancel"</string>
- <string name="change_default_dialer_warning_message" msgid="8461963987376916114">"<xliff:g id="NEW_APP">%s</xliff:g> will be able to place and control all aspects of calls. Only apps that you trust should be set as the default Phone app."</string>
+ <string name="change_default_dialer_warning_message" msgid="8461963987376916114">"<xliff:g id="NEW_APP">%s</xliff:g> will be able to place and control all aspects of calls. Only apps you trust should be set as the default Phone app."</string>
<string name="change_default_call_screening_dialog_title" msgid="5365787219927262408">"Make <xliff:g id="NEW_APP">%s</xliff:g> your default call screening app?"</string>
<string name="change_default_call_screening_warning_message_for_disable_old_app" msgid="2039830033533243164">"<xliff:g id="OLD_APP">%s</xliff:g> will no longer be able to screen calls."</string>
- <string name="change_default_call_screening_warning_message" msgid="9020537562292754269">"<xliff:g id="NEW_APP">%s</xliff:g> will be able to see information about callers not in your contacts and will be able to block these calls. Only apps that you trust should be set as the default call screening app."</string>
+ <string name="change_default_call_screening_warning_message" msgid="9020537562292754269">"<xliff:g id="NEW_APP">%s</xliff:g> will be able to see information about callers not in your contacts and will be able to block these calls. Only apps you trust should be set as the default call screening app."</string>
<string name="change_default_call_screening_dialog_affirmative" msgid="7162433828280058647">"Set Default"</string>
<string name="change_default_call_screening_dialog_negative" msgid="1839266125623106342">"Cancel"</string>
<string name="blocked_numbers" msgid="8322134197039865180">"Blocked numbers"</string>
@@ -73,13 +73,13 @@
<string name="non_primary_user" msgid="315564589279622098">"Only the device owner can view and manage blocked numbers."</string>
<string name="delete_icon_description" msgid="5335959254954774373">"Unblock"</string>
<string name="blocked_numbers_butter_bar_title" msgid="582982373755950791">"Blocking temporarily off"</string>
- <string name="blocked_numbers_butter_bar_body" msgid="1261213114919301485">"When you dial or text an emergency number, blocking is turned off to ensure that emergency services can contact you."</string>
+ <string name="blocked_numbers_butter_bar_body" msgid="1261213114919301485">"After you dial or text an emergency number, blocking is turned off to ensure that emergency services can contact you."</string>
<string name="blocked_numbers_butter_bar_button" msgid="2704456308072489793">"Re-enable now"</string>
<string name="blocked_numbers_number_blocked_message" msgid="4314736791180919167">"<xliff:g id="BLOCKED_NUMBER">%1$s</xliff:g> blocked"</string>
<string name="blocked_numbers_number_unblocked_message" msgid="2933071624674945601">"<xliff:g id="UNBLOCKED_NUMBER">%1$s</xliff:g> unblocked"</string>
<string name="blocked_numbers_block_emergency_number_message" msgid="4198550501500893890">"Unable to block emergency number."</string>
<string name="blocked_numbers_number_already_blocked_message" msgid="2301270825735665458">"<xliff:g id="BLOCKED_NUMBER">%1$s</xliff:g> is already blocked."</string>
- <string name="toast_personal_call_msg" msgid="5817631570381795610">"Using the personal dialler to make the call"</string>
+ <string name="toast_personal_call_msg" msgid="5817631570381795610">"Using the personal dialer to make the call"</string>
<string name="notification_incoming_call" msgid="1233481138362230894">"<xliff:g id="CALL_VIA">%1$s</xliff:g> call from <xliff:g id="CALL_FROM">%2$s</xliff:g>"</string>
<string name="notification_incoming_video_call" msgid="5795968314037063900">"<xliff:g id="CALL_VIA">%1$s</xliff:g> video call from <xliff:g id="CALL_FROM">%2$s</xliff:g>"</string>
<string name="answering_ends_other_call" msgid="8653544281903986641">"Answering will end your <xliff:g id="CALL_VIA">%1$s</xliff:g> call"</string>
@@ -90,7 +90,7 @@
<string name="answering_ends_other_managed_video_call" msgid="1988508241432031327">"Answering will end your ongoing video call"</string>
<string name="answer_incoming_call" msgid="2045888814782215326">"Answer"</string>
<string name="decline_incoming_call" msgid="922147089348451310">"Decline"</string>
- <string name="cant_call_due_to_no_supported_service" msgid="1635626384149947077">"Call cannot be placed because there are no calling accounts that support calls of this type."</string>
+ <string name="cant_call_due_to_no_supported_service" msgid="1635626384149947077">"Call cannot be placed because there are no calling accounts which support calls of this type."</string>
<string name="cant_call_due_to_ongoing_call" msgid="8004235328451385493">"Call cannot be placed due to your <xliff:g id="OTHER_CALL">%1$s</xliff:g> call."</string>
<string name="cant_call_due_to_ongoing_calls" msgid="6379163795277824868">"Call cannot be placed due to your <xliff:g id="OTHER_CALL">%1$s</xliff:g> calls."</string>
<string name="cant_call_due_to_ongoing_unknown_call" msgid="8243532328969433172">"Call cannot be placed due to a call in another app."</string>
@@ -101,7 +101,7 @@
<string name="notification_channel_disconnected_calls" msgid="8228636543997645757">"Disconnected calls"</string>
<string name="notification_channel_in_call_service_crash" msgid="7313237519166984267">"Crashed phone apps"</string>
<string name="alert_outgoing_call" msgid="5319895109298927431">"Placing this call will end your <xliff:g id="OTHER_APP">%1$s</xliff:g> call."</string>
- <string name="alert_redirect_outgoing_call_or_not" msgid="665409645789521636">"Choose how to make this call"</string>
+ <string name="alert_redirect_outgoing_call_or_not" msgid="665409645789521636">"Choose how to place this call"</string>
<string name="alert_place_outgoing_call_with_redirection" msgid="5221065030959024121">"Redirect call using <xliff:g id="OTHER_APP">%1$s</xliff:g>"</string>
<string name="alert_place_unredirect_outgoing_call" msgid="2467608535225764006">"Call using my phone number"</string>
<string name="alert_redirect_outgoing_call_timeout" msgid="5568101425637373060">"Call can\'t be placed by <xliff:g id="OTHER_APP">%1$s</xliff:g>. Try using a different call redirecting app or contacting the developer for help."</string>
@@ -109,8 +109,8 @@
<string name="phone_settings_number_not_in_contact_txt" msgid="2602249106007265757">"Numbers not in Contacts"</string>
<string name="phone_settings_number_not_in_contact_summary_txt" msgid="963327038085718969">"Block numbers that are not listed in your Contacts"</string>
<string name="phone_settings_private_num_txt" msgid="6339272760338475619">"Private"</string>
- <string name="phone_settings_private_num_summary_txt" msgid="6755758240544021037">"Block callers who do not disclose their number"</string>
- <string name="phone_settings_payphone_txt" msgid="5003987966052543965">"Phonebox"</string>
+ <string name="phone_settings_private_num_summary_txt" msgid="6755758240544021037">"Block callers that do not disclose their number"</string>
+ <string name="phone_settings_payphone_txt" msgid="5003987966052543965">"Pay phone"</string>
<string name="phone_settings_payphone_summary_txt" msgid="3936631076065563665">"Block calls from pay phones"</string>
<string name="phone_settings_unknown_txt" msgid="3577926178354772728">"Unknown"</string>
<string name="phone_settings_unknown_summary_txt" msgid="5446657192535779645">"Block calls from unidentified callers"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index ec0d80a..4c6fe21 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -34,7 +34,7 @@
<string name="notification_incallservice_not_responding_title" msgid="5347557574288598548">"<xliff:g id="IN_CALL_SERVICE_APP_NAME">%s</xliff:g> dejó de responder"</string>
<string name="notification_incallservice_not_responding_body" msgid="9209308270131968623">"Tu llamada se hizo con la app de teléfono que venía en tu dispositivo"</string>
<string name="accessibility_call_muted" msgid="2968461092554300779">"Llamada silenciada"</string>
- <string name="accessibility_speakerphone_enabled" msgid="555386652061614267">"Altavoz habilitado"</string>
+ <string name="accessibility_speakerphone_enabled" msgid="555386652061614267">"Bocina habilitada"</string>
<string name="respond_via_sms_canned_response_1" msgid="6332561460870382561">"No puedo hablar ahora. ¿Todo bien?"</string>
<string name="respond_via_sms_canned_response_2" msgid="2052951316129952406">"Te llamo enseguida."</string>
<string name="respond_via_sms_canned_response_3" msgid="6656147963478092035">"Te llamo más tarde."</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index a86da41..789909a 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -30,8 +30,7 @@
<string name="notification_disconnectedCall_body" msgid="600491714584417536">"L\'appel à <xliff:g id="CALLER">%s</xliff:g> a été déconnecté en raison d\'un appel d\'urgence qui a été passé."</string>
<string name="notification_disconnectedCall_generic_body" msgid="5282765206349184853">"Votre appel a été déconnecté en raison d\'un appel d\'urgence en cours de lancement."</string>
<string name="notification_audioProcessing_title" msgid="1619035039880584575">"Appel en arrière-plan"</string>
- <!-- no translation found for notification_audioProcessing_body (8811420157964118913) -->
- <skip />
+ <string name="notification_audioProcessing_body" msgid="8811420157964118913">"<xliff:g id="AUDIO_PROCESSING_APP_NAME">%s</xliff:g> traite un appel en arrière-plan. Cette application peut accéder à l\'audio de l\'appel et faire jouer un contenu audio par l\'intermédiaire de l\'appel."</string>
<string name="notification_incallservice_not_responding_title" msgid="5347557574288598548">"<xliff:g id="IN_CALL_SERVICE_APP_NAME">%s</xliff:g> a arrêté de répondre"</string>
<string name="notification_incallservice_not_responding_body" msgid="9209308270131968623">"Votre appel a utilisé l\'application Téléphone intégrée à votre appareil"</string>
<string name="accessibility_call_muted" msgid="2968461092554300779">"Son coupé"</string>
diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml
index ae090e3..beb730d 100644
--- a/res/values-ml/strings.xml
+++ b/res/values-ml/strings.xml
@@ -30,8 +30,7 @@
<string name="notification_disconnectedCall_body" msgid="600491714584417536">"ഒരു അടിയന്തര കോൾ നടക്കുന്നതിനാൽ <xliff:g id="CALLER">%s</xliff:g> എന്നയാൾക്ക് ചെയ്യുന്ന കോൾ വിച്ഛേദിക്കപ്പെട്ടിരിക്കുന്നു."</string>
<string name="notification_disconnectedCall_generic_body" msgid="5282765206349184853">"ഒരു അടിയന്തര കോൾ നടക്കുന്നതിനാൽ നിങ്ങളുടെ കോൾ വിച്ഛേദിക്കപ്പെട്ടിരിക്കുന്നു."</string>
<string name="notification_audioProcessing_title" msgid="1619035039880584575">"പശ്ചാത്തല കോൾ"</string>
- <!-- no translation found for notification_audioProcessing_body (8811420157964118913) -->
- <skip />
+ <string name="notification_audioProcessing_body" msgid="8811420157964118913">"<xliff:g id="AUDIO_PROCESSING_APP_NAME">%s</xliff:g> പശ്ചാത്തലത്തിൽ കോൾ പ്രോസസ് ചെയ്യുന്നു. കോൾ ചെയ്യുമ്പോൾ ഈ ആപ്പ് ഓഡിയോ ആക്സസ് ചെയ്ത് പ്ലേ ചെയ്തേക്കാം."</string>
<string name="notification_incallservice_not_responding_title" msgid="5347557574288598548">"<xliff:g id="IN_CALL_SERVICE_APP_NAME">%s</xliff:g> ആപ്പ് പ്രതികരിക്കുന്നത് നിർത്തി"</string>
<string name="notification_incallservice_not_responding_body" msgid="9209308270131968623">"നിങ്ങളുടെ കോൾ, നിങ്ങളുടെ ഉപകരണത്തിനൊപ്പം ലഭ്യമായ ഫോൺ ആപ്പ് ഉപയോഗിച്ചു"</string>
<string name="accessibility_call_muted" msgid="2968461092554300779">"കോൾ നിശബ്ദമാക്കി."</string>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index 73184ee..cdf6c1f 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -30,8 +30,7 @@
<string name="notification_disconnectedCall_body" msgid="600491714584417536">"आपत्कालीन कल गरिएको हुनाले <xliff:g id="CALLER">%s</xliff:g> लाई गरिएको कल विच्छेद गरियो।"</string>
<string name="notification_disconnectedCall_generic_body" msgid="5282765206349184853">"आपत्कालीन कल जारी रहेको हुनाले तपाईंको कल विच्छेद गरिएको छ।"</string>
<string name="notification_audioProcessing_title" msgid="1619035039880584575">"पृष्ठभूमिको कल"</string>
- <!-- no translation found for notification_audioProcessing_body (8811420157964118913) -->
- <skip />
+ <string name="notification_audioProcessing_body" msgid="8811420157964118913">"<xliff:g id="AUDIO_PROCESSING_APP_NAME">%s</xliff:g> ले ब्याकग्राउन्डमा कुनै कल प्रोसेस गर्दै छ। यो एपले तपाईंको कलको अडियो प्रयोग गरिरहेको र सोही अडियो प्ले गरिरहेको हुन सक्छ।"</string>
<string name="notification_incallservice_not_responding_title" msgid="5347557574288598548">"<xliff:g id="IN_CALL_SERVICE_APP_NAME">%s</xliff:g> ले काम गर्न छाड्यो"</string>
<string name="notification_incallservice_not_responding_body" msgid="9209308270131968623">"कल गर्नका लागि तपाईंको डिभाइसमा पहिल्यैदेखि रहेको फोन एप प्रयोग गरियो"</string>
<string name="accessibility_call_muted" msgid="2968461092554300779">"कल म्युट भयो।"</string>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index 30288f8..3b812ea 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -30,8 +30,7 @@
<string name="notification_disconnectedCall_body" msgid="600491714584417536">"அவசர அழைப்பு மேற்கொள்ளப்பட்டதால் <xliff:g id="CALLER">%s</xliff:g> உடனான அழைப்பு துண்டிக்கப்பட்டது."</string>
<string name="notification_disconnectedCall_generic_body" msgid="5282765206349184853">"அவசர அழைப்பு மேற்கொள்ளப்படுவதால் உங்கள் அழைப்பு துண்டிக்கப்பட்டுள்ளது."</string>
<string name="notification_audioProcessing_title" msgid="1619035039880584575">"பின்னணி அழைப்பு"</string>
- <!-- no translation found for notification_audioProcessing_body (8811420157964118913) -->
- <skip />
+ <string name="notification_audioProcessing_body" msgid="8811420157964118913">"<xliff:g id="AUDIO_PROCESSING_APP_NAME">%s</xliff:g> அழைப்பைப் பின்னணியில் செயலாக்குகிறது. அழைப்பின்போதே இந்த ஆப்ஸ் ஆடியோவை அணுகி அதைச் செயலாக்கக்கூடும்."</string>
<string name="notification_incallservice_not_responding_title" msgid="5347557574288598548">"<xliff:g id="IN_CALL_SERVICE_APP_NAME">%s</xliff:g> செயலிழந்துவிட்டது"</string>
<string name="notification_incallservice_not_responding_body" msgid="9209308270131968623">"உங்கள் சாதனத்துடன் கிடைக்கும் மொபைல் ஆப்ஸ் மூலம் அழைப்பு மேற்கொள்ளப்பட்டது"</string>
<string name="accessibility_call_muted" msgid="2968461092554300779">"அழைப்பு முடக்கப்பட்டது."</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 53e1bcb..c8b24d3 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -29,19 +29,21 @@
<style name="Theme.Telecom.DialerSettings" parent="@android:style/Theme.DeviceDefault.Light">
<item name="android:forceDarkAllowed">true</item>
<item name="android:actionBarStyle">@style/TelecomDialerSettingsActionBarStyle</item>
- <item name="android:actionOverflowButtonStyle">@style/TelecomDialerSettingsActionOverflowButtonStyle</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
+ </style>
+
+ <style name="Theme.Telecom.EnableAccount" parent="Theme.Telecom.DialerSettings">
+ <item name="android:actionOverflowButtonStyle">
+ @style/TelecomDialerSettingsActionOverflowButtonStyle
+ </item>
<item name="android:windowContentOverlay">@null</item>
</style>
- <style name="Theme.Telecom.BlockedNumbers" parent="@android:style/Theme.DeviceDefault.Light">
- <item name="android:forceDarkAllowed">true</item>
- <item name="android:actionBarStyle">@style/TelecomDialerSettingsActionBarStyle</item>
- <item name="android:windowLightStatusBar">true</item>
- <item name="android:windowLightNavigationBar">true</item>
- <item name="android:windowContentOverlay">@null</item>
+ <style name="Theme.Telecom.BlockedNumbers" parent="Theme.Telecom.DialerSettings">
<item name="android:listDivider">@null</item>
+ <item name="android:windowContentOverlay">@null</item>
</style>
<style name="TelecomDialerSettingsActionBarStyle" parent="android:Widget.DeviceDefault.ActionBar">
diff --git a/res/xml/activity_blocked_numbers.xml b/res/xml/activity_blocked_numbers.xml
index f884ec9..e77184d 100644
--- a/res/xml/activity_blocked_numbers.xml
+++ b/res/xml/activity_blocked_numbers.xml
@@ -70,6 +70,8 @@
android:layout_height="wrap_content"
android:text="@string/blocked_numbers_msg"
android:paddingBottom="@dimen/blocked_numbers_extra_large_padding"
+ android:clickable="false"
+ android:longClickable="false"
style="@style/BlockedNumbersTextPrimary2" />
<TextView
diff --git a/res/xml/add_blocked_number_dialog.xml b/res/xml/add_blocked_number_dialog.xml
index 35ab633..c344280 100644
--- a/res/xml/add_blocked_number_dialog.xml
+++ b/res/xml/add_blocked_number_dialog.xml
@@ -28,6 +28,8 @@
android:text="@string/add_blocked_dialog_body"
android:paddingBottom="@dimen/blocked_numbers_large_padding"
android:gravity="start"
+ android:clickable="false"
+ android:longClickable="false"
style="@style/BlockedNumbersTextPrimary2" />
<EditText
android:id="@+id/add_blocked_number"
diff --git a/src/com/android/server/telecom/Analytics.java b/src/com/android/server/telecom/Analytics.java
index d6780ed..beb19ee 100644
--- a/src/com/android/server/telecom/Analytics.java
+++ b/src/com/android/server/telecom/Analytics.java
@@ -16,6 +16,8 @@
package com.android.server.telecom;
+import static java.util.Map.entry;
+
import android.content.Context;
import android.os.SystemProperties;
@@ -59,101 +61,95 @@
public static final String ANALYTICS_DUMPSYS_ARG = "analytics";
private static final String CLEAR_ANALYTICS_ARG = "clear";
- public static final Map<String, Integer> sLogEventToAnalyticsEvent =
- new HashMap<String, Integer>() {{
- put(LogUtils.Events.SET_SELECT_PHONE_ACCOUNT,
- AnalyticsEvent.SET_SELECT_PHONE_ACCOUNT);
- put(LogUtils.Events.REQUEST_HOLD, AnalyticsEvent.REQUEST_HOLD);
- put(LogUtils.Events.REQUEST_UNHOLD, AnalyticsEvent.REQUEST_UNHOLD);
- put(LogUtils.Events.SWAP, AnalyticsEvent.SWAP);
- put(LogUtils.Events.SKIP_RINGING, AnalyticsEvent.SKIP_RINGING);
- put(LogUtils.Events.CONFERENCE_WITH, AnalyticsEvent.CONFERENCE_WITH);
- put(LogUtils.Events.SPLIT_FROM_CONFERENCE, AnalyticsEvent.SPLIT_CONFERENCE);
- put(LogUtils.Events.SET_PARENT, AnalyticsEvent.SET_PARENT);
- put(LogUtils.Events.MUTE, AnalyticsEvent.MUTE);
- put(LogUtils.Events.UNMUTE, AnalyticsEvent.UNMUTE);
- put(LogUtils.Events.AUDIO_ROUTE_BT, AnalyticsEvent.AUDIO_ROUTE_BT);
- put(LogUtils.Events.AUDIO_ROUTE_EARPIECE, AnalyticsEvent.AUDIO_ROUTE_EARPIECE);
- put(LogUtils.Events.AUDIO_ROUTE_HEADSET, AnalyticsEvent.AUDIO_ROUTE_HEADSET);
- put(LogUtils.Events.AUDIO_ROUTE_SPEAKER, AnalyticsEvent.AUDIO_ROUTE_SPEAKER);
- put(LogUtils.Events.SILENCE, AnalyticsEvent.SILENCE);
- put(LogUtils.Events.SCREENING_COMPLETED, AnalyticsEvent.SCREENING_COMPLETED);
- put(LogUtils.Events.BLOCK_CHECK_FINISHED, AnalyticsEvent.BLOCK_CHECK_FINISHED);
- put(LogUtils.Events.DIRECT_TO_VM_FINISHED, AnalyticsEvent.DIRECT_TO_VM_FINISHED);
- put(LogUtils.Events.REMOTELY_HELD, AnalyticsEvent.REMOTELY_HELD);
- put(LogUtils.Events.REMOTELY_UNHELD, AnalyticsEvent.REMOTELY_UNHELD);
- put(LogUtils.Events.REQUEST_PULL, AnalyticsEvent.REQUEST_PULL);
- put(LogUtils.Events.REQUEST_ACCEPT, AnalyticsEvent.REQUEST_ACCEPT);
- put(LogUtils.Events.REQUEST_REJECT, AnalyticsEvent.REQUEST_REJECT);
- put(LogUtils.Events.SET_ACTIVE, AnalyticsEvent.SET_ACTIVE);
- put(LogUtils.Events.SET_DISCONNECTED, AnalyticsEvent.SET_DISCONNECTED);
- put(LogUtils.Events.SET_HOLD, AnalyticsEvent.SET_HOLD);
- put(LogUtils.Events.SET_DIALING, AnalyticsEvent.SET_DIALING);
- put(LogUtils.Events.START_CONNECTION, AnalyticsEvent.START_CONNECTION);
- put(LogUtils.Events.BIND_CS, AnalyticsEvent.BIND_CS);
- put(LogUtils.Events.CS_BOUND, AnalyticsEvent.CS_BOUND);
- put(LogUtils.Events.SCREENING_SENT, AnalyticsEvent.SCREENING_SENT);
- put(LogUtils.Events.DIRECT_TO_VM_INITIATED, AnalyticsEvent.DIRECT_TO_VM_INITIATED);
- put(LogUtils.Events.BLOCK_CHECK_INITIATED, AnalyticsEvent.BLOCK_CHECK_INITIATED);
- put(LogUtils.Events.FILTERING_INITIATED, AnalyticsEvent.FILTERING_INITIATED);
- put(LogUtils.Events.FILTERING_COMPLETED, AnalyticsEvent.FILTERING_COMPLETED);
- put(LogUtils.Events.FILTERING_TIMED_OUT, AnalyticsEvent.FILTERING_TIMED_OUT);
- }};
+ public static final Map<String, Integer> sLogEventToAnalyticsEvent = Map.ofEntries(
+ entry(LogUtils.Events.SET_SELECT_PHONE_ACCOUNT,
+ AnalyticsEvent.SET_SELECT_PHONE_ACCOUNT),
+ entry(LogUtils.Events.REQUEST_HOLD, AnalyticsEvent.REQUEST_HOLD),
+ entry(LogUtils.Events.REQUEST_UNHOLD, AnalyticsEvent.REQUEST_UNHOLD),
+ entry(LogUtils.Events.SWAP, AnalyticsEvent.SWAP),
+ entry(LogUtils.Events.SKIP_RINGING, AnalyticsEvent.SKIP_RINGING),
+ entry(LogUtils.Events.CONFERENCE_WITH, AnalyticsEvent.CONFERENCE_WITH),
+ entry(LogUtils.Events.SPLIT_FROM_CONFERENCE, AnalyticsEvent.SPLIT_CONFERENCE),
+ entry(LogUtils.Events.SET_PARENT, AnalyticsEvent.SET_PARENT),
+ entry(LogUtils.Events.MUTE, AnalyticsEvent.MUTE),
+ entry(LogUtils.Events.UNMUTE, AnalyticsEvent.UNMUTE),
+ entry(LogUtils.Events.AUDIO_ROUTE_BT, AnalyticsEvent.AUDIO_ROUTE_BT),
+ entry(LogUtils.Events.AUDIO_ROUTE_EARPIECE, AnalyticsEvent.AUDIO_ROUTE_EARPIECE),
+ entry(LogUtils.Events.AUDIO_ROUTE_HEADSET, AnalyticsEvent.AUDIO_ROUTE_HEADSET),
+ entry(LogUtils.Events.AUDIO_ROUTE_SPEAKER, AnalyticsEvent.AUDIO_ROUTE_SPEAKER),
+ entry(LogUtils.Events.SILENCE, AnalyticsEvent.SILENCE),
+ entry(LogUtils.Events.SCREENING_COMPLETED, AnalyticsEvent.SCREENING_COMPLETED),
+ entry(LogUtils.Events.BLOCK_CHECK_FINISHED, AnalyticsEvent.BLOCK_CHECK_FINISHED),
+ entry(LogUtils.Events.DIRECT_TO_VM_FINISHED, AnalyticsEvent.DIRECT_TO_VM_FINISHED),
+ entry(LogUtils.Events.REMOTELY_HELD, AnalyticsEvent.REMOTELY_HELD),
+ entry(LogUtils.Events.REMOTELY_UNHELD, AnalyticsEvent.REMOTELY_UNHELD),
+ entry(LogUtils.Events.REQUEST_PULL, AnalyticsEvent.REQUEST_PULL),
+ entry(LogUtils.Events.REQUEST_ACCEPT, AnalyticsEvent.REQUEST_ACCEPT),
+ entry(LogUtils.Events.REQUEST_REJECT, AnalyticsEvent.REQUEST_REJECT),
+ entry(LogUtils.Events.SET_ACTIVE, AnalyticsEvent.SET_ACTIVE),
+ entry(LogUtils.Events.SET_DISCONNECTED, AnalyticsEvent.SET_DISCONNECTED),
+ entry(LogUtils.Events.SET_HOLD, AnalyticsEvent.SET_HOLD),
+ entry(LogUtils.Events.SET_DIALING, AnalyticsEvent.SET_DIALING),
+ entry(LogUtils.Events.START_CONNECTION, AnalyticsEvent.START_CONNECTION),
+ entry(LogUtils.Events.BIND_CS, AnalyticsEvent.BIND_CS),
+ entry(LogUtils.Events.CS_BOUND, AnalyticsEvent.CS_BOUND),
+ entry(LogUtils.Events.SCREENING_SENT, AnalyticsEvent.SCREENING_SENT),
+ entry(LogUtils.Events.DIRECT_TO_VM_INITIATED,
+ AnalyticsEvent.DIRECT_TO_VM_INITIATED),
+ entry(LogUtils.Events.BLOCK_CHECK_INITIATED, AnalyticsEvent.BLOCK_CHECK_INITIATED),
+ entry(LogUtils.Events.FILTERING_INITIATED, AnalyticsEvent.FILTERING_INITIATED),
+ entry(LogUtils.Events.FILTERING_COMPLETED, AnalyticsEvent.FILTERING_COMPLETED),
+ entry(LogUtils.Events.FILTERING_TIMED_OUT, AnalyticsEvent.FILTERING_TIMED_OUT));
- public static final Map<String, Integer> sLogSessionToSessionId =
- new HashMap<String, Integer> () {{
- put(LogUtils.Sessions.ICA_ANSWER_CALL, SessionTiming.ICA_ANSWER_CALL);
- put(LogUtils.Sessions.ICA_REJECT_CALL, SessionTiming.ICA_REJECT_CALL);
- put(LogUtils.Sessions.ICA_DISCONNECT_CALL, SessionTiming.ICA_DISCONNECT_CALL);
- put(LogUtils.Sessions.ICA_HOLD_CALL, SessionTiming.ICA_HOLD_CALL);
- put(LogUtils.Sessions.ICA_UNHOLD_CALL, SessionTiming.ICA_UNHOLD_CALL);
- put(LogUtils.Sessions.ICA_MUTE, SessionTiming.ICA_MUTE);
- put(LogUtils.Sessions.ICA_SET_AUDIO_ROUTE, SessionTiming.ICA_SET_AUDIO_ROUTE);
- put(LogUtils.Sessions.ICA_CONFERENCE, SessionTiming.ICA_CONFERENCE);
- put(LogUtils.Sessions.CSW_HANDLE_CREATE_CONNECTION_COMPLETE,
- SessionTiming.CSW_HANDLE_CREATE_CONNECTION_COMPLETE);
- put(LogUtils.Sessions.CSW_SET_ACTIVE, SessionTiming.CSW_SET_ACTIVE);
- put(LogUtils.Sessions.CSW_SET_RINGING, SessionTiming.CSW_SET_RINGING);
- put(LogUtils.Sessions.CSW_SET_DIALING, SessionTiming.CSW_SET_DIALING);
- put(LogUtils.Sessions.CSW_SET_DISCONNECTED, SessionTiming.CSW_SET_DISCONNECTED);
- put(LogUtils.Sessions.CSW_SET_ON_HOLD, SessionTiming.CSW_SET_ON_HOLD);
- put(LogUtils.Sessions.CSW_REMOVE_CALL, SessionTiming.CSW_REMOVE_CALL);
- put(LogUtils.Sessions.CSW_SET_IS_CONFERENCED, SessionTiming.CSW_SET_IS_CONFERENCED);
- put(LogUtils.Sessions.CSW_ADD_CONFERENCE_CALL,
- SessionTiming.CSW_ADD_CONFERENCE_CALL);
+ public static final Map<String, Integer> sLogSessionToSessionId = Map.ofEntries(
+ entry(LogUtils.Sessions.ICA_ANSWER_CALL, SessionTiming.ICA_ANSWER_CALL),
+ entry(LogUtils.Sessions.ICA_REJECT_CALL, SessionTiming.ICA_REJECT_CALL),
+ entry(LogUtils.Sessions.ICA_DISCONNECT_CALL, SessionTiming.ICA_DISCONNECT_CALL),
+ entry(LogUtils.Sessions.ICA_HOLD_CALL, SessionTiming.ICA_HOLD_CALL),
+ entry(LogUtils.Sessions.ICA_UNHOLD_CALL, SessionTiming.ICA_UNHOLD_CALL),
+ entry(LogUtils.Sessions.ICA_MUTE, SessionTiming.ICA_MUTE),
+ entry(LogUtils.Sessions.ICA_SET_AUDIO_ROUTE, SessionTiming.ICA_SET_AUDIO_ROUTE),
+ entry(LogUtils.Sessions.ICA_CONFERENCE, SessionTiming.ICA_CONFERENCE),
+ entry(LogUtils.Sessions.CSW_HANDLE_CREATE_CONNECTION_COMPLETE,
+ SessionTiming.CSW_HANDLE_CREATE_CONNECTION_COMPLETE),
+ entry(LogUtils.Sessions.CSW_SET_ACTIVE, SessionTiming.CSW_SET_ACTIVE),
+ entry(LogUtils.Sessions.CSW_SET_RINGING, SessionTiming.CSW_SET_RINGING),
+ entry(LogUtils.Sessions.CSW_SET_DIALING, SessionTiming.CSW_SET_DIALING),
+ entry(LogUtils.Sessions.CSW_SET_DISCONNECTED, SessionTiming.CSW_SET_DISCONNECTED),
+ entry(LogUtils.Sessions.CSW_SET_ON_HOLD, SessionTiming.CSW_SET_ON_HOLD),
+ entry(LogUtils.Sessions.CSW_REMOVE_CALL, SessionTiming.CSW_REMOVE_CALL),
+ entry(LogUtils.Sessions.CSW_SET_IS_CONFERENCED, SessionTiming.CSW_SET_IS_CONFERENCED),
+ entry(LogUtils.Sessions.CSW_ADD_CONFERENCE_CALL,
+ SessionTiming.CSW_ADD_CONFERENCE_CALL));
- }};
-
- public static final Map<String, Integer> sLogEventTimingToAnalyticsEventTiming =
- new HashMap<String, Integer>() {{
- put(LogUtils.Events.Timings.ACCEPT_TIMING,
- ParcelableCallAnalytics.EventTiming.ACCEPT_TIMING);
- put(LogUtils.Events.Timings.REJECT_TIMING,
- ParcelableCallAnalytics.EventTiming.REJECT_TIMING);
- put(LogUtils.Events.Timings.DISCONNECT_TIMING,
- ParcelableCallAnalytics.EventTiming.DISCONNECT_TIMING);
- put(LogUtils.Events.Timings.HOLD_TIMING,
- ParcelableCallAnalytics.EventTiming.HOLD_TIMING);
- put(LogUtils.Events.Timings.UNHOLD_TIMING,
- ParcelableCallAnalytics.EventTiming.UNHOLD_TIMING);
- put(LogUtils.Events.Timings.OUTGOING_TIME_TO_DIALING_TIMING,
- ParcelableCallAnalytics.EventTiming.OUTGOING_TIME_TO_DIALING_TIMING);
- put(LogUtils.Events.Timings.BIND_CS_TIMING,
- ParcelableCallAnalytics.EventTiming.BIND_CS_TIMING);
- put(LogUtils.Events.Timings.SCREENING_COMPLETED_TIMING,
- ParcelableCallAnalytics.EventTiming.SCREENING_COMPLETED_TIMING);
- put(LogUtils.Events.Timings.DIRECT_TO_VM_FINISHED_TIMING,
- ParcelableCallAnalytics.EventTiming.DIRECT_TO_VM_FINISHED_TIMING);
- put(LogUtils.Events.Timings.BLOCK_CHECK_FINISHED_TIMING,
- ParcelableCallAnalytics.EventTiming.BLOCK_CHECK_FINISHED_TIMING);
- put(LogUtils.Events.Timings.FILTERING_COMPLETED_TIMING,
- ParcelableCallAnalytics.EventTiming.FILTERING_COMPLETED_TIMING);
- put(LogUtils.Events.Timings.FILTERING_TIMED_OUT_TIMING,
- ParcelableCallAnalytics.EventTiming.FILTERING_TIMED_OUT_TIMING);
- put(LogUtils.Events.Timings.START_CONNECTION_TO_REQUEST_DISCONNECT_TIMING,
+ public static final Map<String, Integer> sLogEventTimingToAnalyticsEventTiming = Map.ofEntries(
+ entry(LogUtils.Events.Timings.ACCEPT_TIMING,
+ ParcelableCallAnalytics.EventTiming.ACCEPT_TIMING),
+ entry(LogUtils.Events.Timings.REJECT_TIMING,
+ ParcelableCallAnalytics.EventTiming.REJECT_TIMING),
+ entry(LogUtils.Events.Timings.DISCONNECT_TIMING,
+ ParcelableCallAnalytics.EventTiming.DISCONNECT_TIMING),
+ entry(LogUtils.Events.Timings.HOLD_TIMING,
+ ParcelableCallAnalytics.EventTiming.HOLD_TIMING),
+ entry(LogUtils.Events.Timings.UNHOLD_TIMING,
+ ParcelableCallAnalytics.EventTiming.UNHOLD_TIMING),
+ entry(LogUtils.Events.Timings.OUTGOING_TIME_TO_DIALING_TIMING,
+ ParcelableCallAnalytics.EventTiming.OUTGOING_TIME_TO_DIALING_TIMING),
+ entry(LogUtils.Events.Timings.BIND_CS_TIMING,
+ ParcelableCallAnalytics.EventTiming.BIND_CS_TIMING),
+ entry(LogUtils.Events.Timings.SCREENING_COMPLETED_TIMING,
+ ParcelableCallAnalytics.EventTiming.SCREENING_COMPLETED_TIMING),
+ entry(LogUtils.Events.Timings.DIRECT_TO_VM_FINISHED_TIMING,
+ ParcelableCallAnalytics.EventTiming.DIRECT_TO_VM_FINISHED_TIMING),
+ entry(LogUtils.Events.Timings.BLOCK_CHECK_FINISHED_TIMING,
+ ParcelableCallAnalytics.EventTiming.BLOCK_CHECK_FINISHED_TIMING),
+ entry(LogUtils.Events.Timings.FILTERING_COMPLETED_TIMING,
+ ParcelableCallAnalytics.EventTiming.FILTERING_COMPLETED_TIMING),
+ entry(LogUtils.Events.Timings.FILTERING_TIMED_OUT_TIMING,
+ ParcelableCallAnalytics.EventTiming.FILTERING_TIMED_OUT_TIMING),
+ entry(LogUtils.Events.Timings.START_CONNECTION_TO_REQUEST_DISCONNECT_TIMING,
ParcelableCallAnalytics.EventTiming.
- START_CONNECTION_TO_REQUEST_DISCONNECT_TIMING);
- }};
+ START_CONNECTION_TO_REQUEST_DISCONNECT_TIMING));
public static final Map<Integer, String> sSessionIdToLogSession = new HashMap<>();
static {
diff --git a/src/com/android/server/telecom/InCallTonePlayer.java b/src/com/android/server/telecom/InCallTonePlayer.java
index 4665ec2..0367ba0 100644
--- a/src/com/android/server/telecom/InCallTonePlayer.java
+++ b/src/com/android/server/telecom/InCallTonePlayer.java
@@ -524,7 +524,7 @@
mMainThreadHandler.post(new Runnable("ICTP.cUTP", mLock) {
@Override
public void loggedRun() {
- int newToneCount = sTonesPlaying.updateAndGet( t -> Math.min(0, t--));
+ int newToneCount = sTonesPlaying.updateAndGet( t -> Math.max(0, --t));
if (newToneCount == 0) {
Log.i(InCallTonePlayer.this,
diff --git a/src/com/android/server/telecom/RespondViaSmsManager.java b/src/com/android/server/telecom/RespondViaSmsManager.java
index 23ccc1c..8507703 100644
--- a/src/com/android/server/telecom/RespondViaSmsManager.java
+++ b/src/com/android/server/telecom/RespondViaSmsManager.java
@@ -31,11 +31,13 @@
import android.telephony.PhoneNumberUtils;
import android.telephony.SmsManager;
import android.telephony.SubscriptionManager;
+import android.text.BidiFormatter;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.widget.Toast;
+import java.text.Bidi;
import java.util.ArrayList;
import java.util.List;
@@ -158,7 +160,9 @@
final String formatString = res.getString(success
? R.string.respond_via_sms_confirmation_format
: R.string.respond_via_sms_failure_format);
- final String confirmationMsg = String.format(formatString, phoneNumber);
+ final BidiFormatter phoneNumberFormatter = BidiFormatter.getInstance();
+ final String confirmationMsg = String.format(formatString,
+ phoneNumberFormatter.unicodeWrap(phoneNumber));
int startingPosition = confirmationMsg.indexOf(phoneNumber);
int endingPosition = startingPosition + phoneNumber.length();
@@ -207,10 +211,12 @@
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
sentIntents.add(pendingIntent);
}
+
MessageSentReceiver receiver = new MessageSentReceiver(
!TextUtils.isEmpty(contactName) ? contactName : phoneNumber,
messageParts.size());
- context.registerReceiver(receiver, new IntentFilter(ACTION_MESSAGE_SENT));
+ context.registerReceiver(receiver, new IntentFilter(ACTION_MESSAGE_SENT),
+ Context.RECEIVER_NOT_EXPORTED);
smsManager.sendMultipartTextMessage(phoneNumber, null, messageParts,
sentIntents/*sentIntent*/, null /*deliveryIntent*/, context.getOpPackageName(),
context.getAttributionTag());
diff --git a/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java b/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java
index 387c39c..64a3f20 100644
--- a/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java
+++ b/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java
@@ -187,6 +187,7 @@
private boolean mLeAudioCallbackRegistered = false;
private BluetoothLeAudio mBluetoothLeAudioService;
private boolean mLeAudioSetAsCommunicationDevice = false;
+ private String mLeAudioDevice;
private boolean mHearingAidSetAsCommunicationDevice = false;
private BluetoothDevice mBluetoothHearingAidActiveDeviceCache;
private BluetoothAdapter mBluetoothAdapter;
@@ -418,10 +419,17 @@
}
public void clearLeAudioCommunicationDevice() {
+ Log.i(this, "clearLeAudioCommunicationDevice: mLeAudioSetAsCommunicationDevice = " +
+ mLeAudioSetAsCommunicationDevice + " device = " + mLeAudioDevice);
if (!mLeAudioSetAsCommunicationDevice) {
return;
}
mLeAudioSetAsCommunicationDevice = false;
+ if (mLeAudioDevice != null) {
+ mBluetoothRouteManager.onAudioLost(mLeAudioDevice);
+ mLeAudioDevice = null;
+ }
+
if (mAudioManager == null) {
Log.i(this, "clearLeAudioCommunicationDevice: mAudioManager is null");
return;
@@ -432,9 +440,7 @@
== AudioDeviceInfo.TYPE_BLE_HEADSET) {
mBluetoothRouteManager.onAudioLost(audioDeviceInfo.getAddress());
mAudioManager.clearCommunicationDevice();
- mLeAudioSetAsCommunicationDevice = false;
}
- mLeAudioSetAsCommunicationDevice = false;
}
public void clearHearingAidCommunicationDevice() {
@@ -451,9 +457,7 @@
if (audioDeviceInfo != null && audioDeviceInfo.getType()
== AudioDeviceInfo.TYPE_HEARING_AID) {
mAudioManager.clearCommunicationDevice();
- mHearingAidSetAsCommunicationDevice = false;
}
- mHearingAidSetAsCommunicationDevice = false;
}
public boolean setLeAudioCommunicationDevice() {
@@ -500,6 +504,7 @@
Log.i(this, " bleHeadset device set");
mBluetoothRouteManager.onAudioOn(bleHeadset.getAddress());
mLeAudioSetAsCommunicationDevice = true;
+ mLeAudioDevice = bleHeadset.getAddress();
}
return result;
}
@@ -553,7 +558,7 @@
// Connect audio to the bluetooth device at address, checking to see whether it's
// le audio, hearing aid or a HFP device, and using the proper BT API.
- public boolean connectAudio(String address) {
+ public boolean connectAudio(String address, boolean switchingBtDevices) {
if (mLeAudioDevicesByAddress.containsKey(address)) {
if (mBluetoothLeAudioService == null) {
Log.w(this, "Attempting to turn on audio when the le audio service is null");
@@ -562,7 +567,15 @@
BluetoothDevice device = mLeAudioDevicesByAddress.get(address);
if (mBluetoothAdapter.setActiveDevice(
device, BluetoothAdapter.ACTIVE_DEVICE_ALL)) {
- return setLeAudioCommunicationDevice();
+
+ /* ACTION_ACTIVE_DEVICE_CHANGED intent will trigger setting communication device.
+ * Only after receiving ACTION_ACTIVE_DEVICE_CHANGED it is known that device that
+ * will be audio switched to is available to be choose as communication device */
+ if (!switchingBtDevices) {
+ return setLeAudioCommunicationDevice();
+ }
+
+ return true;
}
return false;
} else if (mHearingAidDevicesByAddress.containsKey(address)) {
@@ -573,7 +586,15 @@
if (mBluetoothAdapter.setActiveDevice(
mHearingAidDevicesByAddress.get(address),
BluetoothAdapter.ACTIVE_DEVICE_ALL)) {
- return setHearingAidCommunicationDevice();
+
+ /* ACTION_ACTIVE_DEVICE_CHANGED intent will trigger setting communication device.
+ * Only after receiving ACTION_ACTIVE_DEVICE_CHANGED it is known that device that
+ * will be audio switched to is available to be choose as communication device */
+ if (!switchingBtDevices) {
+ return setHearingAidCommunicationDevice();
+ }
+
+ return true;
}
return false;
} else if (mHfpDevicesByAddress.containsKey(address)) {
diff --git a/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java b/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java
index bd2c6f1..fea663d 100644
--- a/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java
+++ b/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java
@@ -713,7 +713,7 @@
return null;
}
- if (!mDeviceManager.connectAudio(actualAddress)) {
+ if (!mDeviceManager.connectAudio(actualAddress, switchingBtDevices)) {
boolean shouldRetry = retryCount < MAX_CONNECTION_RETRIES;
Log.w(LOG_TAG, "Could not connect to %s. Will %s", actualAddress,
shouldRetry ? "retry" : "not retry");
diff --git a/src/com/android/server/telecom/callredirection/CallRedirectionProcessor.java b/src/com/android/server/telecom/callredirection/CallRedirectionProcessor.java
index adeb311..2f057b0 100644
--- a/src/com/android/server/telecom/callredirection/CallRedirectionProcessor.java
+++ b/src/com/android/server/telecom/callredirection/CallRedirectionProcessor.java
@@ -329,8 +329,7 @@
} else {
performCarrierCallRedirection();
}
- }
- if (mIsCarrierRedirectionPending) {
+ } else if (mIsCarrierRedirectionPending) {
Log.addEvent(mCall, LogUtils.Events.REDIRECTION_COMPLETED_CARRIER);
mIsCarrierRedirectionPending = false;
mCallsManager.onCallRedirectionComplete(mCall, mDestinationUri,
diff --git a/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java b/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java
index b95121e..6c7c0ac 100644
--- a/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java
+++ b/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java
@@ -16,12 +16,15 @@
package com.android.server.telecom.tests;
+import static android.media.AudioDeviceInfo.TYPE_BUILTIN_SPEAKER;
+
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothHearingAid;
import android.bluetooth.BluetoothLeAudio;
import android.bluetooth.BluetoothProfile;
+import android.content.BroadcastReceiver;
import android.content.Intent;
import android.media.AudioDeviceInfo;
import android.media.AudioManager;
@@ -49,6 +52,7 @@
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -64,6 +68,7 @@
@Mock BluetoothHearingAid mBluetoothHearingAid;
@Mock BluetoothLeAudio mBluetoothLeAudio;
@Mock AudioManager mockAudioManager;
+ @Mock AudioDeviceInfo mSpeakerInfo;
BluetoothDeviceManager mBluetoothDeviceManager;
BluetoothProfile.ServiceListener serviceListenerUnderTest;
@@ -115,6 +120,8 @@
ArgumentCaptor.forClass(BluetoothLeAudio.Callback.class);
mBluetoothDeviceManager.setLeAudioServiceForTesting(mBluetoothLeAudio);
verify(mBluetoothLeAudio).registerCallback(any(), leAudioCallbacksTest.capture());
+
+ when(mSpeakerInfo.getType()).thenReturn(TYPE_BUILTIN_SPEAKER);
}
@Override
@@ -379,7 +386,7 @@
BluetoothDeviceManager.DEVICE_TYPE_HEADSET));
when(mAdapter.setActiveDevice(nullable(BluetoothDevice.class),
eq(BluetoothAdapter.ACTIVE_DEVICE_ALL))).thenReturn(true);
- mBluetoothDeviceManager.connectAudio(device1.getAddress());
+ mBluetoothDeviceManager.connectAudio(device1.getAddress(), false);
verify(mAdapter).setActiveDevice(device1, BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL);
verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class),
eq(BluetoothAdapter.ACTIVE_DEVICE_ALL));
@@ -408,12 +415,15 @@
when(mockAudioManager.setCommunicationDevice(eq(mockAudioDeviceInfo)))
.thenReturn(true);
- mBluetoothDeviceManager.connectAudio(device5.getAddress());
+ mBluetoothDeviceManager.connectAudio(device5.getAddress(), false);
verify(mAdapter).setActiveDevice(device5, BluetoothAdapter.ACTIVE_DEVICE_ALL);
verify(mBluetoothHeadset, never()).connectAudio();
verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class),
eq(BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL));
+ receiverUnderTest.onReceive(mContext, buildActiveDeviceChangeActionIntent(device5,
+ BluetoothDeviceManager.DEVICE_TYPE_HEARING_AID));
+
when(mockAudioManager.getCommunicationDevice()).thenReturn(mockAudioDeviceInfo);
mBluetoothDeviceManager.disconnectAudio();
verify(mockAudioManager).clearCommunicationDevice();
@@ -440,12 +450,15 @@
when(mockAudioManager.setCommunicationDevice(mockAudioDeviceInfo))
.thenReturn(true);
- mBluetoothDeviceManager.connectAudio(device5.getAddress());
+ mBluetoothDeviceManager.connectAudio(device5.getAddress(), false);
verify(mAdapter).setActiveDevice(device5, BluetoothAdapter.ACTIVE_DEVICE_ALL);
verify(mBluetoothHeadset, never()).connectAudio();
verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class),
eq(BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL));
+ receiverUnderTest.onReceive(mContext, buildActiveDeviceChangeActionIntent(device5,
+ BluetoothDeviceManager.DEVICE_TYPE_LE_AUDIO));
+
mBluetoothDeviceManager.disconnectAudio();
verify(mockAudioManager).clearCommunicationDevice();
}
@@ -464,7 +477,7 @@
leAudioCallbacksTest.getValue().onGroupNodeAdded(device6, 1);
when(mAdapter.setActiveDevice(nullable(BluetoothDevice.class),
eq(BluetoothAdapter.ACTIVE_DEVICE_ALL))).thenReturn(true);
- mBluetoothDeviceManager.connectAudio(device5.getAddress());
+ mBluetoothDeviceManager.connectAudio(device5.getAddress(), false);
verify(mAdapter).setActiveDevice(device5, BluetoothAdapter.ACTIVE_DEVICE_ALL);
verify(mBluetoothHeadset, never()).connectAudio();
verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class),
@@ -477,20 +490,25 @@
buildConnectionActionIntent(BluetoothHeadset.STATE_DISCONNECTED, device5,
BluetoothDeviceManager.DEVICE_TYPE_LE_AUDIO));
- mBluetoothDeviceManager.connectAudio(device6.getAddress());
+ mBluetoothDeviceManager.connectAudio(device6.getAddress(), false);
verify(mAdapter).setActiveDevice(device6, BluetoothAdapter.ACTIVE_DEVICE_ALL);
}
@SmallTest
@Test
public void testClearHearingAidCommunicationDevice() {
+ AudioDeviceInfo mockAudioDeviceInfo = mock(AudioDeviceInfo.class);
+ when(mockAudioDeviceInfo.getType()).thenReturn(AudioDeviceInfo.TYPE_HEARING_AID);
List<AudioDeviceInfo> devices = new ArrayList<>();
+ devices.add(mockAudioDeviceInfo);
when(mockAudioManager.getAvailableCommunicationDevices())
.thenReturn(devices);
+ when(mockAudioManager.setCommunicationDevice(eq(mockAudioDeviceInfo)))
+ .thenReturn(true);
mBluetoothDeviceManager.setHearingAidCommunicationDevice();
- when(mockAudioManager.getCommunicationDevice()).thenReturn(null);
+ when(mockAudioManager.getCommunicationDevice()).thenReturn(mSpeakerInfo);
mBluetoothDeviceManager.clearHearingAidCommunicationDevice();
assertFalse(mBluetoothDeviceManager.isHearingAidSetAsCommunicationDevice());
}
@@ -518,6 +536,31 @@
return i;
}
+
+ private Intent buildActiveDeviceChangeActionIntent(BluetoothDevice device, int deviceType) {
+ String intentString;
+
+ switch (deviceType) {
+ case BluetoothDeviceManager.DEVICE_TYPE_HEADSET:
+ intentString = BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED;
+ break;
+ case BluetoothDeviceManager.DEVICE_TYPE_HEARING_AID:
+ intentString = BluetoothHearingAid.ACTION_ACTIVE_DEVICE_CHANGED;
+ break;
+ case BluetoothDeviceManager.DEVICE_TYPE_LE_AUDIO:
+ intentString = BluetoothLeAudio.ACTION_LE_AUDIO_ACTIVE_DEVICE_CHANGED;
+ break;
+ default:
+ return null;
+ }
+
+ Intent i = new Intent(intentString);
+ i.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
+ i.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
+ | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
+ return i;
+ }
+
private BluetoothDevice makeBluetoothDevice(String address) {
Parcel p1 = Parcel.obtain();
p1.writeString(address);
diff --git a/tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java b/tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java
index e01cbbe..1a6fb88 100644
--- a/tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java
+++ b/tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java
@@ -48,6 +48,7 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.reset;
@@ -245,6 +246,7 @@
}
private void verifyConnectionAttempt(BluetoothDevice device, int numTimes) {
- verify(mDeviceManager, times(numTimes)).connectAudio(device.getAddress());
+ verify(mDeviceManager, times(numTimes)).connectAudio(eq(device.getAddress()),
+ anyBoolean());
}
}
diff --git a/tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java b/tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java
index b729f35..5eecccc 100644
--- a/tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java
+++ b/tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java
@@ -359,18 +359,22 @@
switch (mParams.expectedBluetoothInteraction) {
case NONE:
- verify(mDeviceManager, never()).connectAudio(nullable(String.class));
+ verify(mDeviceManager, never()).connectAudio(nullable(String.class),
+ any(boolean.class));
break;
case CONNECT:
- verify(mDeviceManager).connectAudio(mParams.expectedConnectionDevice.getAddress());
+ verify(mDeviceManager).connectAudio(mParams.expectedConnectionDevice.getAddress(),
+ false);
verify(mDeviceManager, never()).disconnectAudio();
break;
case CONNECT_SWITCH_DEVICE:
verify(mDeviceManager).disconnectAudio();
- verify(mDeviceManager).connectAudio(mParams.expectedConnectionDevice.getAddress());
+ verify(mDeviceManager).connectAudio(mParams.expectedConnectionDevice.getAddress(),
+ true);
break;
case DISCONNECT:
- verify(mDeviceManager, never()).connectAudio(nullable(String.class));
+ verify(mDeviceManager, never()).connectAudio(nullable(String.class),
+ any(boolean.class));
verify(mDeviceManager).disconnectAudio();
break;
}
@@ -402,7 +406,8 @@
when(mDeviceManager.getBluetoothHeadset()).thenReturn(mBluetoothHeadset);
when(mDeviceManager.getBluetoothHearingAid()).thenReturn(mBluetoothHearingAid);
when(mDeviceManager.getLeAudioService()).thenReturn(mBluetoothLeAudio);
- when(mDeviceManager.connectAudio(nullable(String.class))).thenReturn(true);
+ when(mDeviceManager.connectAudio(nullable(String.class), any(boolean.class)))
+ .thenReturn(true);
when(mTimeoutsAdapter.getRetryBluetoothConnectAudioBackoffMillis(
nullable(ContentResolver.class))).thenReturn(100000L);
when(mTimeoutsAdapter.getBluetoothPendingTimeoutMillis(
diff --git a/tests/src/com/android/server/telecom/tests/CallsManagerTest.java b/tests/src/com/android/server/telecom/tests/CallsManagerTest.java
index 6fd8334..448632c 100644
--- a/tests/src/com/android/server/telecom/tests/CallsManagerTest.java
+++ b/tests/src/com/android/server/telecom/tests/CallsManagerTest.java
@@ -165,11 +165,9 @@
private static final Uri TEST_ADDRESS = Uri.parse("tel:555-1212");
private static final Uri TEST_ADDRESS2 = Uri.parse("tel:555-1213");
private static final Uri TEST_ADDRESS3 = Uri.parse("tel:555-1214");
- private static final Map<Uri, PhoneAccountHandle> CONTACT_PREFERRED_ACCOUNT =
- new HashMap<Uri, PhoneAccountHandle>() {{
- put(TEST_ADDRESS2, SIM_1_HANDLE);
- put(TEST_ADDRESS3, SIM_2_HANDLE);
- }};
+ private static final Map<Uri, PhoneAccountHandle> CONTACT_PREFERRED_ACCOUNT = Map.of(
+ TEST_ADDRESS2, SIM_1_HANDLE,
+ TEST_ADDRESS3, SIM_2_HANDLE);
private static int sCallId = 1;
private final TelecomSystem.SyncRoot mLock = new TelecomSystem.SyncRoot() { };
diff --git a/tests/src/com/android/server/telecom/tests/ProximitySensorManagerTest.java b/tests/src/com/android/server/telecom/tests/ProximitySensorManagerTest.java
index eafaa53..807b7cf 100644
--- a/tests/src/com/android/server/telecom/tests/ProximitySensorManagerTest.java
+++ b/tests/src/com/android/server/telecom/tests/ProximitySensorManagerTest.java
@@ -31,7 +31,7 @@
import org.junit.runners.JUnit4;
import org.mockito.Mock;
-import java.util.ArrayList;
+import java.util.List;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -67,9 +67,7 @@
@SmallTest
@Test
public void testTurnOnProximityWithCallsActive() throws Exception {
- when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>(){{
- add(mCall);
- }});
+ when(mCallsManager.getCalls()).thenReturn(List.of(mCall));
when(mWakeLockAdapter.isHeld()).thenReturn(false);
mProximitySensorManager.turnOn();
@@ -80,7 +78,7 @@
@SmallTest
@Test
public void testTurnOnProximityWithNoCallsActive() throws Exception {
- when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>());
+ when(mCallsManager.getCalls()).thenReturn(List.of());
when(mWakeLockAdapter.isHeld()).thenReturn(false);
mProximitySensorManager.turnOn();
@@ -102,9 +100,7 @@
@SmallTest
@Test
public void testCallRemovedFromCallsManagerCallsActive() throws Exception {
- when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>(){{
- add(mCall);
- }});
+ when(mCallsManager.getCalls()).thenReturn(List.of(mCall));
when(mWakeLockAdapter.isHeld()).thenReturn(true);
mProximitySensorManager.onCallRemoved(mock(Call.class));
@@ -115,7 +111,7 @@
@SmallTest
@Test
public void testCallRemovedFromCallsManagerNoCallsActive() throws Exception {
- when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>());
+ when(mCallsManager.getCalls()).thenReturn(List.of());
when(mWakeLockAdapter.isHeld()).thenReturn(true);
mProximitySensorManager.onCallRemoved(mock(Call.class));
diff --git a/tests/src/com/android/server/telecom/tests/SessionTest.java b/tests/src/com/android/server/telecom/tests/SessionTest.java
index 4be3dad..f38618c 100644
--- a/tests/src/com/android/server/telecom/tests/SessionTest.java
+++ b/tests/src/com/android/server/telecom/tests/SessionTest.java
@@ -144,6 +144,7 @@
* Ensure creating two sessions that are parent/child of each other does not lead to a crash
* or infinite recursion when using Session#toString.
*/
+ @SuppressWarnings("ReturnValueIgnored")
@SmallTest
@Test
public void testRecursion_toString() {
@@ -159,7 +160,6 @@
// Make sure calling these methods does not result in a crash
try {
-
parentSession.toString();
childSession.toString();
} catch (Exception e) {
@@ -176,6 +176,7 @@
* Ensure creating two sessions and setting the child as the parent to itself doesn't cause a
* crash due to infinite recursion.
*/
+ @SuppressWarnings("ReturnValueIgnored")
@SmallTest
@Test
public void testRecursion_toString_childCircDep() {
@@ -237,6 +238,7 @@
* Ensure creating two sessions that are parent/child of each other does not lead to a crash
* or infinite recursion in the general case.
*/
+ @SuppressWarnings("ReturnValueIgnored")
@SmallTest
@Test
public void testRecursion() {
diff --git a/tests/src/com/android/server/telecom/tests/TelecomServiceImplTest.java b/tests/src/com/android/server/telecom/tests/TelecomServiceImplTest.java
index c3d085c..9e64aec 100644
--- a/tests/src/com/android/server/telecom/tests/TelecomServiceImplTest.java
+++ b/tests/src/com/android/server/telecom/tests/TelecomServiceImplTest.java
@@ -373,14 +373,9 @@
@SmallTest
@Test
public void testGetCallCapablePhoneAccounts() throws RemoteException {
- List<PhoneAccountHandle> fullPHList = new ArrayList<PhoneAccountHandle>() {{
- add(TEL_PA_HANDLE_16);
- add(SIP_PA_HANDLE_17);
- }};
+ List<PhoneAccountHandle> fullPHList = List.of(TEL_PA_HANDLE_16, SIP_PA_HANDLE_17);
+ List<PhoneAccountHandle> smallPHList = List.of(SIP_PA_HANDLE_17);
- List<PhoneAccountHandle> smallPHList = new ArrayList<PhoneAccountHandle>() {{
- add(SIP_PA_HANDLE_17);
- }};
// Returns all phone accounts when getCallCapablePhoneAccounts is called.
when(mFakePhoneAccountRegistrar
.getCallCapablePhoneAccounts(nullable(String.class), eq(true),
@@ -402,10 +397,8 @@
@SmallTest
@Test
public void testGetCallCapablePhoneAccountsFailure() throws RemoteException {
- List<String> enforcedPermissions = new ArrayList<String>() {{
- add(READ_PHONE_STATE);
- add(READ_PRIVILEGED_PHONE_STATE);
- }};
+ List<String> enforcedPermissions = List.of(READ_PHONE_STATE, READ_PRIVILEGED_PHONE_STATE);
+
doThrow(new SecurityException()).when(mContext).enforceCallingOrSelfPermission(
argThat(new AnyStringIn(enforcedPermissions)), anyString());
@@ -423,13 +416,9 @@
@SmallTest
@Test
public void testGetPhoneAccountsSupportingScheme() throws RemoteException {
- List<PhoneAccountHandle> sipPHList = new ArrayList<PhoneAccountHandle>() {{
- add(SIP_PA_HANDLE_17);
- }};
+ List<PhoneAccountHandle> sipPHList = List.of(SIP_PA_HANDLE_17);
+ List<PhoneAccountHandle> telPHList = List.of(TEL_PA_HANDLE_16);
- List<PhoneAccountHandle> telPHList = new ArrayList<PhoneAccountHandle>() {{
- add(TEL_PA_HANDLE_16);
- }};
when(mFakePhoneAccountRegistrar
.getCallCapablePhoneAccounts(eq("tel"), anyBoolean(), any(UserHandle.class)))
.thenReturn(telPHList);
@@ -449,10 +438,8 @@
@SmallTest
@Test
public void testGetPhoneAccountsForPackage() throws RemoteException {
- List<PhoneAccountHandle> phoneAccountHandleList = new ArrayList<PhoneAccountHandle>() {{
- add(TEL_PA_HANDLE_16);
- add(SIP_PA_HANDLE_17);
- }};
+ List<PhoneAccountHandle> phoneAccountHandleList = List.of(
+ TEL_PA_HANDLE_16, SIP_PA_HANDLE_17);
when(mFakePhoneAccountRegistrar
.getPhoneAccountsForPackage(anyString(), any(UserHandle.class)))
.thenReturn(phoneAccountHandleList);
@@ -481,10 +468,10 @@
@SmallTest
@Test
public void testGetAllPhoneAccounts() throws RemoteException {
- List<PhoneAccount> phoneAccountList = new ArrayList<PhoneAccount>() {{
- add(makePhoneAccount(TEL_PA_HANDLE_16).build());
- add(makePhoneAccount(SIP_PA_HANDLE_17).build());
- }};
+ List<PhoneAccount> phoneAccountList = List.of(
+ makePhoneAccount(TEL_PA_HANDLE_16).build(),
+ makePhoneAccount(SIP_PA_HANDLE_17).build());
+
when(mFakePhoneAccountRegistrar.getAllPhoneAccounts(any(UserHandle.class)))
.thenReturn(phoneAccountList);