Snap for 6439596 from 11ce053ccc26b7f16084c8864b1a262490085593 to qt-aml-tzdata-release

Change-Id: I8cdf1b58e9cae596b14bf44090b55d49f12db83e
diff --git a/Android.bp b/Android.bp
deleted file mode 100644
index 73bbeb3..0000000
--- a/Android.bp
+++ /dev/null
@@ -1,45 +0,0 @@
-// 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.
-
-android_app {
-    name: "CarLatinIME",
-    srcs: ["src/**/*.java"],
-    resource_dirs: ["res"],
-    certificate: "shared",
-    overrides: ["LatinIME"],
-    libs: ["android.car"],
-    static_libs: [
-        "android-common",
-        "jsr305",
-    ],
-    // Include all the resources regardless of system supported locales
-    aapt_include_all_resources: true,
-
-    //TODO(b/72620511) Apps should not use platform APIs directly
-    //LOCAL_SDK_VERSION := current
-    platform_apis: true,
-
-    // LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-    optimize: {
-        enabled: false,
-    },
-    dex_preopt: {
-        enabled: false,
-    },
-    product_variables: {
-        pdk: {
-            enabled: false,
-        },
-    },
-}
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..3ed332f
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,53 @@
+# 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.
+
+ifneq ($(TARGET_BUILD_PDK), true)
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := CarLatinIME
+
+LOCAL_RESOURCE_DIR :=  $(LOCAL_PATH)/res
+
+LOCAL_CERTIFICATE := shared
+
+LOCAL_USE_AAPT2 := true
+
+LOCAL_OVERRIDES_PACKAGES := LatinIME
+
+LOCAL_JAVA_LIBRARIES += android.car
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+        android-common jsr305
+
+# Include all the resources regardless of system supported locales
+LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true
+
+#TODO(b/72620511) Apps should not use platform APIs directly
+#LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
+
+# LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+LOCAL_PROGUARD_ENABLED := disabled
+
+LOCAL_DEX_PREOPT := false
+
+include $(BUILD_PACKAGE)
+
+endif
diff --git a/OWNERS b/OWNERS
deleted file mode 100644
index 1c2744c..0000000
--- a/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-# Default code reviewers picked from top 3 or more developers.
-# Please update this list if you find better candidates.
-linguo@google.com
-ajchen@google.com
-stenning@google.com
diff --git a/src/com/android/inputmethod/latin/CarLatinIME.java b/src/com/android/inputmethod/latin/CarLatinIME.java
index a8d24c4..0a5cd0b 100644
--- a/src/com/android/inputmethod/latin/CarLatinIME.java
+++ b/src/com/android/inputmethod/latin/CarLatinIME.java
@@ -243,11 +243,8 @@
     }
 
     private void updateCapitalization() {
-        boolean shouldCapitalize = false;
-        if (getCurrentInputConnection() != null) {
-            shouldCapitalize =
+        boolean shouldCapitalize =
                 getCurrentInputConnection().getCursorCapsMode(mEditorInfo.inputType) != 0;
-        }
         mKeyboardView.setShifted(shouldCapitalize);
     }
 
diff --git a/src/com/android/inputmethod/latin/car/KeyboardView.java b/src/com/android/inputmethod/latin/car/KeyboardView.java
index 974b3af..52a2fde 100644
--- a/src/com/android/inputmethod/latin/car/KeyboardView.java
+++ b/src/com/android/inputmethod/latin/car/KeyboardView.java
@@ -267,7 +267,7 @@
     /** The canvas for the above mutable keyboard bitmap */
     private Canvas mCanvas;
     /** The accessibility manager for accessibility support */
-    private final AccessibilityManager mAccessibilityManager;
+    private AccessibilityManager mAccessibilityManager;
 
     private boolean mUseSecondaryColor = true;
     private Locale mLocale;
@@ -382,9 +382,6 @@
         mSwipeThreshold = (int) (500 * getResources().getDisplayMetrics().density);
         mDisambiguateSwipe = true;
 
-        mAccessibilityManager =
-            (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
-
         int color = getResources().getColor(R.color.ime_background_letters);
         mPopupScrimColor = Color.argb(
                 SCRIM_ALPHA, Color.red(color), Color.green(color), Color.blue(color));