[automerger] Patch URI vulnerability in contact photo editing am: ccfd94b965

Change-Id: Idb0fb5f8deb5632a5aa52cd7bee48a349dcca09d
diff --git a/Android.mk b/Android.mk
index 0649be2..f0fdce2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -13,11 +13,9 @@
 endif
 
 src_dirs := src $(contacts_common_dir)/src $(phone_common_dir)/src
-res_dirs := res $(contacts_common_dir)/res $(phone_common_dir)/res
+res_dirs := res res-aosp $(contacts_common_dir)/res $(contacts_common_dir)/icons/res $(phone_common_dir)/res
 asset_dirs := $(contacts_common_dir)/assets
 
-src_dirs += src-N $(contacts_common_dir)/src-N $(phone_common_dir)/src-N
-
 LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
 LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) \
     $(support_library_root_dir)/v7/cardview/res
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 21f6812..54e8316 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -16,10 +16,10 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.contacts"
-    android:versionCode="10417"
-    android:versionName="1.4.17">
+    android:versionCode="10422"
+    android:versionName="1.4.22">
 
-    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="24" />
+    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="25" />
     <original-package android:name="com.android.contacts" />
 
     <uses-permission android:name="android.permission.CALL_PHONE" />
@@ -55,6 +55,7 @@
         android:name="com.android.contacts.ContactsApplication"
         android:label="@string/applicationLabel"
         android:icon="@mipmap/ic_contacts_launcher"
+        android:roundIcon="@mipmap/ic_contacts_launcher"
         android:taskAffinity="android.task.contacts"
         android:hardwareAccelerated="true"
         android:supportsRtl="true"
@@ -139,6 +140,11 @@
             <meta-data android:name="android.app.searchable"
                 android:resource="@xml/searchable"
             />
+
+           <meta-data android:name="android.app.shortcuts"
+                android:resource="@xml/shortcuts"
+            />
+
         </activity>
 
         <activity android:name=".activities.ContactSelectionActivity"
diff --git a/res-aosp/xml/shortcuts.xml b/res-aosp/xml/shortcuts.xml
new file mode 100644
index 0000000..35d15e7
--- /dev/null
+++ b/res-aosp/xml/shortcuts.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
+    <shortcut
+        android:enabled="true"
+        android:icon="@drawable/ic_add_circle_24dp"
+        android:shortcutId="shortcut-add-contact"
+        android:shortcutShortLabel="@string/menu_new_contact_action_bar">
+        <intent
+            android:action="android.intent.action.INSERT"
+            android:data="content://com.android.contacts/contacts"
+            android:targetPackage="com.android.contacts"
+            android:targetClass="com.android.contacts.activities.CompactContactEditorActivity"/>
+    </shortcut>
+</shortcuts>
diff --git a/res/drawable-hdpi/ic_message_24dp.png b/res/drawable-hdpi/ic_message_24dp.png
deleted file mode 100644
index 48f008a..0000000
--- a/res/drawable-hdpi/ic_message_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_message_24dp.png b/res/drawable-mdpi/ic_message_24dp.png
deleted file mode 100644
index c18f225..0000000
--- a/res/drawable-mdpi/ic_message_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_message_24dp.png b/res/drawable-xhdpi/ic_message_24dp.png
deleted file mode 100644
index ee5021c..0000000
--- a/res/drawable-xhdpi/ic_message_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_message_24dp.png b/res/drawable-xxhdpi/ic_message_24dp.png
deleted file mode 100644
index e7ca6bd..0000000
--- a/res/drawable-xxhdpi/ic_message_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_message_24dp.png b/res/drawable-xxxhdpi/ic_message_24dp.png
deleted file mode 100644
index f917193..0000000
--- a/res/drawable-xxxhdpi/ic_message_24dp.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_add_circle_24dp.xml b/res/drawable/ic_add_circle_24dp.xml
new file mode 100644
index 0000000..ae37470
--- /dev/null
+++ b/res/drawable/ic_add_circle_24dp.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- Customized ic_add_circle material asset. See b/30018040#comment12 -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:height="24dp"
+        android:width="24dp"
+        android:viewportHeight="192.0"
+        android:viewportWidth="192.0">
+  <path android:fillColor="#F5F5F5"
+        android:pathData="M96,8C47.38,8 8,47.38 8,96s39.38,88 88,88s88,-39.38 88,-88S144.62,8 96,8z"/>
+  <path android:fillColor="#039BE5"
+        android:pathData="M124,100h-24v24h-8v-24H68v-8h24V68h8v24h24V100z"/>
+</vector>
diff --git a/res/layout-land/quickcontact_activity.xml b/res/layout-w500dp-land/quickcontact_activity.xml
similarity index 92%
rename from res/layout-land/quickcontact_activity.xml
rename to res/layout-w500dp-land/quickcontact_activity.xml
index af622dc..63cab3c 100644
--- a/res/layout-land/quickcontact_activity.xml
+++ b/res/layout-w500dp-land/quickcontact_activity.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
diff --git a/res/layout/expanding_entry_card_item.xml b/res/layout/expanding_entry_card_item.xml
index 7c7337e..99f9174 100644
--- a/res/layout/expanding_entry_card_item.xml
+++ b/res/layout/expanding_entry_card_item.xml
@@ -43,7 +43,7 @@
         android:layout_alignParentTop="true"
         android:paddingTop="5dp"
         android:layout_toEndOf="@+id/icon"
-        android:layout_toStartOf="@+id/icon_alternate"
+        android:layout_toStartOf="@+id/third_icon"
         android:textColor="@color/quickcontact_entry_header_text_color"
         android:textAlignment="viewStart"
         android:layout_marginBottom="@dimen/expanding_entry_card_header_margin_bottom" />
@@ -54,7 +54,7 @@
         android:layout_height="wrap_content"
         android:layout_below="@+id/header"
         android:layout_toEndOf="@+id/icon_sub_header"
-        android:layout_toStartOf="@+id/icon_alternate"
+        android:layout_toStartOf="@+id/third_icon"
         android:textAlignment="viewStart"
         android:textColor="@color/quickcontact_entry_sub_header_text_color" />
 
@@ -73,7 +73,7 @@
         android:id="@+id/text"
         android:layout_below="@+id/sub_header"
         android:layout_toEndOf="@+id/icon_text"
-        android:layout_toStartOf="@+id/icon_alternate"
+        android:layout_toStartOf="@+id/third_icon"
         android:textAlignment="viewStart"
         android:textColor="@color/quickcontact_entry_sub_header_text_color" />
 
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 1cd923a..1140634 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -52,18 +52,18 @@
     <string name="menu_create_contact_shortcut" msgid="1217971915748509640">"Kezdőképernyőre"</string>
     <string name="menu_call" msgid="3992595586042260618">"Ismerős hívása"</string>
     <string name="menu_sendSMS" msgid="5535886767547006515">"SMS küldése ismerősnek"</string>
-    <string name="menu_splitAggregate" msgid="2627252205317945563">"Társítás megszüntetése"</string>
+    <string name="menu_splitAggregate" msgid="2627252205317945563">"Szétválasztás"</string>
     <string name="menu_editGroup" msgid="5062005185370983720">"Szerkesztés"</string>
     <string name="menu_deleteGroup" msgid="3486380004411482874">"Törlés"</string>
     <string name="menu_new_contact_action_bar" msgid="7263362129442119188">"Névjegy hozzáadása"</string>
     <string name="menu_new_group_action_bar" msgid="3520232877587377175">"Csoport hozzáadása"</string>
     <string name="splitConfirmation" msgid="7342030840130187290">"Szeretné több névjegyre szétbontani ezt a névjegyet?"</string>
-    <string name="splitConfirmation_positive_button" msgid="9129409098807939699">"Szétbontás"</string>
+    <string name="splitConfirmation_positive_button" msgid="9129409098807939699">"Szétválasztás"</string>
     <string name="splitConfirmationWithPendingChanges" msgid="7719062163511895696">"Szeretné menteni a végrehajtott módosításokat, és több névjeggyé szétbontani ezt a névjegyet?"</string>
     <string name="splitConfirmationWithPendingChanges_positive_button" msgid="9073444264887244032">"Mentés és szétbontás"</string>
     <string name="joinConfirmation" msgid="8262614843581924365">"Szeretné menteni a végrehajtott módosításokat, és társítani a kiválasztott névjegyet?"</string>
     <string name="joinConfirmation_positive_button" msgid="4573092849769149516">"Mentés és társítás"</string>
-    <string name="menu_joinAggregate" msgid="3599512127797513606">"Társítás"</string>
+    <string name="menu_joinAggregate" msgid="3599512127797513606">"Összekapcsolás"</string>
     <string name="menu_save" msgid="1727844363591825909">"Mentés"</string>
     <string name="titleJoinContactDataWith" msgid="6825255752748313944">"Névjegyek társítása"</string>
     <string name="blurbJoinContactDataWith" msgid="5864256698061641841">"Válassza ki a névjegyet, amelyet a következővel szeretne társítani: <xliff:g id="NAME">%s</xliff:g>"</string>
@@ -82,7 +82,7 @@
     <string name="readOnlyContactDeleteConfirmation" msgid="8782086424739664753">"A törlésre kijelölt névjegy több fiókból is tartalmaz információkat. Az írásvédett fiókokból származó információkat csak elrejti a rendszer, nem törli őket."</string>
     <string name="batch_link_single_contact_warning" msgid="1346058571502058767">"Társításhoz legalább két névjegyet kell kiválasztania."</string>
     <string name="batch_link_confirmation" msgid="5845237114309114908">"Társítja a kiválasztott névjegyeket?"</string>
-    <string name="batch_link_confirmation_positive_button" msgid="5018899675473363525">"Társítás"</string>
+    <string name="batch_link_confirmation_positive_button" msgid="5018899675473363525">"Összekapcsolás"</string>
     <string name="single_delete_confirmation" msgid="3106905986948679720">"Törli ezt a névjegyet?"</string>
     <string name="batch_delete_confirmation" msgid="3984346060324014108">"Törli a kijelölt névjegyeket?"</string>
     <string name="batch_delete_read_only_contact_confirmation" msgid="8411117621035639964">"Az írásvédett fiókokból származó névjegyeket nem lehet törölni, de el lehet rejteni őket."</string>
@@ -294,7 +294,7 @@
       <item quantity="other">Társított névjegyek (<xliff:g id="COUNT">%d</xliff:g>)</item>
       <item quantity="one">Társított névjegy</item>
     </plurals>
-    <string name="quickcontact_contacts_number" msgid="6036916944287597682">"<xliff:g id="COUNT">%d</xliff:g> társított névjegy"</string>
+    <string name="quickcontact_contacts_number" msgid="6036916944287597682">"<xliff:g id="COUNT">%d</xliff:g> összekapcsolt névjegy"</string>
     <string name="quick_contact_display_name_with_phonetic" msgid="3692038078718876610">"<xliff:g id="DISPLAY_NAME">%s</xliff:g> (<xliff:g id="PHONETIC_NAME">%s</xliff:g>)"</string>
     <string name="quickcontact_suggestion_link_button" msgid="3244619714781727946">"NÉVJEGYEK TÁRSÍTÁSA"</string>
     <string name="quickcontact_suggestion_cancel_button" msgid="8236954313106630862">"MÉGSE"</string>
@@ -314,7 +314,7 @@
     <string name="suggestion_card_this_contact_title" msgid="3039457405374454914">"Ez a névjegy"</string>
     <string name="suggestion_card_duplicates_title" msgid="9107788743178980902">"Lehetséges ismétlődések"</string>
     <string name="suggestion_card_help_message" msgid="4474061044387181093">"Lehet, hogy ezek a névjegyek ugyanahhoz a személyhez tartoznak. Lehetőség van a névjegyek egyesítésére."</string>
-    <string name="compact_editor_linked_contacts_title" msgid="4417919183651782674">"Társított névjegyek"</string>
+    <string name="compact_editor_linked_contacts_title" msgid="4417919183651782674">"Összekapcsolt névjegyek"</string>
     <string name="from_your_accounts" msgid="1746293107836889912">"Az Ön fiókjaiból"</string>
     <string name="take_a_photo_button" msgid="6268693854069113488">"Fotó készítése"</string>
     <string name="all_photos_button" msgid="1943122929420111351">"Az összes fotó"</string>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index d28a829..29b37cf 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -158,7 +158,7 @@
     <string name="video_chat" msgid="1872255818640336072">"Видео чат"</string>
     <string name="connections" msgid="8098440723172028350">"Байланыстар"</string>
     <string name="add_connection_button" msgid="4861308615789601727">"Байланыс қосу"</string>
-    <string name="recent" msgid="2659189233141493004">"Жуықта қолданылған"</string>
+    <string name="recent" msgid="2659189233141493004">"Соңғы"</string>
     <string name="recent_updates" msgid="4267258535615860710">"Соңғы жаңартулар"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> контакт"</string>
     <string name="google_account_type_format" msgid="5283997303922067997">"<xliff:g id="SOURCE">%1$s</xliff:g> есептік жазбасы"</string>
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml
index fb42e32..27906a1 100644
--- a/res/values-kn-rIN/strings.xml
+++ b/res/values-kn-rIN/strings.xml
@@ -324,8 +324,8 @@
     <string name="editor_delete_view_description_short" msgid="7335518371270844912">"<xliff:g id="DATA_KIND">%s</xliff:g> ಅಳಿಸು"</string>
     <string name="photo_view_description_not_checked" msgid="8876314195990885177">"<xliff:g id="USER_NAME">%s </xliff:g><xliff:g id="ACCOUNT_TYPE">%s </xliff:g> ಅವರಿಂದ ಫೋಟೋ ಗುರುತಿಸಲಾಗಿಲ್ಲ"</string>
     <string name="photo_view_description_checked" msgid="3906597168607472795">"<xliff:g id="USER_NAME">%s </xliff:g><xliff:g id="ACCOUNT_TYPE">%s </xliff:g> ಅವರಿಂದ ಫೋಟೋ ಗುರುತಿಸಲಾಗಿದೆ"</string>
-    <string name="photo_view_description_not_checked_no_info" msgid="2749154927006406981">"ಅಜ್ಞಾತ ಖಾತೆಯಿಂದ ಫೋಟೋವನ್ನು ಗುರುತಿಸಲಾಗಿಲ್ಲ"</string>
-    <string name="photo_view_description_checked_no_info" msgid="4974335987092590591">"ಅಜ್ಞಾತ ಖಾತೆಯಿಂದ ಫೋಟೋವನ್ನು ಗುರುತಿಸಲಾಗಿದೆ"</string>
+    <string name="photo_view_description_not_checked_no_info" msgid="2749154927006406981">"ಅಪರಿಚಿತ ಖಾತೆಯಿಂದ ಫೋಟೋವನ್ನು ಗುರುತಿಸಲಾಗಿಲ್ಲ"</string>
+    <string name="photo_view_description_checked_no_info" msgid="4974335987092590591">"ಅಪರಿಚಿತ ಖಾತೆಯಿಂದ ಫೋಟೋವನ್ನು ಗುರುತಿಸಲಾಗಿದೆ"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"ಭಾಷೆಯ ಬದಲಾವಣೆಯನ್ನು ಪ್ರತಿಬಿಂಬಿಸಲು ಸಂಪರ್ಕ ಪಟ್ಟಿಯನ್ನು ಅಪ್‌ಡೇಟ್ ಮಾಡಲಾಗುತ್ತಿದೆ.\n\nದಯವಿಟ್ಟು ಕಾಯಿರಿ..."</string>
     <string name="menu_blocked_numbers" msgid="5272951629083025995">"ನಿರ್ಬಂಧಿಸಲಾದ ಸಂಖ್ಯೆಗಳು"</string>
 </resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index c34e5bf..db5260c 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -192,7 +192,7 @@
     <string name="list_filter_custom" msgid="8910173055702057002">"사용자 설정"</string>
     <string name="activity_title_settings" msgid="5464130076132770781">"설정"</string>
     <string name="menu_settings" msgid="377929915873428211">"설정"</string>
-    <string name="menu_help" msgid="1680178646764069976">"도움말 및 의견"</string>
+    <string name="menu_help" msgid="1680178646764069976">"고객센터"</string>
     <string name="preference_displayOptions" msgid="1341720270148252393">"표시 옵션"</string>
     <string name="organization_company_and_title" msgid="6718207751363732025">"<xliff:g id="COMPANY_0">%2$s</xliff:g>, <xliff:g id="COMPANY_1">%1$s</xliff:g>"</string>
     <string name="non_phone_caption" msgid="1541655052330027380">"전화번호"</string>
diff --git a/res/values-land/bools.xml b/res/values-land/bools.xml
index bd0650f..beaa960 100644
--- a/res/values-land/bools.xml
+++ b/res/values-land/bools.xml
@@ -15,6 +15,7 @@
 -->
 <resources>
 
-    <bool name="quickcontact_two_panel">true</bool>
+    <bool name="quickcontact_two_panel">false</bool>
+    <bool name="contacteditor_two_panel">true</bool>
 
 </resources>
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml
index dc7f797..40a5b80 100644
--- a/res/values-mr-rIN/strings.xml
+++ b/res/values-mr-rIN/strings.xml
@@ -326,6 +326,6 @@
     <string name="photo_view_description_checked" msgid="3906597168607472795">"<xliff:g id="ACCOUNT_TYPE">%s </xliff:g><xliff:g id="USER_NAME">%s </xliff:g>कडील फोटो चेक केला"</string>
     <string name="photo_view_description_not_checked_no_info" msgid="2749154927006406981">"अज्ञात खात्यामधील फोटो चेक केला नाही"</string>
     <string name="photo_view_description_checked_no_info" msgid="4974335987092590591">"अज्ञात खात्यामधील फोटो चेक केला"</string>
-    <string name="locale_change_in_progress" msgid="1124266507671178413">"भाषेचे बदल प्रतिबिंबित करण्यासाठी संपर्क सूची अद्यतनित केली जात आहे. \n\nकृपया प्रतीक्षा करा..."</string>
+    <string name="locale_change_in_progress" msgid="1124266507671178413">"भाषेचे बदल दर्शवण्यासाठी संपर्क सूची अद्यतनित केली जात आहे. \n\nकृपया प्रतीक्षा करा..."</string>
     <string name="menu_blocked_numbers" msgid="5272951629083025995">"अवरोधित केलेले नंबर"</string>
 </resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 9bb1a7d..884bdc1 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -110,7 +110,7 @@
     <string name="noGroups" msgid="8614664663561385253">"Ingen grupper."</string>
     <string name="noAccounts" msgid="7768267764545265909">"Du må ha en konto for å opprette grupper."</string>
     <string name="emptyGroup" msgid="7502116218697177370">"Det er ingen personer i denne gruppen."</string>
-    <string name="addPeopleToGroup" msgid="7879585947222263516">"Rediger gruppen for å legge til noen."</string>
+    <string name="addPeopleToGroup" msgid="7879585947222263516">"Endre gruppen for å legge til noen."</string>
     <string name="savingContact" msgid="4075751076741924939">"Lagrer kontakt…"</string>
     <string name="contactSavedToast" msgid="9171862279493213075">"Kontakt er lagret"</string>
     <string name="contactUnlinkedToast" msgid="7122823195786012553">"Tilknytningen mellom kontaktene er fjernet"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 9218c97..64bd6cd 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -106,7 +106,7 @@
     <string name="attach_photo_dialog_title" msgid="5599827035558557169">"Слика контакта"</string>
     <string name="customLabelPickerTitle" msgid="1081475101983255212">"Назив прилагођене ознаке"</string>
     <string name="send_to_voicemail_checkbox" msgid="9001686764070676353">"Шаљи позиве директно у гласовну пошту"</string>
-    <string name="removePhoto" msgid="4898105274130284565">"Уклони фотографију"</string>
+    <string name="removePhoto" msgid="4898105274130284565">"Уклони слику"</string>
     <string name="noContacts" msgid="4955659076981974652">"Нема контаката"</string>
     <string name="noGroups" msgid="8614664663561385253">"Нема група."</string>
     <string name="noAccounts" msgid="7768267764545265909">"Морате да имате налог да бисте могли да правите групе."</string>
@@ -145,7 +145,7 @@
     <string name="callAgain" msgid="3197312117049874778">"Позови поново"</string>
     <string name="returnCall" msgid="8171961914203617813">"Узврати позив"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Желите ли да додате имејл адресу „<xliff:g id="EMAIL">%s</xliff:g>“ у контакте?"</string>
-    <string name="description_contact_photo" msgid="3387458082667894062">"фотографија контакта"</string>
+    <string name="description_contact_photo" msgid="3387458082667894062">"слика контакта"</string>
     <string name="description_plus_button" msgid="515164827856229880">"плус"</string>
     <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> од <xliff:g id="TOTAL_NUMBER">%s</xliff:g> контак(а)та"</string>
     <string name="search_settings_description" msgid="2675223022992445813">"Имена контаката"</string>
@@ -170,8 +170,8 @@
     <skip />
     <string name="contact_read_only" msgid="7421346527289472273">"Не може да се измени из ове апликације."</string>
     <string name="group_read_only" msgid="1061762906115697637">"Не може да се мења на овом уређају."</string>
-    <string name="take_photo" msgid="7496128293167402354">"Сними фотографију"</string>
-    <string name="take_new_photo" msgid="7341354729436576304">"Направи нову фотографију"</string>
+    <string name="take_photo" msgid="7496128293167402354">"Сликај"</string>
+    <string name="take_new_photo" msgid="7341354729436576304">"Сликај нову слику"</string>
     <string name="pick_photo" msgid="2129509985223564942">"Изабери слику"</string>
     <string name="pick_new_photo" msgid="9122450996263688237">"Изаберите нову слику"</string>
     <string name="upgrade_in_progress" msgid="474511436863451061">"Контакт листа се ажурира."</string>
diff --git a/res/layout-land/quickcontact_activity.xml b/res/values-w500dp-land/bools.xml
similarity index 81%
copy from res/layout-land/quickcontact_activity.xml
copy to res/values-w500dp-land/bools.xml
index af622dc..65174ba 100644
--- a/res/layout-land/quickcontact_activity.xml
+++ b/res/values-w500dp-land/bools.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,6 +13,8 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<merge>
-    <include layout="@layout/quickcontact_activity_landscape" />
-</merge>
\ No newline at end of file
+<resources>
+
+    <bool name="quickcontact_two_panel">true</bool>
+
+</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 578d982..2752091 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -27,7 +27,7 @@
     <string name="shortcutActivityTitle" msgid="6642877210643565436">"选择联系人快捷方式"</string>
     <string name="callShortcutActivityTitle" msgid="6065749861423648991">"选择一个可直接拨号的号码"</string>
     <string name="messageShortcutActivityTitle" msgid="3084542316620335911">"选择一个可直接向其发送短信的号码"</string>
-    <string name="contactInsertOrEditActivityTitle" msgid="6527505405325862674">"添加至通讯录"</string>
+    <string name="contactInsertOrEditActivityTitle" msgid="6527505405325862674">"添加到现有联系人"</string>
     <string name="contactPickerActivityTitle" msgid="4301062192337417640">"选择联系人"</string>
     <string name="header_entry_contact_list_adapter_header_title" msgid="2436981165830115659">"创建新联系人"</string>
     <string name="starredList" msgid="4817256136413959463">"已加星标的内容"</string>
@@ -197,7 +197,7 @@
     <string name="organization_company_and_title" msgid="6718207751363732025">"<xliff:g id="COMPANY_0">%2$s</xliff:g>,<xliff:g id="COMPANY_1">%1$s</xliff:g>"</string>
     <string name="non_phone_caption" msgid="1541655052330027380">"电话号码"</string>
     <string name="non_phone_add_to_contacts" msgid="6590985286250471169">"添加到通讯录"</string>
-    <string name="activity_title_confirm_add_detail" msgid="4065089866210730616">"添加至联系人"</string>
+    <string name="activity_title_confirm_add_detail" msgid="4065089866210730616">"添加到现有联系人"</string>
     <string name="non_phone_close" msgid="7608506439725515667">"关闭"</string>
     <string name="widget_name_and_phonetic" msgid="8739586586600099979">"<xliff:g id="DISPLAY_NAME">%1$s</xliff:g> (<xliff:g id="PHONETIC_NAME">%2$s</xliff:g>)"</string>
     <string name="date_year_toggle" msgid="7122002148518724139">"包含年份"</string>
diff --git a/res/values/bools.xml b/res/values/bools.xml
index b94cc85..eef3808 100644
--- a/res/values/bools.xml
+++ b/res/values/bools.xml
@@ -17,5 +17,6 @@
 
     <bool name="quickcontact_two_panel">false</bool>
     <bool name="contact_all_list_show_card_frame">false</bool>
+    <bool name="contacteditor_two_panel">false</bool>
 
 </resources>
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 0e212ef..a6c7b8b 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -29,6 +29,7 @@
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.Parcelable;
+import android.provider.BlockedNumberContract;
 import android.provider.ContactsContract;
 import android.provider.ContactsContract.Contacts;
 import android.provider.ContactsContract.ProviderStatus;
@@ -58,7 +59,6 @@
 import com.android.contacts.common.ContactsUtils;
 import com.android.contacts.common.activity.RequestPermissionsActivity;
 import com.android.contacts.common.compat.TelecomManagerUtil;
-import com.android.contacts.common.compat.BlockedNumberContractCompat;
 import com.android.contacts.common.dialog.ClearFrequentsDialog;
 import com.android.contacts.common.interactions.ImportExportDialogFragment;
 import com.android.contacts.common.list.ContactEntryListFragment;
@@ -1103,7 +1103,7 @@
         final boolean showMiscOptions = !isSearchOrSelectionMode;
         final boolean showBlockedNumbers = PhoneCapabilityTester.isPhone(this)
                 && ContactsUtils.FLAG_N_FEATURE
-                && BlockedNumberContractCompat.canCurrentUserBlockNumbers(this);
+                && BlockedNumberContract.canCurrentUserBlockNumbers(this);
         makeMenuItemVisible(menu, R.id.menu_search, showMiscOptions);
         makeMenuItemVisible(menu, R.id.menu_import_export, showMiscOptions);
         makeMenuItemVisible(menu, R.id.menu_accounts, showMiscOptions);
diff --git a/src/com/android/contacts/editor/AggregationSuggestionView.java b/src/com/android/contacts/editor/AggregationSuggestionView.java
index e3bab7e..5a3da00 100644
--- a/src/com/android/contacts/editor/AggregationSuggestionView.java
+++ b/src/com/android/contacts/editor/AggregationSuggestionView.java
@@ -22,6 +22,7 @@
 import android.provider.ContactsContract.Contacts;
 import android.text.TextUtils;
 import android.util.AttributeSet;
+import android.view.View;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -104,6 +105,8 @@
             dataText = suggestion.emailAddress;
         } else if (suggestion.phoneNumber != null) {
             dataText = suggestion.phoneNumber;
+            // Phone numbers should always be in LTR mode.
+            data.setTextDirection(View.TEXT_DIRECTION_LTR);
         }
         data.setText(dataText);
     }
diff --git a/src/com/android/contacts/editor/CompactPhotoEditorView.java b/src/com/android/contacts/editor/CompactPhotoEditorView.java
index 1696a12..899e22a 100644
--- a/src/com/android/contacts/editor/CompactPhotoEditorView.java
+++ b/src/com/android/contacts/editor/CompactPhotoEditorView.java
@@ -78,7 +78,7 @@
 
         mLandscapePhotoRatio = getTypedFloat(R.dimen.quickcontact_landscape_photo_ratio);
         mPortraitPhotoRatio = getTypedFloat(R.dimen.editor_portrait_photo_ratio);
-        mIsTwoPanel = getResources().getBoolean(R.bool.quickcontact_two_panel);
+        mIsTwoPanel = getResources().getBoolean(R.bool.contacteditor_two_panel);
 
         final TypedArray styledAttributes = getContext().getTheme().obtainStyledAttributes(
                 new int[] { android.R.attr.actionBarSize });
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index f705819..df201e1 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -244,7 +244,7 @@
             // Show the "next" button in IME to navigate between text fields
             // TODO: Still need to properly navigate to/from sections without text fields,
             // See Bug: 5713510
-            fieldView.setImeOptions(EditorInfo.IME_ACTION_NEXT);
+            fieldView.setImeOptions(EditorInfo.IME_ACTION_NEXT | EditorInfo.IME_FLAG_NO_FULLSCREEN);
 
             // Read current value from state
             final String column = field.column;
diff --git a/src/com/android/contacts/interactions/SmsInteraction.java b/src/com/android/contacts/interactions/SmsInteraction.java
index 7d26401..ba0070c 100644
--- a/src/com/android/contacts/interactions/SmsInteraction.java
+++ b/src/com/android/contacts/interactions/SmsInteraction.java
@@ -35,7 +35,7 @@
 public class SmsInteraction implements ContactInteraction {
 
     private static final String URI_TARGET_PREFIX = "smsto:";
-    private static final int SMS_ICON_RES = R.drawable.ic_message_24dp;
+    private static final int SMS_ICON_RES = R.drawable.ic_message_24dp_mirrored;
     private static BidiFormatter sBidiFormatter = BidiFormatter.getInstance();
 
     private ContentValues mValues;
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 5469c2e..c63c989 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -32,6 +32,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.res.ColorStateList;
+import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
@@ -113,6 +114,7 @@
 import com.android.contacts.common.activity.RequestPermissionsActivity;
 import com.android.contacts.common.compat.CompatUtils;
 import com.android.contacts.common.compat.EventCompat;
+import com.android.contacts.common.compat.MultiWindowCompat;
 import com.android.contacts.common.dialog.CallSubjectDialog;
 import com.android.contacts.common.editor.SelectAccountDialogFragment;
 import com.android.contacts.common.interactions.TouchPointManager;
@@ -1039,7 +1041,9 @@
         mWindowScrim.setAlpha(0);
         getWindow().setBackgroundDrawable(mWindowScrim);
 
-        mScroller.initialize(mMultiShrinkScrollerListener, mExtraMode == MODE_FULLY_EXPANDED);
+        mScroller.initialize(mMultiShrinkScrollerListener, mExtraMode == MODE_FULLY_EXPANDED,
+                /* maximumHeaderTextSize */ -1,
+                /* shouldUpdateNameViewHeight */ true);
         // mScroller needs to perform asynchronous measurements after initalize(), therefore
         // we can't mark this as GONE.
         mScroller.setVisibility(View.INVISIBLE);
@@ -1152,7 +1156,11 @@
                     ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId));
         }
         mExtraMode = getIntent().getIntExtra(QuickContact.EXTRA_MODE, QuickContact.MODE_LARGE);
-        mExtraPrioritizedMimeType = getIntent().getStringExtra(QuickContact.EXTRA_PRIORITIZED_MIMETYPE);
+        if (isMultiWindowOnPhone()) {
+            mExtraMode = QuickContact.MODE_LARGE;
+        }
+        mExtraPrioritizedMimeType =
+                getIntent().getStringExtra(QuickContact.EXTRA_PRIORITIZED_MIMETYPE);
         final Uri oldLookupUri = mLookupUri;
 
         if (lookupUri == null) {
@@ -1189,7 +1197,12 @@
             return;
         }
         mHasAlreadyBeenOpened = true;
-        mScroller.scrollUpForEntranceAnimation(mExtraMode != MODE_FULLY_EXPANDED);
+        mScroller.scrollUpForEntranceAnimation(/* scrollToCurrentPosition */ !isMultiWindowOnPhone()
+                && (mExtraMode != MODE_FULLY_EXPANDED));
+    }
+
+    private boolean isMultiWindowOnPhone() {
+        return MultiWindowCompat.isInMultiWindowMode(this) && PhoneCapabilityTester.isPhone(this);
     }
 
     /** Assign this string to the view if it is not empty. */
@@ -1868,7 +1881,7 @@
                 alternateIntent = new Intent(Intent.ACTION_SENDTO,
                         Uri.fromParts(ContactsUtils.SCHEME_SMSTO, phone.getNumber(), null));
 
-                alternateIcon = res.getDrawable(R.drawable.ic_message_24dp);
+                alternateIcon = res.getDrawable(R.drawable.ic_message_24dp_mirrored);
                 alternateContentDescription.append(res.getString(R.string.sms_custom, header));
                 smsContentDescription = com.android.contacts.common.util.ContactDisplayUtils
                         .getTelephoneTtsSpannable(alternateContentDescription.toString(), header);
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java
index eb3283f..b1deb90 100644
--- a/src/com/android/contacts/widget/MultiShrinkScroller.java
+++ b/src/com/android/contacts/widget/MultiShrinkScroller.java
@@ -66,7 +66,7 @@
 public class MultiShrinkScroller extends FrameLayout {
 
     /**
-     * 1000 pixels per millisecond. Ie, 1 pixel per second.
+     * 1000 pixels per second. Ie, 1 pixel per millisecond.
      */
     private static final int PIXELS_PER_SECOND = 1000;
 
@@ -135,6 +135,8 @@
      */
     private boolean mIsOpenContactSquare;
     private int mMaximumHeaderTextSize;
+    private int mMaximumPhoneticNameViewHeight;
+    private int mMaximumFullNameViewHeight;
     private int mCollapsedTitleBottomMargin;
     private int mCollapsedTitleStartMargin;
     private int mMinimumPortraitHeaderHeight;
@@ -287,7 +289,8 @@
     /**
      * This method must be called inside the Activity's OnCreate.
      */
-    public void initialize(MultiShrinkScrollerListener listener, boolean isOpenContactSquare) {
+    public void initialize(MultiShrinkScrollerListener listener, boolean isOpenContactSquare,
+                final int maximumHeaderTextSize, final boolean shouldUpdateNameViewHeight) {
         mScrollView = (ScrollView) findViewById(R.id.content_scroller);
         mScrollViewChild = findViewById(R.id.card_container);
         mToolbar = findViewById(R.id.toolbar_parent);
@@ -346,7 +349,20 @@
                 mMaximumPortraitHeaderHeight = mIsTwoPanel ? getHeight()
                         : mPhotoViewContainer.getWidth();
                 setHeaderHeight(getMaximumScrollableHeaderHeight());
-                mMaximumHeaderTextSize = mTitleAndPhoneticNameView.getHeight();
+                if (shouldUpdateNameViewHeight) {
+                    mMaximumHeaderTextSize = mTitleAndPhoneticNameView.getHeight();
+                    mMaximumFullNameViewHeight = mLargeTextView.getHeight();
+                    // We cannot rely on mPhoneticNameView.getHeight() since it could be 0
+                    final int phoneticNameSize = getResources().getDimensionPixelSize(
+                            R.dimen.quickcontact_maximum_phonetic_name_size);
+                    final int fullNameSize = getResources().getDimensionPixelSize(
+                            R.dimen.quickcontact_maximum_title_size);
+                    mMaximumPhoneticNameViewHeight =
+                            mMaximumFullNameViewHeight * phoneticNameSize / fullNameSize;
+                }
+                if (maximumHeaderTextSize > 0) {
+                    mMaximumHeaderTextSize = maximumHeaderTextSize;
+                }
                 if (mIsTwoPanel) {
                     mMaximumHeaderHeight = getHeight();
                     mMinimumHeaderHeight = mMaximumHeaderHeight;
@@ -393,7 +409,7 @@
         final float TITLE_GRADIENT_SIZE_COEFFICIENT = 1.25f;
         final FrameLayout.LayoutParams largeTextLayoutParms
                 = (FrameLayout.LayoutParams) mTitleAndPhoneticNameView.getLayoutParams();
-        titleGradientLayoutParams.height = (int) ((mTitleAndPhoneticNameView.getHeight()
+        titleGradientLayoutParams.height = (int) ((mMaximumHeaderTextSize
                 + largeTextLayoutParms.bottomMargin) * TITLE_GRADIENT_SIZE_COEFFICIENT);
         mTitleGradientView.setLayoutParams(titleGradientLayoutParams);
     }
@@ -418,7 +434,9 @@
         // in case it just changed from Visibility=GONE.
         mPhoneticNameView.setVisibility(View.VISIBLE);
         // TODO try not using initialize() to refresh phonetic name view: b/27410518
-        initialize(mListener, mIsOpenContactSquare);
+        initialize(mListener, mIsOpenContactSquare, /* maximumHeaderTextSize */
+                (mMaximumFullNameViewHeight + mMaximumPhoneticNameViewHeight),
+                /* shouldUpdateNameViewHeight */ false);
     }
 
     public void setPhoneticNameGone() {
@@ -429,7 +447,9 @@
         mPhoneticNameView.setVisibility(View.GONE);
         // Initialize to make Visibility work.
         // TODO try not using initialize() to refresh phonetic name view: b/27410518
-        initialize(mListener, mIsOpenContactSquare);
+        initialize(mListener, mIsOpenContactSquare,
+                /* maximumHeaderTextSize */ mMaximumFullNameViewHeight,
+                /* shouldUpdateNameViewHeight */ false);
     }
 
     @Override
@@ -1039,7 +1059,7 @@
         } else {
             mTitleAndPhoneticNameView.setPivotX(0);
         }
-        mTitleAndPhoneticNameView.setPivotY(mTitleAndPhoneticNameView.getHeight() / 2);
+        mTitleAndPhoneticNameView.setPivotY(mMaximumHeaderTextSize / 2);
 
         final int toolbarHeight = mToolbar.getLayoutParams().height;
         mPhotoTouchInterceptOverlay.setClickable(toolbarHeight != mMaximumHeaderHeight);
@@ -1085,7 +1105,7 @@
         // Padding needed on the mTitleAndPhoneticNameView so that it has the same amount of
         // padding as the target rectangle.
         mCollapsedTitleBottomMargin =
-                desiredTopToCenter - mTitleAndPhoneticNameView.getHeight() / 2;
+                desiredTopToCenter - mMaximumHeaderTextSize / 2;
     }
 
     /**
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index e82cea8..65c04bc 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -19,7 +19,7 @@
 
     <uses-sdk
         android:minSdkVersion="21"
-        android:targetSdkVersion="24" />
+        android:targetSdkVersion="25" />
 
     <uses-permission android:name="android.permission.READ_CONTACTS" />
     <uses-permission android:name="android.permission.WRITE_CONTACTS" />