DO NOT MERGE - Merge PPRL.190305.001 into master

Bug: 127812889
Change-Id: Ia25507b8b6a9c1a43eff0c6226743a1172fb4fbc
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..afa528c
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,28 @@
+// Copyright (C) 2011 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.
+
+android_library {
+    name: "libchips",
+    static_libs: [
+        "androidx.annotation_annotation",
+        "androidx.core_core",
+    ],
+    sdk_version: "current",
+    srcs: [
+        "src/**/*.java",
+        "src/**/*.logtags",
+    ],
+
+    resource_dirs: ["res"],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index f7e810d..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (C) 2011 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libchips
-LOCAL_STATIC_JAVA_LIBRARIES := \
-     android-support-annotations
-LOCAL_STATIC_ANDROID_LIBRARIES := \
-     android-support-compat
-LOCAL_SDK_VERSION := current
-LOCAL_SRC_FILES := \
-     $(call all-java-files-under, src) \
-     $(call all-logtags-files-under, src)
-LOCAL_USE_AAPT2 := true
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-##################################################
-# Build all sub-directories
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index bfc1073..8a52c5a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -18,7 +18,7 @@
           android:versionCode="1">
 
     <uses-sdk
-        android:minSdkVersion="11"
+        android:minSdkVersion="14"
         android:targetSdkVersion="19" />
 
     <application />
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index 91e424c..1f62542 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -21,9 +21,14 @@
     <string name="copy_number" msgid="530057841276106843">"ফ\'ন নম্বৰ প্ৰতিলিপি কৰক"</string>
     <string name="action_label" msgid="1318401633653605424">"উভতি যাওক"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"সম্পৰ্কসূচীৰ পৰামৰ্শবোৰ খোলা হ\'ল"</string>
-    <string name="accessbility_suggestion_dropdown_closed" msgid="5545766162855459747">"কোনো পৰামর্শ নাই"</string>
-    <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"<xliff:g id="CONTACT">%s</xliff:g>ক প্ৰাপকসকলৰপৰা আঁতৰাওক"</string>
-    <string name="chips_action_copy" msgid="1929144660075507103">"প্ৰতিলিপি কৰক"</string>
-    <string name="chips_action_cancel" msgid="6077877438943543501">"বাতিল কৰক"</string>
-    <string name="chips_permission_text" msgid="1978301259208877495">"সম্পর্কসূচীৰ পৰামর্শসমূহৰ বাবে অনুমতি দিয়ক"</string>
+    <!-- no translation found for accessbility_suggestion_dropdown_closed (5545766162855459747) -->
+    <skip />
+    <!-- no translation found for dropdown_delete_button_desc (8506791557733906887) -->
+    <skip />
+    <!-- no translation found for chips_action_copy (1929144660075507103) -->
+    <skip />
+    <!-- no translation found for chips_action_cancel (6077877438943543501) -->
+    <skip />
+    <!-- no translation found for chips_permission_text (1978301259208877495) -->
+    <skip />
 </resources>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 7eed0d3..be05820 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -21,9 +21,11 @@
     <string name="copy_number" msgid="530057841276106843">"ଫୋନ୍‍ ନମ୍ବର କପୀ କରନ୍ତୁ"</string>
     <string name="action_label" msgid="1318401633653605424">"ଫେରନ୍ତୁ"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"ଯୋଗାଯୋଗ ପରାମର୍ଶ ଖୋଲାଗଲା"</string>
-    <string name="accessbility_suggestion_dropdown_closed" msgid="5545766162855459747">"କୌଣସି ପରାମର୍ଶ ଉପଲବ୍ଧ ନାହିଁ"</string>
+    <!-- no translation found for accessbility_suggestion_dropdown_closed (5545766162855459747) -->
+    <skip />
     <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"ପ୍ରାପ୍ତକର୍ତ୍ତାଙ୍କଠାରୁ <xliff:g id="CONTACT">%s</xliff:g>ଙ୍କୁ ବାହାର କରନ୍ତୁ"</string>
     <string name="chips_action_copy" msgid="1929144660075507103">"କପୀ କରନ୍ତୁ"</string>
     <string name="chips_action_cancel" msgid="6077877438943543501">"କ୍ୟାନ୍ସଲ୍‍ କରନ୍ତୁ"</string>
-    <string name="chips_permission_text" msgid="1978301259208877495">"ଯୋଗାଯୋଗ ପରାମର୍ଶର ଅନୁମତି ଦିଅନ୍ତୁ"</string>
+    <!-- no translation found for chips_permission_text (1978301259208877495) -->
+    <skip />
 </resources>
diff --git a/sample/Android.bp b/sample/Android.bp
new file mode 100644
index 0000000..72da660
--- /dev/null
+++ b/sample/Android.bp
@@ -0,0 +1,34 @@
+// Copyright (C) 2013 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.
+
+//#################################################
+// Build APK
+
+android_app {
+    name: "libChipsSample",
+
+    static_libs: [
+        "androidx.annotation_annotation",
+        "libchips",
+        "androidx.core_core",
+    ],
+
+    sdk_version: "current",
+
+    srcs: [
+        "src/**/*.java",
+        "src/**/*.logtags",
+    ],
+    resource_dirs: ["res"],
+}
diff --git a/sample/Android.mk b/sample/Android.mk
deleted file mode 100644
index e07caa5..0000000
--- a/sample/Android.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 2013 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-##################################################
-# Build APK
-include $(CLEAR_VARS)
-
-src_dirs := src
-LOCAL_PACKAGE_NAME := libChipsSample
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
-     android-support-annotations
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
-     libchips \
-     android-support-compat
-
-LOCAL_SDK_VERSION := current
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src) \
-        $(call all-logtags-files-under, $(src_dirs))
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_USE_AAPT2 := true
-
-include $(BUILD_PACKAGE)
-
-
-##################################################
-# Build all sub-directories
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/src/com/android/ex/chips/BaseRecipientAdapter.java b/src/com/android/ex/chips/BaseRecipientAdapter.java
index f39b016..72f42f2 100644
--- a/src/com/android/ex/chips/BaseRecipientAdapter.java
+++ b/src/com/android/ex/chips/BaseRecipientAdapter.java
@@ -30,7 +30,7 @@
 import android.os.Message;
 import android.provider.ContactsContract;
 import android.provider.ContactsContract.Directory;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
 import android.text.TextUtils;
 import android.text.util.Rfc822Token;
 import android.util.Log;
diff --git a/src/com/android/ex/chips/ChipsUtil.java b/src/com/android/ex/chips/ChipsUtil.java
index 9c299fa..ea31b20 100644
--- a/src/com/android/ex/chips/ChipsUtil.java
+++ b/src/com/android/ex/chips/ChipsUtil.java
@@ -21,7 +21,7 @@
 import android.content.pm.PackageManager;
 import android.os.Build;
 import android.os.Process;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
 
 public class ChipsUtil {
 
diff --git a/src/com/android/ex/chips/DefaultPhotoManager.java b/src/com/android/ex/chips/DefaultPhotoManager.java
index b9c001d..321e54b 100644
--- a/src/com/android/ex/chips/DefaultPhotoManager.java
+++ b/src/com/android/ex/chips/DefaultPhotoManager.java
@@ -21,7 +21,7 @@
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.provider.ContactsContract;
-import android.support.v4.util.LruCache;
+import androidx.collection.LruCache;
 import android.util.Log;
 
 import java.io.ByteArrayOutputStream;
diff --git a/src/com/android/ex/chips/DropdownChipLayouter.java b/src/com/android/ex/chips/DropdownChipLayouter.java
index 6ca3d0e..77415c1 100644
--- a/src/com/android/ex/chips/DropdownChipLayouter.java
+++ b/src/com/android/ex/chips/DropdownChipLayouter.java
@@ -9,11 +9,11 @@
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.StateListDrawable;
 import android.net.Uri;
-import android.support.annotation.DrawableRes;
-import android.support.annotation.IdRes;
-import android.support.annotation.LayoutRes;
-import android.support.annotation.Nullable;
-import android.support.v4.view.MarginLayoutParamsCompat;
+import androidx.annotation.DrawableRes;
+import androidx.annotation.IdRes;
+import androidx.annotation.LayoutRes;
+import androidx.annotation.Nullable;
+import androidx.core.view.MarginLayoutParamsCompat;
 import android.text.SpannableStringBuilder;
 import android.text.Spanned;
 import android.text.TextUtils;
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java
index d9655a5..bc55bd4 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -50,7 +50,7 @@
 import android.os.Looper;
 import android.os.Message;
 import android.os.Parcelable;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
 import android.text.Editable;
 import android.text.InputType;
 import android.text.Layout;
diff --git a/src/com/android/ex/chips/RecipientEntry.java b/src/com/android/ex/chips/RecipientEntry.java
index 2669242..a42794f 100644
--- a/src/com/android/ex/chips/RecipientEntry.java
+++ b/src/com/android/ex/chips/RecipientEntry.java
@@ -19,7 +19,7 @@
 import android.net.Uri;
 import android.provider.ContactsContract.CommonDataKinds.Email;
 import android.provider.ContactsContract.DisplayNameSources;
-import android.support.annotation.DrawableRes;
+import androidx.annotation.DrawableRes;
 import android.text.util.Rfc822Token;
 import android.text.util.Rfc822Tokenizer;
 
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..cba57fa
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2011 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.
+
+android_test {
+    name: "libChipsTests",
+
+    srcs: ["src/**/*.java"],
+
+    sdk_version: "current",
+    certificate: "platform",
+    static_libs: [
+        "libchips",
+        "junit",
+    ],
+    libs: ["android.test.base.stubs"],
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 4a6ade6..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2011 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.
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := libChipsTests
-LOCAL_MODULE_TAGS := tests
-LOCAL_SDK_VERSION := current
-LOCAL_CERTIFICATE := platform
-LOCAL_STATIC_JAVA_LIBRARIES := libchips junit
-LOCAL_JAVA_LIBRARIES := android.test.base.stubs
-LOCAL_RESOURCE_DIR := frameworks/opt/chips/res/
-LOCAL_AAPT_FLAGS := --auto-add-overlay
-LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips
-
-include $(BUILD_PACKAGE)
-