Merge "Update the description" into rvc-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 0f316ea..425440a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -445,6 +445,9 @@
             Handler for EuiccManager's resolution intents. These are locked down so that only
             privileged processes can start them, which means we can trust the Intent used to start
             it (which contains a description of the next step to perform after resolution).
+
+            If modified, also change EuiccController#RESOLUTION_ACTIVITY_PACKAGE_NAME and
+            EuiccController#RESOLUTION_ACTIVITY_CLASS_NAME
         -->
         <activity android:name=".euicc.EuiccResolutionUiDispatcherActivity"
             android:permission="android.permission.CALL_PRIVILEGED">
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 678cb92..26f7869 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -583,7 +583,7 @@
     <string name="hac_mode_summary" msgid="7774989500136009881">"Activa la compatibilitat amb audiòfons"</string>
     <string name="rtt_mode_title" msgid="3075948111362818043">"Trucada de text en temps real (RTT)"</string>
     <string name="rtt_mode_summary" msgid="8631541375609989562">"Permet l\'ús de missatges en una trucada de veu"</string>
-    <string name="rtt_mode_more_information" msgid="587500128658756318">"La funció RTT ofereix assistència als usuaris que són sords, tenen problemes d\'audició o alteracions de la parla, o bé que necessiten un text a banda de la veu.&lt;br&gt; &lt;a href=<xliff:g id="URL">http://support.google.com/mobile?p=telephony_rtt</xliff:g>&gt;Més informació&lt;/a&gt;\n       &lt;br&gt;&lt;br&gt; - Les trucades RTT es desen en forma de transcripció.\n       &lt;br&gt; - Aquesta funció no està disponible per a videotrucades."</string>
+    <string name="rtt_mode_more_information" msgid="587500128658756318">"La funció RTT ofereix assistència als usuaris que són sords, tenen deficiències auditives o alteracions de la parla, o bé que necessiten un text a banda de la veu.&lt;br&gt; &lt;a href=<xliff:g id="URL">http://support.google.com/mobile?p=telephony_rtt</xliff:g>&gt;Més informació&lt;/a&gt;\n       &lt;br&gt;&lt;br&gt; - Les trucades RTT es desen en forma de transcripció.\n       &lt;br&gt; - Aquesta funció no està disponible per a videotrucades."</string>
     <string name="no_rtt_when_roaming" msgid="5268008247378355389">"Nota: la funció RTT no està disponible en itinerància"</string>
   <string-array name="tty_mode_entries">
     <item msgid="3238070884803849303">"TTY desactivat"</item>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 7504802..3a5eb10 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -184,7 +184,7 @@
     <string name="forbidden_network" msgid="5081729819561333023">"(prohibida)"</string>
     <string name="choose_network_title" msgid="5335832663422653082">"Elegir red"</string>
     <string name="network_disconnected" msgid="8844141106841160825">"Desconectado"</string>
-    <string name="network_connected" msgid="2760235679963580224">"Conectada"</string>
+    <string name="network_connected" msgid="2760235679963580224">"Conectado"</string>
     <string name="network_connecting" msgid="160901383582774987">"Conectando..."</string>
     <string name="network_could_not_connect" msgid="6547460848093727998">"No se ha podido conectar"</string>
   <string-array name="preferred_network_mode_choices">
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 196c75b..6839a27 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -135,7 +135,7 @@
     <string name="stk_cc_ss_to_dial_error" msgid="5147693491690618704">"‏درخواست SS به تماس معمولی تغییر کرد"</string>
     <string name="stk_cc_ss_to_ussd_error" msgid="8330749347425752192">"‏درخواست SS به‌درخواست USSD تغییر کرد"</string>
     <string name="stk_cc_ss_to_ss_error" msgid="8297155544652134278">"‏به‌درخواست SS جدید تغییر کرد"</string>
-    <string name="stk_cc_ss_to_dial_video_error" msgid="4255261231466032505">"‏درخواست SS به تماس ویدیویی تغییر کرد"</string>
+    <string name="stk_cc_ss_to_dial_video_error" msgid="4255261231466032505">"‏درخواست SS به تماس تصویری تغییر کرد"</string>
     <string name="fdn_check_failure" msgid="1833769746374185247">"تنظیم اعداد شماره‌گیری ثابت برنامه‌های تلفن شما غیرفعال است. درنتیجه، برخی از ویژگی‌های مربوط به تماس کار نمی‌کند."</string>
     <string name="radio_off_error" msgid="8321564164914232181">"قبل از مشاهدهٔ این تنظیمات، رادیو را روشن کنید."</string>
     <string name="close_dialog" msgid="1074977476136119408">"تأیید"</string>
@@ -299,7 +299,7 @@
     <string name="sim_change_data_title" msgid="9142726786345906606">"سیم‌کارت داده تغییر کند؟"</string>
     <string name="sim_change_data_message" msgid="3567358694255933280">"برای داده تلفن همراه، از <xliff:g id="NEW_SIM">%1$s</xliff:g> به‌جای <xliff:g id="OLD_SIM">%2$s</xliff:g> استفاده شود؟"</string>
     <string name="wifi_calling_settings_title" msgid="5800018845662016507">"‏تماس ازطریق Wi-Fi"</string>
-    <string name="video_calling_settings_title" msgid="342829454913266078">"تماس ویدیویی با شرکت مخابراتی"</string>
+    <string name="video_calling_settings_title" msgid="342829454913266078">"تماس تصویری با شرکت مخابراتی"</string>
     <string name="gsm_umts_options" msgid="4968446771519376808">"‏گزینه‌های GSM/UMTS"</string>
     <string name="cdma_options" msgid="3669592472226145665">"‏گزینه‌های CDMA"</string>
     <string name="throttle_data_usage" msgid="1944145350660420711">"مصرف داده"</string>
@@ -446,7 +446,7 @@
     <string name="tty_mode_option_summary" msgid="4770510287236494371">"‏تنظیم حالت TTY"</string>
     <string name="auto_retry_mode_title" msgid="2985801935424422340">"سعی مجدد خودکار"</string>
     <string name="auto_retry_mode_summary" msgid="2863919925349511402">"فعال کردن حالت سعی مجدد خودکار"</string>
-    <string name="tty_mode_not_allowed_video_call" msgid="6551976083652752815">"‏تغییر حالت TTY در طول تماس ویدئویی مجاز نیست"</string>
+    <string name="tty_mode_not_allowed_video_call" msgid="6551976083652752815">"‏تغییر حالت TTY در طول تماس تصویری مجاز نیست"</string>
     <string name="menu_add" msgid="5616487894975773141">"افزودن مخاطب"</string>
     <string name="menu_edit" msgid="3593856941552460706">"ویرایش مخاطب"</string>
     <string name="menu_delete" msgid="6326861853830546488">"حذف مخاطب"</string>
@@ -572,7 +572,7 @@
     <string name="onscreenManageCallsText" msgid="1162047856081836469">"مدیریت تماس‌ها"</string>
     <string name="onscreenManageConferenceText" msgid="4700574060601755137">"مدیریت کنفرانس"</string>
     <string name="onscreenAudioText" msgid="7224226735052019986">"صوتی"</string>
-    <string name="onscreenVideoCallText" msgid="1743992456126258698">"تماس ویدئویی"</string>
+    <string name="onscreenVideoCallText" msgid="1743992456126258698">"تماس تصویری"</string>
     <string name="importSimEntry" msgid="3892354284082689894">"وارد کردن"</string>
     <string name="importAllSimEntries" msgid="2628391505643564007">"وارد کردن همه"</string>
     <string name="importingSimContacts" msgid="4995457122107888932">"وارد کردن مخاطبین سیم"</string>
@@ -660,8 +660,8 @@
     <string name="voicemail_change_pin_dialog_title" msgid="4633077715231764435">"تغییر پین"</string>
     <string name="preference_category_ringtone" msgid="8787281191375434976">"آهنگ‌ زنگ و لرزش"</string>
     <string name="pstn_connection_service_label" msgid="9200102709997537069">"سیم‌کارت‌های داخلی"</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_title" msgid="7246600931634161830">"روشن کردن تماس تصویری"</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>
@@ -677,7 +677,7 @@
     <string name="callFailed_imei_not_accepted" msgid="7257903653685147251">"مرتبط نشد، لطفاً سیم کارت معتبری را وارد کنید."</string>
     <string name="callFailed_wifi_lost" msgid="1788036730589163141">"اتصال وای‌فای قطع شد. تماس پایان یافت."</string>
     <string name="dialFailed_low_battery" msgid="6857904237423407056">"به دلیل شارژ کم باتری، نمی‌توان تماسی برقرار کرد."</string>
-    <string name="callFailed_low_battery" msgid="4056828320214416182">"تماس ویدیویی به‌دلیل شارژ کم باتری پایان یافت."</string>
+    <string name="callFailed_low_battery" msgid="4056828320214416182">"تماس تصویری به‌دلیل شارژ کم باتری پایان یافت."</string>
     <string name="callFailed_emergency_call_over_wfc_not_available" msgid="5944309590693432042">"‏در این مکان تماس اضطراری با «تماس ازطریق Wi-Fi» امکان‌پذیر نیست."</string>
     <string name="callFailed_wfc_service_not_available_in_this_location" msgid="3624536608369524988">"‏در این مکان تماس ازطریق Wi-Fi امکان‌پذیر نیست."</string>
     <string name="change_pin_title" msgid="3564254326626797321">"تغییر پین پست صوتی"</string>
@@ -842,7 +842,7 @@
     <string name="radio_info_ims_reg_status_not_registered" msgid="8045821447288876085">"ثبت‌نشده"</string>
     <string name="radio_info_ims_feature_status_available" msgid="6493200914756969292">"دردسترس"</string>
     <string name="radio_info_ims_feature_status_unavailable" msgid="8930391136839759778">"دردسترس نیست"</string>
-    <string name="radio_info_ims_reg_status" msgid="25582845222446390">"‏ثبت IMS:‏ <xliff:g id="STATUS">%1$s</xliff:g>\nصدا ازطریق LTE‏: <xliff:g id="AVAILABILITY_0">%2$s</xliff:g>\nصدا ازطریق WiFi‏: <xliff:g id="AVAILABILITY_1">%3$s</xliff:g>\n‏تماس ویدیویی: <xliff:g id="AVAILABILITY_2">%4$s</xliff:g>\nواسط UT: <xliff:g id="AVAILABILITY_3">%5$s</xliff:g>"</string>
+    <string name="radio_info_ims_reg_status" msgid="25582845222446390">"‏ثبت IMS:‏ <xliff:g id="STATUS">%1$s</xliff:g>\nصدا ازطریق LTE‏: <xliff:g id="AVAILABILITY_0">%2$s</xliff:g>\nصدا ازطریق WiFi‏: <xliff:g id="AVAILABILITY_1">%3$s</xliff:g>\n‏تماس تصویری: <xliff:g id="AVAILABILITY_2">%4$s</xliff:g>\nواسط UT: <xliff:g id="AVAILABILITY_3">%5$s</xliff:g>"</string>
     <string name="radioInfo_service_in" msgid="45753418231446400">"سرویس دارد"</string>
     <string name="radioInfo_service_out" msgid="287972405416142312">"خارج از سرویس"</string>
     <string name="radioInfo_service_emergency" msgid="4763879891415016848">"فقط تماس‌های اضطراری"</string>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index 2daf8a8..b7fe2fc 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -623,7 +623,7 @@
     <string name="phone_entered_ecm_text" msgid="8431238297843035842">"आपतकालीन कलब्याक मोड प्रविष्टि गरियो"</string>
     <string name="phone_in_ecm_notification_title" msgid="6825016389926367946">"आपतकालीन कलब्याक मोड"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="653972232922670335">"डेटा जडान अक्षम भयो"</string>
-    <string name="phone_in_ecm_notification_complete_time" msgid="7341624337163082759">"<xliff:g id="COMPLETETIME">%s</xliff:g> सम्म डेटा जडान भएको छैन"</string>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7341624337163082759">"<xliff:g id="COMPLETETIME">%s</xliff:g> सम्म डेटा कनेक्ट भएको छैन"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="5425906903766466743">
       <item quantity="other"> फोन आपतकालीन कलब्याक मोडमा <xliff:g id="COUNT_1">%s</xliff:g> मिनेटको लागि हुनेछ। यस मोडको अवस्थामा एक डेटा जडान प्रयोग गरेर कुनै पनि एपहरू प्रयोग गर्न सकिँदैन। के तपाईं अहिले निस्कन चाहनुहुन्छ?</item>
       <item quantity="one"> फोन आपतकालीन कलब्याक मोडमा <xliff:g id="COUNT_0">%s</xliff:g> मिनेटको लागि हुनेछ। यस मोडको समयमा एक डेटा जडान प्रयोग गरेर कुनै पनि एपहरू प्रयोग गर्न सकिँदैन। के तपाईं अहिले निस्कन चाहनुहुन्छ?</item>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 08217e4..3c33d08 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -136,7 +136,7 @@
     <string name="stk_cc_ss_to_ussd_error" msgid="8330749347425752192">"Pedido SS alterado para um novo pedido USSD"</string>
     <string name="stk_cc_ss_to_ss_error" msgid="8297155544652134278">"Foi alterado para um novo pedido SS"</string>
     <string name="stk_cc_ss_to_dial_video_error" msgid="4255261231466032505">"O pedido SS foi alterado para uma videochamada"</string>
-    <string name="fdn_check_failure" msgid="1833769746374185247">"A definição Números Autorizados da aplicação do seu Telemóvel está ativada. Por conseguinte, algumas funcionalidades relacionadas com chamadas não estão a funcionar."</string>
+    <string name="fdn_check_failure" msgid="1833769746374185247">"A definição Números Autorizados da app do seu Telemóvel está ativada. Por conseguinte, algumas funcionalidades relacionadas com chamadas não estão a funcionar."</string>
     <string name="radio_off_error" msgid="8321564164914232181">"Ative o rádio antes de visualizar estas definições."</string>
     <string name="close_dialog" msgid="1074977476136119408">"OK"</string>
     <string name="enable" msgid="2636552299455477603">"Ativar"</string>
@@ -286,7 +286,7 @@
     <string name="limited_sim_function_notification_title" msgid="612715399099846281">"Funcionalidade de SIM limitada"</string>
     <string name="limited_sim_function_with_phone_num_notification_message" msgid="5928988883403677610">"As chamadas e os serviços de dados da <xliff:g id="CARRIER_NAME">%1$s</xliff:g> podem ficar bloqueados ao utilizar o número <xliff:g id="PHONE_NUMBER">%2$s</xliff:g>."</string>
     <string name="limited_sim_function_notification_message" msgid="5338638075496721160">"As chamadas e serviços de dados da <xliff:g id="CARRIER_NAME">%1$s</xliff:g> podem ser bloqueados se utilizar outro SIM."</string>
-    <string name="data_usage_title" msgid="8438592133893837464">"Utilização de dados da aplicação"</string>
+    <string name="data_usage_title" msgid="8438592133893837464">"Utilização de dados da app"</string>
     <string name="data_usage_template" msgid="6287906680674061783">"<xliff:g id="ID_1">%1$s</xliff:g> de dados móveis utilizados entre <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="advanced_options_title" msgid="9208195294513520934">"Avançadas"</string>
     <string name="carrier_settings_euicc" msgid="1190237227261337749">"Operador"</string>
diff --git a/res/values/config.xml b/res/values/config.xml
index 9b2605d..7e71068 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -290,4 +290,13 @@
          in some devices per modem limitation 5G network can't be connected if two or more SIMs
          are active simultaneously. In that case, this value should be false. -->
     <bool name="config_5g_connection_in_dsds_mode">true</bool>
+
+    <!-- Vibrator pattern to be used as the default for notifications
+         that specify DEFAULT_VIBRATE. -->
+    <integer-array name="config_defaultNotificationVibePattern">
+        <item>0</item>
+        <item>350</item>
+        <item>250</item>
+        <item>350</item>
+    </integer-array>
 </resources>
diff --git a/sip/res/values-pt-rPT/strings.xml b/sip/res/values-pt-rPT/strings.xml
index ae1b2ed..35aca3e 100644
--- a/sip/res/values-pt-rPT/strings.xml
+++ b/sip/res/values-pt-rPT/strings.xml
@@ -47,7 +47,7 @@
     <string name="registration_status_failed_try_later" msgid="7855389184910312091">"O registo da conta não teve êxito: (<xliff:g id="REGISTRATION_ERROR_MESSAGE">%s</xliff:g>); tentaremos mais tarde"</string>
     <string name="registration_status_invalid_credentials" msgid="8896714049938660777">"O registo da conta não teve êxito: palavra-passe ou nome de utilizador incorreto"</string>
     <string name="registration_status_server_unreachable" msgid="3832339558868965604">"O registo da conta não teve êxito: verifique o nome do servidor."</string>
-    <string name="third_party_account_summary" msgid="5918779106950859167">"Esta conta está atualmente a ser utilizada pela aplicação <xliff:g id="ACCOUNT_OWNER">%s</xliff:g>."</string>
+    <string name="third_party_account_summary" msgid="5918779106950859167">"Esta conta está atualmente a ser utilizada pela app <xliff:g id="ACCOUNT_OWNER">%s</xliff:g>."</string>
     <string name="sip_edit_title" msgid="7438891546610820307">"Detalhes da conta SIP"</string>
     <string name="sip_edit_new_title" msgid="8394790068979636381">"Detalhes da conta SIP"</string>
     <string name="domain_address_title" msgid="8238078615181248579">"Servidor"</string>
diff --git a/src/com/android/phone/CallBarringEditPreference.java b/src/com/android/phone/CallBarringEditPreference.java
index 5d83de1..b8e3250 100644
--- a/src/com/android/phone/CallBarringEditPreference.java
+++ b/src/com/android/phone/CallBarringEditPreference.java
@@ -74,9 +74,9 @@
         super(context, attrs);
         // Get the summary settings, use CheckBoxPreference as the standard.
         TypedArray typedArray = context.obtainStyledAttributes(attrs,
-                R.styleable.CheckBoxPreference, 0, 0);
-        mSummaryOn = typedArray.getString(R.styleable.CheckBoxPreference_summaryOn);
-        mSummaryOff = typedArray.getString(R.styleable.CheckBoxPreference_summaryOff);
+                android.R.styleable.CheckBoxPreference, 0, 0);
+        mSummaryOn = typedArray.getString(android.R.styleable.CheckBoxPreference_summaryOn);
+        mSummaryOff = typedArray.getString(android.R.styleable.CheckBoxPreference_summaryOff);
         mDisableText = context.getText(R.string.disable);
         mEnableText = context.getText(R.string.enable);
         typedArray.recycle();
diff --git a/src/com/android/phone/EmergencyCallbackModeService.java b/src/com/android/phone/EmergencyCallbackModeService.java
index 6b247bd..464db6f 100644
--- a/src/com/android/phone/EmergencyCallbackModeService.java
+++ b/src/com/android/phone/EmergencyCallbackModeService.java
@@ -190,8 +190,10 @@
 
         // PendingIntent to launch Emergency Callback Mode Exit activity if the user selects
         // this notification
-        PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
-                new Intent(EmergencyCallbackModeExitDialog.ACTION_SHOW_ECM_EXIT_DIALOG), 0);
+        Intent intent = new Intent(this, EmergencyCallbackModeExitDialog.class);
+        intent.setAction(EmergencyCallbackModeExitDialog.ACTION_SHOW_ECM_EXIT_DIALOG);
+        PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent,
+                PendingIntent.FLAG_IMMUTABLE);
         builder.setContentIntent(contentIntent);
 
         // Format notification string
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index 5d630af..42bfb24 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -1204,7 +1204,7 @@
         return false;
     }
 
-    private static int getPrimaryColor(WallpaperColors colors) {
+    private int getPrimaryColor(WallpaperColors colors) {
         if (colors != null) {
             // Android accessibility scanner
             // (https://support.google.com/accessibility/android/answer/7158390)
@@ -1212,15 +1212,22 @@
             // 4.5 with background color. The color generated from wallpaper may not
             // follow this rule. Calculate a proper color here.
             Color primary = colors.getPrimaryColor();
-            Color text = Color.valueOf(Color.WHITE);
+            Color text;
+            if (mSupportsDarkText) {
+                text = Color.valueOf(Color.BLACK);
+            } else {
+                text = Color.valueOf(Color.WHITE);
+            }
             Color dial = Color.valueOf(DIALER_GREEN);
             // If current primary color can't follow the contrast ratio rule, make it
-            // deeper and try again.
+            // deeper/lighter and try again.
             while (!checkContrastRatio(primary, text)) {
-                primary = getDeeper(primary);
+                primary = getNextColor(primary, mSupportsDarkText);
             }
-            while (!checkContrastRatio(primary, dial)) {
-                primary = getDeeper(primary);
+            if (!mSupportsDarkText) {
+                while (!checkContrastRatio(primary, dial)) {
+                    primary = getNextColor(primary, mSupportsDarkText);
+                }
             }
             return primary.toArgb();
         }
@@ -1230,17 +1237,21 @@
         return Color.BLACK;
     }
 
-    private static Color getDeeper(Color color) {
-        float r = color.red() - COLOR_DELTA;
-        float g = color.green() - COLOR_DELTA;
-        float b = color.blue() - COLOR_DELTA;
+    private Color getNextColor(Color color, boolean darkText) {
+        float sign = darkText ? 1.f : -1.f;
+        float r = color.red() + sign * COLOR_DELTA;
+        float g = color.green() + sign * COLOR_DELTA;
+        float b = color.blue() + sign * COLOR_DELTA;
         if (r < 0f) r = 0f;
         if (g < 0f) g = 0f;
         if (b < 0f) b = 0f;
+        if (r > 1f) r = 1f;
+        if (g > 1f) g = 1f;
+        if (b > 1f) b = 1f;
         return Color.valueOf(r, g, b);
     }
 
-    private static boolean checkContrastRatio(Color color1, Color color2) {
+    private boolean checkContrastRatio(Color color1, Color color2) {
         float lum1 = color1.luminance();
         float lum2 = color2.luminance();
         double cr;
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 5e3c224..8f987b7 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -265,16 +265,18 @@
                     // Right now, this is only used for the PUK-unlocking
                     // process.
                     EventSimStateChangedBag bag = (EventSimStateChangedBag)msg.obj;
-                    if (bag.mIccStatus == IccCardConstants.INTENT_VALUE_ICC_READY
-                            || bag.mIccStatus == IccCardConstants.INTENT_VALUE_ICC_LOADED) {
+                    if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(bag.mIccStatus)
+                            || IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(bag.mIccStatus)) {
                         // when the right event is triggered and there
                         // are UI objects in the foreground, we close
                         // them to display the lock panel.
                         if (mPUKEntryActivity != null) {
+                            Log.i(LOG_TAG, "Dismiss puk entry activity");
                             mPUKEntryActivity.finish();
                             mPUKEntryActivity = null;
                         }
                         if (mPUKEntryProgressDialog != null) {
+                            Log.i(LOG_TAG, "Dismiss puk progress dialog");
                             mPUKEntryProgressDialog.dismiss();
                             mPUKEntryProgressDialog = null;
                         }
@@ -528,6 +530,7 @@
      * or SIM READYing process is over.
      */
     void setPukEntryActivity(Activity activity) {
+        Log.i(LOG_TAG, "setPukEntryActivity - set to " + (activity == null ? "null" : "activity"));
         mPUKEntryActivity = activity;
     }
 
@@ -545,6 +548,8 @@
      * READYing process
      */
     void setPukEntryProgressDialog(ProgressDialog dialog) {
+        Log.i(LOG_TAG, "setPukEntryProgressDialog - set to "
+                + (dialog == null ? "null" : "activity"));
         mPUKEntryProgressDialog = dialog;
     }
 
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index 95cb785..c520063 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -22,10 +22,17 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.res.Resources;
+import android.media.AudioAttributes;
+import android.media.AudioManager;
+import android.media.MediaPlayer;
+import android.media.RingtoneManager;
 import android.net.Uri;
 import android.os.Handler;
 import android.os.Message;
 import android.os.PersistableBundle;
+import android.os.VibrationEffect;
+import android.os.Vibrator;
 import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
 import android.telecom.VideoProfile;
@@ -54,6 +61,7 @@
 import com.android.phone.settings.SuppServicesUiUtil;
 import com.android.telephony.Rlog;
 
+import java.io.IOException;
 import java.util.List;
 
 /**
@@ -79,6 +87,9 @@
     /** Define for not a special CNAP string */
     private static final int CNAP_SPECIAL_CASE_NO = -1;
 
+    /** Define for default vibrate pattern if res cannot be found */
+    private static final long[] DEFAULT_VIBRATE_PATTERN = {0, 250, 250, 250};
+
     /**
      * Theme to use for dialogs displayed by utility methods in this class. This is needed
      * because these dialogs are displayed using the application context, which does not resolve
@@ -352,7 +363,7 @@
         // Check to see if a UI exists for the PUK activation.  If it does
         // exist, then it indicates that we're trying to unblock the PUK.
         if ((app.getPUKEntryActivity() != null) && (state == MmiCode.State.COMPLETE)) {
-            if (DBG) log("displaying PUK unblocking progress dialog.");
+            log("displaying PUK unblocking progress dialog.");
 
             // create the progress dialog, make sure the flags and type are
             // set correctly.
@@ -499,9 +510,59 @@
                 newDialog.getButton(DialogInterface.BUTTON_NEGATIVE)
                         .setTextColor(context.getResources().getColor(R.color.dialer_theme_color));
             }
+
+            if (mmiCode.isNetworkInitiatedUssd()) {
+                playSound(context);
+            }
         }
     }
 
+    private static void playSound(Context context) {
+        AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
+        int callsRingerMode = audioManager.getRingerMode();
+
+        if (callsRingerMode == AudioManager.RINGER_MODE_NORMAL) {
+            log("playSound : RINGER_MODE_NORMAL");
+            try {
+                Uri notificationUri = RingtoneManager.getDefaultUri(
+                        RingtoneManager.TYPE_NOTIFICATION);
+                MediaPlayer mediaPlayer = new MediaPlayer();
+                mediaPlayer.setDataSource(context, notificationUri);
+                AudioAttributes aa = new AudioAttributes.Builder()
+                        .setLegacyStreamType(AudioManager.STREAM_NOTIFICATION)
+                        .setUsage(AudioAttributes.USAGE_NOTIFICATION)
+                        .build();
+                mediaPlayer.setAudioAttributes(aa);
+                mediaPlayer.setLooping(false);
+                mediaPlayer.prepare();
+                mediaPlayer.start();
+            } catch (IOException e) {
+                log("playSound exception : " + e);
+            }
+        } else if (callsRingerMode == AudioManager.RINGER_MODE_VIBRATE) {
+            log("playSound : RINGER_MODE_VIBRATE");
+            Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
+            // Use NotificationManagerService#DEFAULT_VIBRATE_PATTERN if
+            // R.array.config_defaultNotificationVibePattern is not defined.
+            long[] pattern = getLongArray(context.getResources(),
+                    R.array.config_defaultNotificationVibePattern, DEFAULT_VIBRATE_PATTERN);
+            vibrator.vibrate(VibrationEffect.createWaveform(pattern, -1));
+        }
+    }
+
+    private static long[] getLongArray(Resources r, int resid, long[] def) {
+        int[] ar = r.getIntArray(resid);
+        if (ar == null) {
+            return def;
+        }
+        final int len = ar.length;
+        long[] out = new long[len];
+        for (int i = 0; i < len; i++) {
+            out[i] = ar[i];
+        }
+        return out;
+    }
+
     /**
      * It displays the message dialog for user about the mmi code result message.
      *
diff --git a/src/com/android/services/telephony/ImsConference.java b/src/com/android/services/telephony/ImsConference.java
index 73d6023..22fa4a0 100644
--- a/src/com/android/services/telephony/ImsConference.java
+++ b/src/com/android/services/telephony/ImsConference.java
@@ -256,8 +256,7 @@
                 public void onConnectionPropertiesChanged(Connection c, int connectionProperties) {
                     Log.d(this, "onConnectionPropertiesChanged: Connection: %s,"
                             + " connectionProperties: %s", c, connectionProperties);
-                    int properties = ImsConference.this.getConnectionProperties();
-                    setConnectionProperties(applyHostProperties(properties, connectionProperties));
+                    updateConnectionProperties(connectionProperties);
                 }
 
                 @Override
@@ -269,7 +268,7 @@
                 @Override
                 public void onExtrasChanged(Connection c, Bundle extras) {
                     Log.v(this, "onExtrasChanged: c=" + c + " Extras=" + extras);
-                    putExtras(extras);
+                    updateExtras(extras);
                 }
 
                 @Override
@@ -449,7 +448,6 @@
                 mConferenceHost.getConnectionCapabilities(),
                 mConferenceHost.isCarrierVideoConferencingSupported());
         setConnectionCapabilities(capabilities);
-
     }
 
     /**
@@ -1200,6 +1198,12 @@
         // data from the time of merge.
         connection.setCallDirection(participant.getCallDirection());
 
+        // Ensure important attributes of the parent get copied to child.
+        connection.setConnectionProperties(applyHostPropertiesToChild(
+                connection.getConnectionProperties(), parent.getConnectionProperties()));
+        connection.setStatusHints(parent.getStatusHints());
+        connection.setExtras(getChildExtrasFromHostBundle(parent.getExtras()));
+
         Log.i(this, "createConferenceParticipantConnection: participant=%s, connection=%s",
                 participant, connection);
 
@@ -1441,11 +1445,17 @@
             Phone phone = mConferenceHost.getPhone();
             if (phone != null) {
                 Context context = phone.getContext();
-                setStatusHints(new StatusHints(
+                StatusHints hints = new StatusHints(
                         context.getString(R.string.status_hint_label_wifi_call),
                         Icon.createWithResource(
                                 context, R.drawable.ic_signal_wifi_4_bar_24dp),
-                        null /* extras */));
+                        null /* extras */);
+                setStatusHints(hints);
+
+                // Ensure the children know they're a WIFI call as well.
+                for (Connection c : getConnections()) {
+                    c.setStatusHints(hints);
+                }
             }
         } else {
             setStatusHints(null);
@@ -1453,6 +1463,69 @@
     }
 
     /**
+     * Updates the conference's properties based on changes to the host.
+     * Also ensures pertinent properties from the host such as the WIFI property are copied to the
+     * children as well.
+     * @param connectionProperties The new host properties.
+     */
+    private void updateConnectionProperties(int connectionProperties) {
+        int properties = ImsConference.this.getConnectionProperties();
+        setConnectionProperties(applyHostProperties(properties, connectionProperties));
+
+        for (Connection c : getConnections()) {
+            c.setConnectionProperties(applyHostPropertiesToChild(c.getConnectionProperties(),
+                    connectionProperties));
+        }
+    }
+
+    /**
+     * Updates extras in the conference based on changes made in the parent.
+     * Also copies select extras (e.g. EXTRA_CALL_NETWORK_TYPE) to the children as well.
+     * @param extras The extras to copy.
+     */
+    private void updateExtras(Bundle extras) {
+        putExtras(extras);
+
+        if (extras == null) {
+            return;
+        }
+
+        Bundle childBundle = getChildExtrasFromHostBundle(extras);
+        for (Connection c : getConnections()) {
+            c.putExtras(childBundle);
+        }
+    }
+
+    /**
+     * Given an extras bundle from the host, returns a new bundle containing those extras which are
+     * releveant to the children.
+     * @param extras The host extras.
+     * @return The extras pertinent to the children.
+     */
+    private Bundle getChildExtrasFromHostBundle(Bundle extras) {
+        Bundle extrasToCopy = new Bundle();
+        if (extras != null && extras.containsKey(TelecomManager.EXTRA_CALL_NETWORK_TYPE)) {
+            int networkType = extras.getInt(TelecomManager.EXTRA_CALL_NETWORK_TYPE);
+            extrasToCopy.putInt(TelecomManager.EXTRA_CALL_NETWORK_TYPE, networkType);
+        }
+        return extrasToCopy;
+    }
+
+    /**
+     * Given the properties from a conference host applies and changes to the host's properties to
+     * the child as well.
+     * @param childProperties The existing child properties.
+     * @param hostProperties The properties from the host.
+     * @return The child properties with the applicable host bits set/unset.
+     */
+    private int applyHostPropertiesToChild(int childProperties, int hostProperties) {
+        childProperties = changeBitmask(childProperties,
+                Connection.PROPERTY_WIFI,
+                (hostProperties & Connection.PROPERTY_WIFI) != 0);
+        return childProperties;
+    }
+
+    /**
      * Builds a string representation of the {@link ImsConference}.
      *
      * @return String representing the conference.
diff --git a/tests/src/com/android/services/telephony/ImsConferenceTest.java b/tests/src/com/android/services/telephony/ImsConferenceTest.java
index f172d67..f13d709 100644
--- a/tests/src/com/android/services/telephony/ImsConferenceTest.java
+++ b/tests/src/com/android/services/telephony/ImsConferenceTest.java
@@ -18,6 +18,7 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.never;
@@ -27,17 +28,22 @@
 import static org.mockito.Mockito.when;
 
 import android.net.Uri;
+import android.os.Bundle;
 import android.os.Looper;
 import android.telecom.Call;
 import android.telecom.Conference;
 import android.telecom.Connection;
 import android.telecom.PhoneAccountHandle;
+import android.telecom.StatusHints;
+import android.telecom.TelecomManager;
+import android.telephony.TelephonyManager;
 import android.test.suitebuilder.annotation.SmallTest;
 
 import com.android.ims.internal.ConferenceParticipant;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
@@ -65,6 +71,53 @@
         when(mMockTelecomAccountRegistry.getAddress(any(PhoneAccountHandle.class)))
                 .thenReturn(null);
     }
+    @Test
+    @SmallTest
+    public void testPropertyPropagation() {
+        when(mMockTelecomAccountRegistry.isUsingSimCallManager(any(PhoneAccountHandle.class)))
+                .thenReturn(false);
+        mConferenceHost.setConnectionProperties(Connection.PROPERTY_ASSISTED_DIALING
+                | Connection.PROPERTY_WIFI);
+        Bundle extras = new Bundle();
+        extras.putInt(TelecomManager.EXTRA_CALL_NETWORK_TYPE, TelephonyManager.NETWORK_TYPE_IWLAN);
+        mConferenceHost.putTelephonyExtras(extras);
+        mConferenceHost.setStatusHints(new StatusHints("WIFIs", null, null));
+
+        ImsConference imsConference = new ImsConference(mMockTelecomAccountRegistry,
+                mMockTelephonyConnectionServiceProxy, mConferenceHost,
+                null /* phoneAccountHandle */, () -> true /* featureFlagProxy */,
+                new ImsConference.CarrierConfiguration.Builder().build());
+
+        ConferenceParticipant participant1 = new ConferenceParticipant(
+                Uri.parse("tel:6505551212"),
+                "A",
+                Uri.parse("sip:6505551212@testims.com"),
+                Connection.STATE_ACTIVE,
+                Call.Details.DIRECTION_OUTGOING);
+        ConferenceParticipant participant2 = new ConferenceParticipant(
+                Uri.parse("tel:6505551213"),
+                "A",
+                Uri.parse("sip:6505551213@testims.com"),
+                Connection.STATE_ACTIVE,
+                Call.Details.DIRECTION_INCOMING);
+        imsConference.handleConferenceParticipantsUpdate(mConferenceHost,
+                Arrays.asList(participant1, participant2));
+        assertEquals(2, imsConference.getNumberOfParticipants());
+        ArgumentCaptor<Connection> captor = ArgumentCaptor.forClass(Connection.class);
+        verify(mMockTelephonyConnectionServiceProxy, times(2)).addExistingConnection(
+                any(PhoneAccountHandle.class), captor.capture(),
+                eq(imsConference));
+
+        // Make sure they're set on the initially created participants.
+        for (Connection c : captor.getAllValues()) {
+            assertEquals(0, c.getConnectionProperties() & Connection.PROPERTY_ASSISTED_DIALING);
+            assertEquals(Connection.PROPERTY_WIFI,
+                    c.getConnectionProperties() & Connection.PROPERTY_WIFI);
+            assertNotNull(c.getStatusHints());
+            assertEquals(TelephonyManager.NETWORK_TYPE_IWLAN, c.getExtras().getInt(
+                    TelecomManager.EXTRA_CALL_NETWORK_TYPE));
+        }
+    }
 
     @Test
     @SmallTest