Merge "Remove View.getBackgroundColor()" into mnc-dev
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index e43237a..cf6a018 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -1162,6 +1162,10 @@
         // We do not hide the span controllers, since they can be added when a new text is
         // inserted into the text view (voice IME).
         hideCursorControllers();
+        // Reset drag accelerator.
+        if (mSelectionModifierCursorController != null) {
+            mSelectionModifierCursorController.resetTouchOffsets();
+        }
         stopTextActionMode();
     }
 
diff --git a/core/res/res/drawable/floating_popup_background.xml b/core/res/res/drawable/floating_popup_background_dark.xml
similarity index 87%
copy from core/res/res/drawable/floating_popup_background.xml
copy to core/res/res/drawable/floating_popup_background_dark.xml
index b6700b3..ded1137 100644
--- a/core/res/res/drawable/floating_popup_background.xml
+++ b/core/res/res/drawable/floating_popup_background_dark.xml
@@ -16,8 +16,8 @@
 */
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle">
-    <solid android:color="?attr/colorBackgroundFloating" />
+       android:shape="rectangle">
+    <solid android:color="@color/background_floating_material_dark" />
     <corners android:radius="2dp" />
 </shape>
 
diff --git a/core/res/res/drawable/floating_popup_background.xml b/core/res/res/drawable/floating_popup_background_light.xml
similarity index 91%
rename from core/res/res/drawable/floating_popup_background.xml
rename to core/res/res/drawable/floating_popup_background_light.xml
index b6700b3..9c7a886 100644
--- a/core/res/res/drawable/floating_popup_background.xml
+++ b/core/res/res/drawable/floating_popup_background_light.xml
@@ -17,7 +17,7 @@
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle">
-    <solid android:color="?attr/colorBackgroundFloating" />
+    <solid android:color="@color/background_floating_material_light" />
     <corners android:radius="2dp" />
 </shape>
 
diff --git a/core/res/res/drawable/ic_ab_back_material_dark.xml b/core/res/res/drawable/ic_ab_back_material_dark.xml
new file mode 100644
index 0000000..7cdd139
--- /dev/null
+++ b/core/res/res/drawable/ic_ab_back_material_dark.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0"
+        android:autoMirrored="true"
+        android:tint="@color/secondary_text_material_dark">
+  <path
+      android:pathData="M20,11L7.8,11l5.6,-5.6L12,4l-8,8l8,8l1.4,-1.4L7.8,13L20,13L20,11z"
+      android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_ab_back_material_light.xml b/core/res/res/drawable/ic_ab_back_material_light.xml
new file mode 100644
index 0000000..65dab81
--- /dev/null
+++ b/core/res/res/drawable/ic_ab_back_material_light.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0"
+        android:autoMirrored="true"
+        android:tint="@color/secondary_text_material_light">
+  <path
+      android:pathData="M20,11L7.8,11l5.6,-5.6L12,4l-8,8l8,8l1.4,-1.4L7.8,13L20,13L20,11z"
+      android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_menu_moreoverflow_material.xml b/core/res/res/drawable/ic_menu_moreoverflow_material.xml
index 502ad69..3f53451 100644
--- a/core/res/res/drawable/ic_menu_moreoverflow_material.xml
+++ b/core/res/res/drawable/ic_menu_moreoverflow_material.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 Copyright (C) 2014 The Android Open Source Project
 
diff --git a/core/res/res/drawable/ic_menu_moreoverflow_material_dark.xml b/core/res/res/drawable/ic_menu_moreoverflow_material_dark.xml
new file mode 100644
index 0000000..fa350a6
--- /dev/null
+++ b/core/res/res/drawable/ic_menu_moreoverflow_material_dark.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0"
+        android:tint="@color/secondary_text_material_dark">
+    <path
+        android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2c-1.1,0 -2,0.9 -2,2S10.9,8 12,8zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,10 12,10zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,16 12,16z"
+        android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/ic_menu_moreoverflow_material_light.xml b/core/res/res/drawable/ic_menu_moreoverflow_material_light.xml
new file mode 100644
index 0000000..7af234f
--- /dev/null
+++ b/core/res/res/drawable/ic_menu_moreoverflow_material_light.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0"
+        android:tint="@color/secondary_text_material_light">
+    <path
+        android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2c-1.1,0 -2,0.9 -2,2S10.9,8 12,8zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,10 12,10zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,16 12,16z"
+        android:fillColor="@color/white"/>
+</vector>
diff --git a/core/res/res/drawable/item_background_borderless_material_dark.xml b/core/res/res/drawable/item_background_borderless_material_dark.xml
new file mode 100644
index 0000000..685c52a
--- /dev/null
+++ b/core/res/res/drawable/item_background_borderless_material_dark.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+        android:color="@color/ripple_material_dark" />
diff --git a/core/res/res/drawable/item_background_borderless_material_light.xml b/core/res/res/drawable/item_background_borderless_material_light.xml
new file mode 100644
index 0000000..3ef6674
--- /dev/null
+++ b/core/res/res/drawable/item_background_borderless_material_light.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2015 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
+  -->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+        android:color="@color/ripple_material_light" />
diff --git a/core/res/res/drawable/item_background_material_dark.xml b/core/res/res/drawable/item_background_material_dark.xml
new file mode 100644
index 0000000..06eb531
--- /dev/null
+++ b/core/res/res/drawable/item_background_material_dark.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+        android:color="@color/ripple_material_dark">
+  <item android:id="@id/mask">
+    <color android:color="@color/white" />
+  </item>
+</ripple>
diff --git a/core/res/res/drawable/item_background_material_light.xml b/core/res/res/drawable/item_background_material_light.xml
new file mode 100644
index 0000000..2f3d157
--- /dev/null
+++ b/core/res/res/drawable/item_background_material_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+        android:color="@color/ripple_material_light">
+  <item android:id="@id/mask">
+    <color android:color="@color/white" />
+  </item>
+</ripple>
diff --git a/core/res/res/layout/floating_popup_close_overflow_button.xml b/core/res/res/layout/floating_popup_close_overflow_button.xml
index 0dbf7f7..4dae1ae 100644
--- a/core/res/res/layout/floating_popup_close_overflow_button.xml
+++ b/core/res/res/layout/floating_popup_close_overflow_button.xml
@@ -20,6 +20,6 @@
     android:layout_height="match_parent"
     android:minWidth="@dimen/floating_toolbar_menu_button_minimum_width"
     android:minHeight="@dimen/floating_toolbar_height"
-    android:src="?android:attr/actionModeCloseDrawable"
+    android:src="?attr/floatingToolbarCloseDrawable"
     android:contentDescription="@string/floating_toolbar_close_overflow_description"
-    android:background="?attr/selectableItemBackgroundBorderless" />
+    android:background="?attr/floatingToolbarItemBackgroundBorderlessDrawable" />
diff --git a/core/res/res/layout/floating_popup_container.xml b/core/res/res/layout/floating_popup_container.xml
index f37aee1..63dae44 100644
--- a/core/res/res/layout/floating_popup_container.xml
+++ b/core/res/res/layout/floating_popup_container.xml
@@ -24,4 +24,4 @@
     android:elevation="2dp"
     android:focusable="true"
     android:focusableInTouchMode="true"
-    android:background="@drawable/floating_popup_background"/>
+    android:background="?attr/floatingToolbarPopupBackgroundDrawable"/>
diff --git a/core/res/res/layout/floating_popup_menu_button.xml b/core/res/res/layout/floating_popup_menu_button.xml
index b549198..1b58ce5 100644
--- a/core/res/res/layout/floating_popup_menu_button.xml
+++ b/core/res/res/layout/floating_popup_menu_button.xml
@@ -30,5 +30,5 @@
     android:fontFamily="sans-serif-medium"
     android:textSize="@dimen/floating_toolbar_text_size"
     android:textAllCaps="true"
-    android:textColor="?attr/colorForeground"
-    android:background="?attr/selectableItemBackground" />
+    android:textColor="?attr/floatingToolbarForegroundColor"
+    android:background="?attr/floatingToolbarItemBackgroundDrawable" />
diff --git a/core/res/res/layout/floating_popup_menu_image_button.xml b/core/res/res/layout/floating_popup_menu_image_button.xml
index 07eb7a3..1ba7848 100644
--- a/core/res/res/layout/floating_popup_menu_image_button.xml
+++ b/core/res/res/layout/floating_popup_menu_image_button.xml
@@ -32,5 +32,5 @@
         android:paddingEnd="@dimen/floating_toolbar_menu_button_side_padding"
         android:paddingBottom="@dimen/floating_toolbar_menu_image_button_vertical_padding"
         android:scaleType="centerInside"
-        android:background="?attr/selectableItemBackground" />
+        android:background="?attr/floatingToolbarItemBackgroundDrawable" />
 </LinearLayout>
diff --git a/core/res/res/layout/floating_popup_open_overflow_button.xml b/core/res/res/layout/floating_popup_open_overflow_button.xml
index 3027565..f6a3e8d 100644
--- a/core/res/res/layout/floating_popup_open_overflow_button.xml
+++ b/core/res/res/layout/floating_popup_open_overflow_button.xml
@@ -24,6 +24,6 @@
     android:paddingTop="0dp"
     android:paddingBottom="0dp"
     android:paddingEnd="4dp"
-    android:src="@drawable/ic_menu_moreoverflow_material"
+    android:src="?attr/floatingToolbarOpenDrawable"
     android:contentDescription="@string/floating_toolbar_open_overflow_description"
-    android:background="?attr/selectableItemBackgroundBorderless" />
+    android:background="?attr/floatingToolbarItemBackgroundBorderlessDrawable" />
diff --git a/core/res/res/layout/floating_popup_overflow_list_item.xml b/core/res/res/layout/floating_popup_overflow_list_item.xml
index 2ff45bb..22f4e68 100644
--- a/core/res/res/layout/floating_popup_overflow_list_item.xml
+++ b/core/res/res/layout/floating_popup_overflow_list_item.xml
@@ -31,6 +31,6 @@
     android:ellipsize="end"
     android:fontFamily="sans-serif-medium"
     android:textSize="@dimen/floating_toolbar_text_size"
-    android:textColor="?attr/colorForeground"
+    android:textColor="?attr/floatingToolbarForegroundColor"
     android:textAllCaps="true" />
 
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index d5c2d19..a3cc4ae 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -310,7 +310,11 @@
        <item>@drawable/fastscroll_label_right_material</item>
        <item>@drawable/fastscroll_thumb_material</item>
        <item>@drawable/fastscroll_track_material</item>
+       <item>@drawable/floating_popup_background_dark</item>
+       <item>@drawable/floating_popup_background_light</item>
        <item>@drawable/ic_ab_back_material</item>
+       <item>@drawable/ic_ab_back_material_dark</item>
+       <item>@drawable/ic_ab_back_material_light</item>
        <item>@drawable/ic_clear_material</item>
        <item>@drawable/ic_commit_search_api_material</item>
        <item>@drawable/ic_dialog_alert_material</item>
@@ -330,7 +334,11 @@
        <item>@drawable/ic_search_api_material</item>
        <item>@drawable/ic_voice_search_api_material</item>
        <item>@drawable/item_background_borderless_material</item>
+       <item>@drawable/item_background_borderless_material_dark</item>
+       <item>@drawable/item_background_borderless_material_light</item>
        <item>@drawable/item_background_material</item>
+       <item>@drawable/item_background_material_dark</item>
+       <item>@drawable/item_background_material_light</item>
        <item>@drawable/list_divider_material</item>
        <item>@drawable/list_section_divider_material</item>
        <item>@drawable/notification_material_action_background</item>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 52e2cf0..c08d511 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -550,6 +550,17 @@
         <attr name="windowTransitionBackgroundFadeDuration" format="integer"/>
 
         <!-- ============ -->
+        <!-- Floating toolbar styles -->
+        <!-- ============ -->
+       <eat-comment />
+       <attr name="floatingToolbarCloseDrawable" format="reference" />
+       <attr name="floatingToolbarForegroundColor" format="reference|color" />
+       <attr name="floatingToolbarItemBackgroundBorderlessDrawable" format="reference" />
+       <attr name="floatingToolbarItemBackgroundDrawable" format="reference" />
+       <attr name="floatingToolbarOpenDrawable" format="reference" />
+       <attr name="floatingToolbarPopupBackgroundDrawable" format="reference" />
+
+        <!-- ============ -->
         <!-- Alert Dialog styles -->
         <!-- ============ -->
         <eat-comment />
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index ecf00f0..b7acdd4 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -389,6 +389,14 @@
         <item name="segmentedButtonStyle">@style/SegmentedButton</item>
         <item name="fingerprintAuthDrawable">@drawable/ic_fingerprint</item>
 
+        <!-- Floating toolbar styles -->
+        <item name="floatingToolbarCloseDrawable">@drawable/ic_ab_back_material_dark</item>
+        <item name="floatingToolbarForegroundColor">@color/foreground_material_dark</item>
+        <item name="floatingToolbarItemBackgroundBorderlessDrawable">@drawable/item_background_borderless_material_dark</item>
+        <item name="floatingToolbarItemBackgroundDrawable">@drawable/item_background_material_dark</item>
+        <item name="floatingToolbarOpenDrawable">@drawable/ic_menu_moreoverflow_material_dark</item>
+        <item name="floatingToolbarPopupBackgroundDrawable">@drawable/floating_popup_background_dark</item>
+
         <!-- SearchView attributes -->
         <item name="searchViewStyle">@style/Widget.Holo.SearchView</item>
         <item name="searchDialogTheme">@style/Theme.SearchBar</item>
@@ -538,6 +546,14 @@
         <item name="mediaRouteButtonStyle">@style/Widget.DeviceDefault.Light.MediaRouteButton</item>
         <item name="findOnPageNextDrawable">@drawable/ic_find_next_holo_light</item>
         <item name="findOnPagePreviousDrawable">@drawable/ic_find_previous_holo_light</item>
+
+        <!-- Floating toolbar styles -->
+        <item name="floatingToolbarCloseDrawable">@drawable/ic_ab_back_material_light</item>
+        <item name="floatingToolbarForegroundColor">@color/foreground_material_light</item>
+        <item name="floatingToolbarItemBackgroundBorderlessDrawable">@drawable/item_background_borderless_material_light</item>
+        <item name="floatingToolbarItemBackgroundDrawable">@drawable/item_background_material_light</item>
+        <item name="floatingToolbarOpenDrawable">@drawable/ic_menu_moreoverflow_material_light</item>
+        <item name="floatingToolbarPopupBackgroundDrawable">@drawable/floating_popup_background_light</item>
     </style>
 
     <!-- Variant of {@link #Theme_Light} with no title bar -->
diff --git a/packages/SystemUI/res/layout/mobile_signal_group.xml b/packages/SystemUI/res/layout/mobile_signal_group.xml
index 6a4ac2c..6ae5cf3 100644
--- a/packages/SystemUI/res/layout/mobile_signal_group.xml
+++ b/packages/SystemUI/res/layout/mobile_signal_group.xml
@@ -19,22 +19,25 @@
 -->
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:systemui="http://schemas.android.com/apk/res-auto"
     android:id="@+id/mobile_combo"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     >
-    <com.android.systemui.statusbar.AlphaOptimizedImageView
+    <com.android.systemui.statusbar.AnimatedImageView
         android:theme="@style/DualToneLightTheme"
         android:id="@+id/mobile_signal"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
+        systemui:hasOverlappingRendering="false"
         />
-    <com.android.systemui.statusbar.AlphaOptimizedImageView
+    <com.android.systemui.statusbar.AnimatedImageView
         android:theme="@style/DualToneDarkTheme"
         android:id="@+id/mobile_signal_dark"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
         android:alpha="0.0"
+        systemui:hasOverlappingRendering="false"
         />
     <ImageView
         android:id="@+id/mobile_type"
diff --git a/packages/SystemUI/res/layout/signal_cluster_view.xml b/packages/SystemUI/res/layout/signal_cluster_view.xml
index a2121ee..f8bd6fd 100644
--- a/packages/SystemUI/res/layout/signal_cluster_view.xml
+++ b/packages/SystemUI/res/layout/signal_cluster_view.xml
@@ -20,6 +20,7 @@
 <!-- extends LinearLayout -->
 <com.android.systemui.statusbar.SignalClusterView
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:systemui="http://schemas.android.com/apk/res-auto"
     android:layout_height="match_parent"
     android:layout_width="wrap_content"
     android:gravity="center_vertical"
@@ -43,6 +44,7 @@
             android:id="@+id/ethernet"
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
+            systemui:hasOverlappingRendering="false"
             />
         <com.android.systemui.statusbar.AlphaOptimizedImageView
             android:theme="@style/DualToneDarkTheme"
@@ -50,6 +52,7 @@
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
             android:alpha="0.0"
+            systemui:hasOverlappingRendering="false"
             />
     </FrameLayout>
     <FrameLayout
@@ -62,6 +65,7 @@
             android:id="@+id/wifi_signal"
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
+            systemui:hasOverlappingRendering="false"
             />
         <com.android.systemui.statusbar.AlphaOptimizedImageView
             android:theme="@style/DualToneDarkTheme"
@@ -69,6 +73,7 @@
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
             android:alpha="0.0"
+            systemui:hasOverlappingRendering="false"
             />
     </FrameLayout>
     <View
@@ -94,6 +99,7 @@
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
             android:src="@drawable/stat_sys_no_sims"
+            systemui:hasOverlappingRendering="false"
             />
         <com.android.systemui.statusbar.AlphaOptimizedImageView
             android:theme="@style/DualToneDarkTheme"
@@ -102,6 +108,7 @@
             android:layout_width="wrap_content"
             android:src="@drawable/stat_sys_no_sims"
             android:alpha="0.0"
+            systemui:hasOverlappingRendering="false"
             />
     </FrameLayout>
     <View
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index 0e1517f..7262ed2 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -162,6 +162,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
+        systemui:hasOverlappingRendering="false"
         />
 
     <TextView
diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml
index 354b70b..527248c 100644
--- a/packages/SystemUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/values/attrs.xml
@@ -86,5 +86,9 @@
     <declare-styleable name="StatusBarWindowView_Layout">
         <attr name="ignoreRightInset" format="boolean" />
     </declare-styleable>
+
+    <declare-styleable name="AlphaOptimizedImageView">
+        <attr name="hasOverlappingRendering" format="boolean" />
+    </declare-styleable>
 </resources>
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AlphaOptimizedImageView.java b/packages/SystemUI/src/com/android/systemui/statusbar/AlphaOptimizedImageView.java
index 858c118..700ea34 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/AlphaOptimizedImageView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/AlphaOptimizedImageView.java
@@ -17,34 +17,49 @@
 package com.android.systemui.statusbar;
 
 import android.content.Context;
+import android.content.res.TypedArray;
 import android.util.AttributeSet;
 import android.widget.ImageView;
 
+import com.android.systemui.R;
+
 /**
- * An ImageView which does not have overlapping rendering commands and therefore does not need a
- * layer when alpha is changed.
+ * An ImageView which supports an attribute specifying whether it has overlapping rendering
+ * commands and therefore does not need a layer when alpha is changed.
  */
-public class AlphaOptimizedImageView extends ImageView
-{
+public class AlphaOptimizedImageView extends ImageView {
+    private final boolean mHasOverlappingRendering;
+
     public AlphaOptimizedImageView(Context context) {
-        super(context);
+        this(context, null /* attrs */);
     }
 
     public AlphaOptimizedImageView(Context context, AttributeSet attrs) {
-        super(context, attrs);
+        this(context, attrs, 0 /* defStyleAttr */);
     }
 
     public AlphaOptimizedImageView(Context context, AttributeSet attrs, int defStyleAttr) {
-        super(context, attrs, defStyleAttr);
+        this(context, attrs, defStyleAttr, 0 /* defStyleRes */);
     }
 
     public AlphaOptimizedImageView(Context context, AttributeSet attrs, int defStyleAttr,
             int defStyleRes) {
         super(context, attrs, defStyleAttr, defStyleRes);
+
+        TypedArray a = context.getTheme().obtainStyledAttributes(attrs,
+                R.styleable.AlphaOptimizedImageView, 0, 0);
+
+        try {
+            // Default to true, which is what View.java defaults to
+            mHasOverlappingRendering = a.getBoolean(
+                    R.styleable.AlphaOptimizedImageView_hasOverlappingRendering, true);
+        } finally {
+            a.recycle();
+        }
     }
 
     @Override
     public boolean hasOverlappingRendering() {
-        return false;
+        return mHasOverlappingRendering;
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java b/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java
index 9839fe9..90f7c08 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/AnimatedImageView.java
@@ -25,10 +25,15 @@
 import android.widget.RemoteViews.RemoteView;
 
 @RemoteView
-public class AnimatedImageView extends ImageView {
+public class AnimatedImageView extends AlphaOptimizedImageView {
     AnimationDrawable mAnim;
     boolean mAttached;
 
+    // Tracks the last image that was set, so that we don't refresh the image if it is exactly
+    // the same as the previous one. If this is a resid, we track that. If it's a drawable, we
+    // track the hashcode of the drawable.
+    int mDrawableId;
+
     public AnimatedImageView(Context context) {
         super(context);
     }
@@ -43,7 +48,7 @@
             mAnim.stop();
         }
         if (drawable instanceof AnimationDrawable) {
-            mAnim = (AnimationDrawable)drawable;
+            mAnim = (AnimationDrawable) drawable;
             if (isShown()) {
                 mAnim.start();
             }
@@ -54,6 +59,13 @@
 
     @Override
     public void setImageDrawable(Drawable drawable) {
+        if (drawable != null) {
+            if (mDrawableId == drawable.hashCode()) return;
+
+            mDrawableId = drawable.hashCode();
+        } else {
+            mDrawableId = 0;
+        }
         super.setImageDrawable(drawable);
         updateAnim();
     }
@@ -61,6 +73,9 @@
     @Override
     @android.view.RemotableViewMethod
     public void setImageResource(int resid) {
+        if (mDrawableId == resid) return;
+
+        mDrawableId = resid;
         super.setImageResource(resid);
         updateAnim();
     }
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 2753700..ea66a04 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -21,6 +21,9 @@
 import static android.app.admin.DevicePolicyManager.WIPE_EXTERNAL_STORAGE;
 import static android.app.admin.DevicePolicyManager.WIPE_RESET_PROTECTION_DATA;
 import static android.content.pm.PackageManager.GET_UNINSTALLED_PACKAGES;
+import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
+import static org.xmlpull.v1.XmlPullParser.END_TAG;
+import static org.xmlpull.v1.XmlPullParser.TEXT;
 
 import android.Manifest.permission;
 import android.accessibilityservice.AccessibilityServiceInfo;
@@ -90,19 +93,19 @@
 import android.security.IKeyChainService;
 import android.security.KeyChain;
 import android.security.KeyChain.KeyChainConnection;
-import android.text.TextUtils;
 import android.service.persistentdata.PersistentDataBlockManager;
+import android.text.TextUtils;
 import android.util.Log;
 import android.util.PrintWriterPrinter;
 import android.util.Printer;
 import android.util.Slog;
 import android.util.SparseArray;
 import android.util.Xml;
+import android.view.IWindowManager;
 import android.view.accessibility.AccessibilityManager;
 import android.view.accessibility.IAccessibilityManager;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodManager;
-import android.view.IWindowManager;
 
 import com.android.internal.R;
 import com.android.internal.os.storage.ExternalStorageFormatter;
@@ -117,11 +120,6 @@
 import com.android.server.devicepolicy.DevicePolicyManagerService.ActiveAdmin.TrustAgentInfo;
 
 import org.xmlpull.v1.XmlPullParser;
-
-import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
-import static org.xmlpull.v1.XmlPullParser.END_TAG;
-import static org.xmlpull.v1.XmlPullParser.TEXT;
-
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
 
@@ -178,6 +176,7 @@
             = "com.android.server.ACTION_EXPIRED_PASSWORD_NOTIFICATION";
 
     private static final int MONITORING_CERT_NOTIFICATION_ID = R.string.ssl_ca_cert_warning;
+    private static final int PROFILE_WIPED_NOTIFICATION_ID = 1001;
 
     private static final boolean DBG = false;
 
@@ -354,6 +353,7 @@
                 if (DBG) Slog.v(LOG_TAG, "Sending password expiration notifications for action "
                         + action + " for user " + userHandle);
                 mHandler.post(new Runnable() {
+                    @Override
                     public void run() {
                         handlePasswordExpirationNotification(userHandle);
                     }
@@ -1929,6 +1929,7 @@
      * @param adminReceiver The admin to add
      * @param refreshing true = update an active admin, no error
      */
+    @Override
     public void setActiveAdmin(ComponentName adminReceiver, boolean refreshing, int userHandle) {
         if (!mHasFeature) {
             return;
@@ -1980,6 +1981,7 @@
         }
     }
 
+    @Override
     public boolean isAdminActive(ComponentName adminReceiver, int userHandle) {
         if (!mHasFeature) {
             return false;
@@ -2002,6 +2004,7 @@
         }
     }
 
+    @Override
     public boolean hasGrantedPolicy(ComponentName adminReceiver, int policyId, int userHandle) {
         if (!mHasFeature) {
             return false;
@@ -2016,6 +2019,7 @@
         }
     }
 
+    @Override
     @SuppressWarnings("unchecked")
     public List<ComponentName> getActiveAdmins(int userHandle) {
         if (!mHasFeature) {
@@ -2037,6 +2041,7 @@
         }
     }
 
+    @Override
     public boolean packageHasActiveAdmins(String packageName, int userHandle) {
         if (!mHasFeature) {
             return false;
@@ -2054,6 +2059,7 @@
         }
     }
 
+    @Override
     public void removeActiveAdmin(ComponentName adminReceiver, int userHandle) {
         if (!mHasFeature) {
             return;
@@ -2081,6 +2087,7 @@
         }
     }
 
+    @Override
     public void setPasswordQuality(ComponentName who, int quality) {
         if (!mHasFeature) {
             return;
@@ -2099,6 +2106,7 @@
         }
     }
 
+    @Override
     public int getPasswordQuality(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED;
@@ -2128,6 +2136,7 @@
         }
     }
 
+    @Override
     public void setPasswordMinimumLength(ComponentName who, int length) {
         if (!mHasFeature) {
             return;
@@ -2144,6 +2153,7 @@
         }
     }
 
+    @Override
     public int getPasswordMinimumLength(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2173,6 +2183,7 @@
         }
     }
 
+    @Override
     public void setPasswordHistoryLength(ComponentName who, int length) {
         if (!mHasFeature) {
             return;
@@ -2189,6 +2200,7 @@
         }
     }
 
+    @Override
     public int getPasswordHistoryLength(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2218,6 +2230,7 @@
         }
     }
 
+    @Override
     public void setPasswordExpirationTimeout(ComponentName who, long timeout) {
         if (!mHasFeature) {
             return;
@@ -2247,6 +2260,7 @@
      * Return a single admin's expiration cycle time, or the min of all cycle times.
      * Returns 0 if not configured.
      */
+    @Override
     public long getPasswordExpirationTimeout(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0L;
@@ -2373,6 +2387,7 @@
         return timeout;
     }
 
+    @Override
     public long getPasswordExpiration(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0L;
@@ -2383,6 +2398,7 @@
         }
     }
 
+    @Override
     public void setPasswordMinimumUpperCase(ComponentName who, int length) {
         if (!mHasFeature) {
             return;
@@ -2399,6 +2415,7 @@
         }
     }
 
+    @Override
     public int getPasswordMinimumUpperCase(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2428,6 +2445,7 @@
         }
     }
 
+    @Override
     public void setPasswordMinimumLowerCase(ComponentName who, int length) {
         Preconditions.checkNotNull(who, "ComponentName is null");
         final int userHandle = UserHandle.getCallingUserId();
@@ -2441,6 +2459,7 @@
         }
     }
 
+    @Override
     public int getPasswordMinimumLowerCase(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2470,6 +2489,7 @@
         }
     }
 
+    @Override
     public void setPasswordMinimumLetters(ComponentName who, int length) {
         if (!mHasFeature) {
             return;
@@ -2486,6 +2506,7 @@
         }
     }
 
+    @Override
     public int getPasswordMinimumLetters(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2518,6 +2539,7 @@
         }
     }
 
+    @Override
     public void setPasswordMinimumNumeric(ComponentName who, int length) {
         if (!mHasFeature) {
             return;
@@ -2534,6 +2556,7 @@
         }
     }
 
+    @Override
     public int getPasswordMinimumNumeric(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2566,6 +2589,7 @@
         }
     }
 
+    @Override
     public void setPasswordMinimumSymbols(ComponentName who, int length) {
         if (!mHasFeature) {
             return;
@@ -2582,6 +2606,7 @@
         }
     }
 
+    @Override
     public int getPasswordMinimumSymbols(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2614,6 +2639,7 @@
         }
     }
 
+    @Override
     public void setPasswordMinimumNonLetter(ComponentName who, int length) {
         if (!mHasFeature) {
             return;
@@ -2630,6 +2656,7 @@
         }
     }
 
+    @Override
     public int getPasswordMinimumNonLetter(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -2662,6 +2689,7 @@
         }
     }
 
+    @Override
     public boolean isActivePasswordSufficient(int userHandle) {
         if (!mHasFeature) {
             return true;
@@ -2696,6 +2724,7 @@
         }
     }
 
+    @Override
     public int getCurrentFailedPasswordAttempts(int userHandle) {
         synchronized (this) {
             // This API can only be called by an active device admin,
@@ -2712,6 +2741,7 @@
         }
     }
 
+    @Override
     public void setMaximumFailedPasswordsForWipe(ComponentName who, int num) {
         if (!mHasFeature) {
             return;
@@ -2786,6 +2816,7 @@
         return strictestAdmin;
     }
 
+    @Override
     public boolean resetPassword(String passwordOrNull, int flags) {
         if (!mHasFeature) {
             return false;
@@ -2938,6 +2969,7 @@
         }
     }
 
+    @Override
     public boolean getDoNotAskCredentialsOnBoot() {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.QUERY_DO_NOT_ASK_CREDENTIALS_ON_BOOT, null);
@@ -2947,6 +2979,7 @@
         }
     }
 
+    @Override
     public void setMaximumTimeToLock(ComponentName who, long timeMs) {
         if (!mHasFeature) {
             return;
@@ -2988,6 +3021,7 @@
         }
     }
 
+    @Override
     public long getMaximumTimeToLock(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -3020,6 +3054,7 @@
         }
     }
 
+    @Override
     public void lockNow() {
         if (!mHasFeature) {
             return;
@@ -3336,14 +3371,19 @@
             wipeDataLocked(wipeExtRequested, reason);
         } else {
             mHandler.post(new Runnable() {
+                @Override
                 public void run() {
                     try {
                         IActivityManager am = ActivityManagerNative.getDefault();
                         if (am.getCurrentUser().id == userHandle) {
                             am.switchUser(UserHandle.USER_OWNER);
                         }
+
+                        boolean isManagedProfile = isManagedProfile(userHandle);
                         if (!mUserManager.removeUser(userHandle)) {
                             Slog.w(LOG_TAG, "Couldn't remove user " + userHandle);
+                        } else if (isManagedProfile) {
+                            sendWipeProfileNotification();
                         }
                     } catch (RemoteException re) {
                         // Shouldn't happen
@@ -3353,6 +3393,19 @@
         }
     }
 
+    private void sendWipeProfileNotification() {
+        String contentText = mContext.getString(R.string.work_profile_deleted_description_dpm_wipe);
+        Notification notification = new Notification.Builder(mContext)
+                .setSmallIcon(android.R.drawable.stat_sys_warning)
+                .setContentTitle(mContext.getString(R.string.work_profile_deleted))
+                .setContentText(contentText)
+                .setColor(mContext.getColor(R.color.system_notification_accent_color))
+                .setStyle(new Notification.BigTextStyle().bigText(contentText))
+                .build();
+        getNotificationManager().notify(PROFILE_WIPED_NOTIFICATION_ID, notification);
+    }
+
+    @Override
     public void getRemoveWarning(ComponentName comp, final RemoteCallback result, int userHandle) {
         if (!mHasFeature) {
             return;
@@ -3386,6 +3439,7 @@
         }
     }
 
+    @Override
     public void setActivePasswordState(int quality, int length, int letters, int uppercase,
             int lowercase, int numbers, int symbols, int nonletter, int userHandle) {
         if (!mHasFeature) {
@@ -3455,6 +3509,7 @@
             }
     }
 
+    @Override
     public void reportFailedPasswordAttempt(int userHandle) {
         enforceCrossUserPermission(userHandle);
         enforceNotManagedProfile(userHandle, "report failed password attempt");
@@ -3496,6 +3551,7 @@
         }
     }
 
+    @Override
     public void reportSuccessfulPasswordAttempt(int userHandle) {
         enforceCrossUserPermission(userHandle);
         mContext.enforceCallingOrSelfPermission(
@@ -3521,6 +3577,7 @@
         }
     }
 
+    @Override
     public ComponentName setGlobalProxy(ComponentName who, String proxySpec,
             String exclusionList) {
         if (!mHasFeature) {
@@ -3575,6 +3632,7 @@
         }
     }
 
+    @Override
     public ComponentName getGlobalProxyAdmin(int userHandle) {
         if (!mHasFeature) {
             return null;
@@ -3598,6 +3656,7 @@
         return null;
     }
 
+    @Override
     public void setRecommendedGlobalProxy(ComponentName who, ProxyInfo proxyInfo) {
         synchronized (this) {
             getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
@@ -3659,6 +3718,7 @@
      * Set the storage encryption request for a single admin.  Returns the new total request
      * status (for all admins).
      */
+    @Override
     public int setStorageEncryption(ComponentName who, boolean encrypt) {
         if (!mHasFeature) {
             return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;
@@ -3711,6 +3771,7 @@
      * Get the current storage encryption request status for a given admin, or aggregate of all
      * active admins.
      */
+    @Override
     public boolean getStorageEncryption(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return false;
@@ -3740,6 +3801,7 @@
     /**
      * Get the current encryption status of the device.
      */
+    @Override
     public int getStorageEncryptionStatus(int userHandle) {
         if (!mHasFeature) {
             // Ok to return current status.
@@ -3794,6 +3856,7 @@
     /**
      * Set whether the screen capture is disabled for the user managed by the specified admin.
      */
+    @Override
     public void setScreenCaptureDisabled(ComponentName who, boolean disabled) {
         if (!mHasFeature) {
             return;
@@ -3815,6 +3878,7 @@
      * Returns whether or not screen capture is disabled for a given admin, or disabled for any
      * active admin (if given admin is null).
      */
+    @Override
     public boolean getScreenCaptureDisabled(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return false;
@@ -3851,6 +3915,7 @@
     /**
      * Set whether auto time is required by the specified admin (must be device owner).
      */
+    @Override
     public void setAutoTimeRequired(ComponentName who, boolean required) {
         if (!mHasFeature) {
             return;
@@ -3881,6 +3946,7 @@
     /**
      * Returns whether or not auto time is required by the device owner.
      */
+    @Override
     public boolean getAutoTimeRequired() {
         if (!mHasFeature) {
             return false;
@@ -3901,6 +3967,7 @@
     /**
      * Disables all device cameras according to the specified admin.
      */
+    @Override
     public void setCameraDisabled(ComponentName who, boolean disabled) {
         if (!mHasFeature) {
             return;
@@ -3922,6 +3989,7 @@
      * Gets whether or not all device cameras are disabled for a given admin, or disabled for any
      * active admins.
      */
+    @Override
     public boolean getCameraDisabled(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return false;
@@ -3948,6 +4016,7 @@
     /**
      * Selectively disable keyguard features.
      */
+    @Override
     public void setKeyguardDisabledFeatures(ComponentName who, int which) {
         if (!mHasFeature) {
             return;
@@ -3972,6 +4041,7 @@
      * Gets the disabled state for features in keyguard for the given admin,
      * or the aggregate of all active admins if who is null.
      */
+    @Override
     public int getKeyguardDisabledFeatures(ComponentName who, int userHandle) {
         if (!mHasFeature) {
             return 0;
@@ -4735,6 +4805,7 @@
         }
     }
 
+    @Override
     public void setTrustAgentConfiguration(ComponentName admin, ComponentName agent,
             PersistableBundle args) {
         if (!mHasFeature) {
@@ -4753,6 +4824,7 @@
         }
     }
 
+    @Override
     public List<PersistableBundle> getTrustAgentConfiguration(ComponentName admin,
             ComponentName agent, int userHandle) {
         if (!mHasFeature) {
@@ -4834,6 +4906,7 @@
         }
     }
 
+    @Override
     public void addCrossProfileIntentFilter(ComponentName who, IntentFilter filter, int flags) {
         Preconditions.checkNotNull(who, "ComponentName is null");
         int callingUserId = UserHandle.getCallingUserId();
@@ -4859,6 +4932,7 @@
         }
     }
 
+    @Override
     public void clearCrossProfileIntentFilters(ComponentName who) {
         Preconditions.checkNotNull(who, "ComponentName is null");
         int callingUserId = UserHandle.getCallingUserId();
@@ -5779,6 +5853,7 @@
      * This function can only be called by the device owner.
      * @param packages The list of packages allowed to enter lock task mode.
      */
+    @Override
     public void setLockTaskPackages(ComponentName who, String[] packages)
             throws SecurityException {
         Preconditions.checkNotNull(who, "ComponentName is null");
@@ -5802,6 +5877,7 @@
     /**
      * This function returns the list of components allowed to start the task lock mode.
      */
+    @Override
     public String[] getLockTaskPackages(ComponentName who) {
         Preconditions.checkNotNull(who, "ComponentName is null");
         synchronized (this) {
@@ -5822,6 +5898,7 @@
      * lock task mode.
      * @param pkg The package to check
      */
+    @Override
     public boolean isLockTaskPermitted(String pkg) {
         // Get current user's devicepolicy
         int uid = Binder.getCallingUid();