Merge AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.009 on remote branch

Change-Id: Ie992863a0cbc977262f9155cb4e65d4fc6201fe5
diff --git a/core/res/res/values/customize.xml b/core/res/res/values/customize.xml
index c483dab..103b430 100644
--- a/core/res/res/values/customize.xml
+++ b/core/res/res/values/customize.xml
@@ -59,8 +59,6 @@
     <string name="def_wifi_wifihotspot_pass" translatable="false"></string>
     <!-- Default wi-fi direct name -->
     <string name="def_wifi_direct_name" translatable="false"></string>
-    <!-- Setting customize default bluetooth name -->
-    <string name="def_custom_bt_defname"></string>
     <!-- custom date format or not  -->
     <bool name="config_dateformat">false</bool>
 </resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 7c0f1b0..0f5f785 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2405,7 +2405,6 @@
   <java-symbol type="integer" name="wifi_hotspot_security_type" />
   <java-symbol type="string" name="def_wifi_wifihotspot_pass" />
   <java-symbol type="string" name="def_wifi_direct_name" />
-  <java-symbol type="string" name="def_custom_bt_defname" />
   <!-- config 2G/3G/4G RAT strings for carriers -->
   <java-symbol type="string" name="config_rat_unknown" />
   <java-symbol type="string" name="config_rat_2g" />
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 2292ef4..9621b54 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -2325,12 +2325,15 @@
 
     PathTexture* texture = mCaches.pathCache.get(path, paint);
     if (!texture) return;
-    const AutoTexture autoCleanup(texture);
 
     const float x = texture->left - texture->offset;
     const float y = texture->top - texture->offset;
 
     drawPathTexture(texture, x, y, paint);
+
+    if (texture->cleanup) {
+        mCaches.pathCache.remove(path, paint);
+    }
     mDirty = true;
 }
 
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 3af640f..3236f6f 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -400,6 +400,13 @@
     return texture;
 }
 
+void PathCache::remove(const SkPath* path, const SkPaint* paint)
+{
+    PathDescription entry(kShapePath, paint);
+    entry.shape.path.mGenerationID = path->getGenerationID();
+    mCache.remove(entry);
+}
+
 void PathCache::precache(const SkPath* path, const SkPaint* paint) {
     if (!Caches::getInstance().tasks.canRunTasks()) {
         return;
diff --git a/libs/hwui/PathCache.h b/libs/hwui/PathCache.h
index 7014863..c529915 100644
--- a/libs/hwui/PathCache.h
+++ b/libs/hwui/PathCache.h
@@ -201,6 +201,7 @@
     PathTexture* getArc(float width, float height, float startAngle, float sweepAngle,
             bool useCenter, const SkPaint* paint);
     PathTexture* get(const SkPath* path, const SkPaint* paint);
+    void         remove(const SkPath* path, const SkPaint* paint);
 
     /**
      * Removes the specified path. This is meant to be called from threads
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
index 76408d7..855c7aa 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
@@ -110,7 +110,6 @@
         addHandler(Intent.ACTION_DOCK_EVENT, new DockEventHandler());
 
         mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter, null, mReceiverHandler);
-        setDefaultBtName();
     }
 
     void registerProfileIntentReceiver() {
@@ -124,25 +123,6 @@
         registerProfileIntentReceiver();
     }
 
-    // set bluetooth default name
-    private void setDefaultBtName() {
-        String name = mContext.getResources().getString(
-            com.android.internal.R.string.def_custom_bt_defname);
-        boolean needSet = !TextUtils.isEmpty(name);
-        Log.d(TAG, "custom bluetooth name: " + name);
-        // This flag is to only set default bluetooth name once.
-        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mContext);
-        boolean notSet = preferences.getBoolean("is_first_boot",true);
-        // only bluetooth state is on, set name will success, or, it will fail.
-        boolean okToSet = mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_ON;
-        if (needSet && notSet && okToSet) {
-            mLocalAdapter.setName(name);
-            SharedPreferences.Editor edit = preferences.edit();
-            edit.putBoolean("is_first_boot",false);
-            edit.apply();
-        }
-    }
-
     /** Register to start receiving callbacks for Bluetooth events. */
     public void registerCallback(BluetoothCallback callback) {
         synchronized (mCallbacks) {
@@ -178,9 +158,6 @@
                                     BluetoothAdapter.ERROR);
             // update local profiles and get paired devices
             mLocalAdapter.setBluetoothStateInt(state);
-            if (state == BluetoothAdapter.STATE_ON) {
-                setDefaultBtName();
-            }
             // send callback to update UI and possibly start scanning
             synchronized (mCallbacks) {
                 for (BluetoothCallback callback : mCallbacks) {
diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
index b2207f3..7a28f48 100644
--- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java
+++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
@@ -192,6 +192,9 @@
                 for (int j = 0; j < colorTransforms.size(); j++) {
                     if (colorTransforms.get(j).getColorTransform() == info.colorTransform) {
                         existingMode = true;
+                        if (i == activeDisplayInfo) {
+                            activeColorTransform = colorTransforms.get(j);
+                        }
                         break;
                     }
                 }
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 721e4726..7ec4903 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -1088,6 +1088,7 @@
                 && !parcelableCall.getCannedSmsResponses().isEmpty()) {
             mCannedTextResponses =
                     Collections.unmodifiableList(parcelableCall.getCannedSmsResponses());
+            cannedTextResponsesChanged = true;
         }
 
         boolean videoCallChanged = parcelableCall.isVideoCallProviderChanged() &&