Merge "Use O APIs for shortcuts from QuickContact" into ub-contactsdialer-i-dev
am: d2b97ea42b

Change-Id: I2ed67f11d42426660de7a2f2fef3cf4cca5c03c6
diff --git a/Android.mk b/Android.mk
index 1c3fae9..57d521e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -18,6 +18,7 @@
 LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
 LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) \
     $(support_library_root_dir)/design/res \
+    $(support_library_root_dir)/transition/res \
     $(support_library_root_dir)/v7/appcompat/res \
     $(support_library_root_dir)/v7/cardview/res \
     $(support_library_root_dir)/v7/recyclerview/res
@@ -28,6 +29,7 @@
     --extra-packages com.android.contacts.common \
     --extra-packages com.android.phone.common \
     --extra-packages android.support.design \
+    --extra-packages android.support.transition \
     --extra-packages android.support.v7.appcompat \
     --extra-packages android.support.v7.cardview \
     --extra-packages android.support.v7.recyclerview
@@ -35,6 +37,7 @@
 LOCAL_STATIC_JAVA_LIBRARIES := \
     android-common \
     android-support-design \
+    android-support-transition \
     android-support-v13 \
     android-support-v7-appcompat \
     android-support-v7-cardview \
@@ -49,7 +52,11 @@
 LOCAL_CERTIFICATE := shared
 LOCAL_PRIVILEGED_MODULE := true
 
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+LOCAL_PROGUARD_FLAG_FILES := \
+    proguard.flags \
+    ../../../frameworks/support/core-ui/proguard-rules.pro \
+    ../../../frameworks/support/design/proguard-rules.pro \
+    ../../../frameworks/support/v7/recyclerview/proguard-rules.pro
 
 LOCAL_SDK_VERSION := current
 LOCAL_MIN_SDK_VERSION := 21
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index cd0b853..6b775cc 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -16,8 +16,8 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.android.contacts"
-          android:versionCode="10707"
-          android:versionName="1.7.7">
+          android:versionCode="20000"
+          android:versionName="2.0.0">
 
     <uses-sdk
         android:minSdkVersion="21"
diff --git a/res/layout/contacts_drawer_activity.xml b/res/layout/contacts_drawer_activity.xml
index 5b21a31..84e536b 100644
--- a/res/layout/contacts_drawer_activity.xml
+++ b/res/layout/contacts_drawer_activity.xml
@@ -48,4 +48,4 @@
         android:layout_width="@dimen/drawer_width"
         android:layout_height="match_parent" />
 
-</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
+</android.support.v4.widget.DrawerLayout>
diff --git a/res/layout/text_fields_editor_view.xml b/res/layout/text_fields_editor_view.xml
index 326977d..dc3a312 100644
--- a/res/layout/text_fields_editor_view.xml
+++ b/res/layout/text_fields_editor_view.xml
@@ -43,6 +43,6 @@
     <include
         android:id="@+id/delete_button_container"
         layout="@layout/edit_delete_button"
-        android:visibility="invisible" />
+        android:visibility="gone" />
 
 </com.android.contacts.editor.TextFieldsEditorView>
diff --git a/res/values-az-rAZ/strings.xml b/res/values-az/strings.xml
similarity index 100%
rename from res/values-az-rAZ/strings.xml
rename to res/values-az/strings.xml
diff --git a/res/values-be-rBY/strings.xml b/res/values-be/strings.xml
similarity index 100%
rename from res/values-be-rBY/strings.xml
rename to res/values-be/strings.xml
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn/strings.xml
similarity index 100%
rename from res/values-bn-rBD/strings.xml
rename to res/values-bn/strings.xml
diff --git a/res/values-bs-rBA/strings.xml b/res/values-bs/strings.xml
similarity index 100%
rename from res/values-bs-rBA/strings.xml
rename to res/values-bs/strings.xml
diff --git a/res/values-et-rEE/strings.xml b/res/values-et/strings.xml
similarity index 100%
rename from res/values-et-rEE/strings.xml
rename to res/values-et/strings.xml
diff --git a/res/values-eu-rES/strings.xml b/res/values-eu/strings.xml
similarity index 100%
rename from res/values-eu-rES/strings.xml
rename to res/values-eu/strings.xml
diff --git a/res/values-gl-rES/strings.xml b/res/values-gl/strings.xml
similarity index 100%
rename from res/values-gl-rES/strings.xml
rename to res/values-gl/strings.xml
diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu/strings.xml
similarity index 100%
rename from res/values-gu-rIN/strings.xml
rename to res/values-gu/strings.xml
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy/strings.xml
similarity index 100%
rename from res/values-hy-rAM/strings.xml
rename to res/values-hy/strings.xml
diff --git a/res/values-is-rIS/strings.xml b/res/values-is/strings.xml
similarity index 100%
rename from res/values-is-rIS/strings.xml
rename to res/values-is/strings.xml
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka/strings.xml
similarity index 100%
rename from res/values-ka-rGE/strings.xml
rename to res/values-ka/strings.xml
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk/strings.xml
similarity index 100%
rename from res/values-kk-rKZ/strings.xml
rename to res/values-kk/strings.xml
diff --git a/res/values-km-rKH/strings.xml b/res/values-km/strings.xml
similarity index 100%
rename from res/values-km-rKH/strings.xml
rename to res/values-km/strings.xml
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn/strings.xml
similarity index 100%
rename from res/values-kn-rIN/strings.xml
rename to res/values-kn/strings.xml
diff --git a/res/values-ky-rKG/strings.xml b/res/values-ky/strings.xml
similarity index 100%
rename from res/values-ky-rKG/strings.xml
rename to res/values-ky/strings.xml
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo/strings.xml
similarity index 100%
rename from res/values-lo-rLA/strings.xml
rename to res/values-lo/strings.xml
diff --git a/res/values-mk-rMK/strings.xml b/res/values-mk/strings.xml
similarity index 100%
rename from res/values-mk-rMK/strings.xml
rename to res/values-mk/strings.xml
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml/strings.xml
similarity index 100%
rename from res/values-ml-rIN/strings.xml
rename to res/values-ml/strings.xml
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn/strings.xml
similarity index 100%
rename from res/values-mn-rMN/strings.xml
rename to res/values-mn/strings.xml
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr/strings.xml
similarity index 100%
rename from res/values-mr-rIN/strings.xml
rename to res/values-mr/strings.xml
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms/strings.xml
similarity index 100%
rename from res/values-ms-rMY/strings.xml
rename to res/values-ms/strings.xml
diff --git a/res/values-my-rMM/strings.xml b/res/values-my/strings.xml
similarity index 100%
rename from res/values-my-rMM/strings.xml
rename to res/values-my/strings.xml
diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne/strings.xml
similarity index 100%
rename from res/values-ne-rNP/strings.xml
rename to res/values-ne/strings.xml
diff --git a/res/values-pa-rIN/strings.xml b/res/values-pa/strings.xml
similarity index 100%
rename from res/values-pa-rIN/strings.xml
rename to res/values-pa/strings.xml
diff --git a/res/values-si-rLK/strings.xml b/res/values-si/strings.xml
similarity index 100%
rename from res/values-si-rLK/strings.xml
rename to res/values-si/strings.xml
diff --git a/res/values-sq-rAL/strings.xml b/res/values-sq/strings.xml
similarity index 100%
rename from res/values-sq-rAL/strings.xml
rename to res/values-sq/strings.xml
diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta/strings.xml
similarity index 100%
rename from res/values-ta-rIN/strings.xml
rename to res/values-ta/strings.xml
diff --git a/res/values-te-rIN/strings.xml b/res/values-te/strings.xml
similarity index 100%
rename from res/values-te-rIN/strings.xml
rename to res/values-te/strings.xml
diff --git a/res/values-ur-rPK/strings.xml b/res/values-ur/strings.xml
similarity index 100%
rename from res/values-ur-rPK/strings.xml
rename to res/values-ur/strings.xml
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz/strings.xml
similarity index 100%
rename from res/values-uz-rUZ/strings.xml
rename to res/values-uz/strings.xml
diff --git a/src/com/android/contacts/activities/ContactEditorActivity.java b/src/com/android/contacts/activities/ContactEditorActivity.java
index ec49d48..3d90173 100644
--- a/src/com/android/contacts/activities/ContactEditorActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorActivity.java
@@ -18,7 +18,6 @@
 
 import android.app.Dialog;
 import android.app.FragmentTransaction;
-import android.content.ComponentName;
 import android.content.ContentValues;
 import android.content.Intent;
 import android.net.Uri;
@@ -319,11 +318,6 @@
         final Intent intent = getIntent();
         final String action = intent.getAction();
 
-        // Update the component name of our intent to be this class to clear out any activity
-        // aliases. Otherwise ContactSaveService won't notify this activity once a save is finished.
-        // See b/34154706 for more info.
-        intent.setComponent(new ComponentName(this, ContactEditorActivity.class));
-
         // Determine whether or not this activity should be finished after the user is done
         // editing the contact or if this activity should launch another activity to view the
         // contact's details.
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index 5712f39..68832ff 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -70,7 +70,7 @@
 
     private Spinner mLabel;
     private EditTypeAdapter mEditTypeAdapter;
-    protected View mDeleteContainer;
+    private View mDeleteContainer;
     private ImageView mDelete;
 
     private DataKind mKind;
@@ -230,7 +230,7 @@
             mDeleteContainer.setVisibility(View.VISIBLE);
             mDelete.setEnabled(!mReadOnly && isEnabled());
         } else {
-            mDeleteContainer.setVisibility(View.INVISIBLE);
+            mDeleteContainer.setVisibility(View.GONE);
         }
     }
 
diff --git a/src/com/android/contacts/editor/StructuredNameEditorView.java b/src/com/android/contacts/editor/StructuredNameEditorView.java
index 1387bd1..0ede939 100644
--- a/src/com/android/contacts/editor/StructuredNameEditorView.java
+++ b/src/com/android/contacts/editor/StructuredNameEditorView.java
@@ -22,7 +22,6 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.util.AttributeSet;
-import android.view.View;
 
 import com.android.contacts.R;
 import com.android.contacts.model.RawContactDelta;
@@ -74,9 +73,6 @@
             mChanged = false;
         }
         updateEmptiness();
-        // Right alien with rest of the editors. As this view has an extra expand/collapse view on
-        // the right, we need to free the space from deleteContainer
-        mDeleteContainer.setVisibility(View.GONE);
     }
 
     @Override