Merge "Settings: App notification settings updates."
diff --git a/res/color/lock_pattern_view_success_color.xml b/res/color/lock_pattern_view_success_color.xml
new file mode 100644
index 0000000..075e919
--- /dev/null
+++ b/res/color/lock_pattern_view_success_color.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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="?android:attr/colorAccent" />
+</selector>
diff --git a/res/color/unlock_pattern_view_success_color.xml b/res/color/unlock_pattern_view_success_color.xml
new file mode 100644
index 0000000..075e919
--- /dev/null
+++ b/res/color/unlock_pattern_view_success_color.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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="?android:attr/colorAccent" />
+</selector>
diff --git a/res/layout/app_cache_settings.xml b/res/layout/app_cache_settings.xml
new file mode 100644
index 0000000..bb57433
--- /dev/null
+++ b/res/layout/app_cache_settings.xml
@@ -0,0 +1,58 @@
+<?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.
+-->
+
+<!-- Clear cache section -->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/all_details"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:orientation="vertical">
+
+    <FrameLayout
+        android:id="@+id/cache_size"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="8dip">
+        <TextView
+            android:text="@string/cache_size_label"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:maxLines="1"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="?android:textColorPrimary"
+            android:gravity="center_vertical" />
+        <TextView
+            android:id="@+id/cache_size_text"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:gravity="right"
+            android:maxLines="1" />
+    </FrameLayout>
+
+    <include
+        android:id="@+id/clear_cache_button"
+        layout="@layout/single_button_panel" />
+
+    <Space
+        android:layout_width="match_parent"
+        android:layout_height="10dp" />
+
+</LinearLayout>
diff --git a/res/layout/app_storage_settings.xml b/res/layout/app_storage_settings.xml
new file mode 100644
index 0000000..82493f7
--- /dev/null
+++ b/res/layout/app_storage_settings.xml
@@ -0,0 +1,151 @@
+<?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.
+-->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/all_details"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:orientation="vertical">
+
+    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/category_title"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/dashboard_category_title_height"
+        android:singleLine="true"
+        android:gravity="center_vertical"
+        android:textAppearance="@style/TextAppearance.CategoryTitle"
+        android:textAlignment="viewStart"
+        android:text="@string/storage_label"
+        />
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="0dip">
+        <TextView
+            android:id="@+id/total_size_prefix"
+            android:text="@string/total_size_label"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textColor="?android:textColorPrimary"
+            android:maxLines="1" />
+        <TextView
+            android:id="@+id/total_size_text"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:gravity="right"
+            android:maxLines="1" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="3dip">
+        <TextView
+            android:id="@+id/application_size_prefix"
+            android:text="@string/application_size_label"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textColor="?android:textColorPrimary"
+            android:maxLines="1" />
+        <TextView
+            android:id="@+id/application_size_text"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:gravity="right"
+            android:maxLines="1" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="3dip">
+        <TextView
+            android:id="@+id/external_code_size_prefix"
+            android:text="@string/external_code_size_label"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textColor="?android:textColorPrimary"
+            android:maxLines="1" />
+        <TextView
+            android:id="@+id/external_code_size_text"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:gravity="right"
+            android:maxLines="1" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="3dip">
+        <TextView
+            android:id="@+id/data_size_prefix"
+            android:text="@string/data_size_label"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textColor="?android:textColorPrimary"
+            android:maxLines="1" />
+        <TextView
+            android:id="@+id/data_size_text"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:gravity="right"
+            android:maxLines="1" />
+    </FrameLayout>
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="3dip">
+        <TextView
+            android:id="@+id/external_data_size_prefix"
+            android:text="@string/external_data_size_label"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textColor="?android:textColorPrimary"
+            android:maxLines="1" />
+        <TextView
+            android:id="@+id/external_data_size_text"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:gravity="right"
+            android:maxLines="1" />
+    </FrameLayout>
+
+    <include
+        android:id="@+id/clear_data_button"
+        layout="@layout/single_button_panel" />
+
+    <Space
+        android:layout_width="match_parent"
+        android:layout_height="10dp" />
+
+</LinearLayout>
diff --git a/res/layout/installed_app_details.xml b/res/layout/installed_app_details.xml
index cebec28..b703ec0 100644
--- a/res/layout/installed_app_details.xml
+++ b/res/layout/installed_app_details.xml
@@ -49,11 +49,6 @@
             layout="@layout/two_buttons_panel"
             android:id="@+id/control_buttons_panel"/>
 
-        <!-- Force stop and uninstall buttons -->
-        <include
-            layout="@layout/two_buttons_panel"
-            android:id="@+id/more_control_buttons_panel"/>
-
     </LinearLayout>
 </LinearLayout>
 
diff --git a/res/layout/single_button_panel.xml b/res/layout/single_button_panel.xml
new file mode 100755
index 0000000..5f1fee9
--- /dev/null
+++ b/res/layout/single_button_panel.xml
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+<!--
+  Defines a panel with one button in the same layout as the two button layout.
+-->
+
+<LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="bottom"
+        android:paddingTop="4dip"
+        android:orientation="horizontal">
+        <Button
+            android:id="@+id/button"
+            android:layout_width="120dip"
+            android:layout_weight="0.4"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical" />
+        <Space
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="0.2" />
+        <Space
+            android:layout_width="120dip"
+            android:layout_weight="0.4"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"/>
+</LinearLayout>
diff --git a/res/layout/storage_settings.xml b/res/layout/storage_settings.xml
deleted file mode 100644
index a73cf4c..0000000
--- a/res/layout/storage_settings.xml
+++ /dev/null
@@ -1,306 +0,0 @@
-<?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.
--->
-
-<ScrollView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:clipToPadding="false"
-    android:scrollbarStyle="@integer/preference_scrollbar_style">
-
-    <LinearLayout
-        android:id="@+id/all_details"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-        android:paddingBottom="5dip"
-        android:orientation="vertical">
-
-
-        <TextView
-            style="?android:attr/listSeparatorTextViewStyle"
-            android:layout_marginTop="8dip"
-            android:text="@string/storage_label" />
-
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical"
-            android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-            android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:baselineAligned="true"
-                android:paddingTop="-1dip">
-                <TextView
-                    android:id="@+id/total_size_prefix"
-                    android:text="@string/total_size_label"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1"
-                    android:paddingTop="6dip" />
-                <ImageView
-                    android:id="@+id/info_size_dots"
-                    android:src="@drawable/dotted_line_480px"
-                    android:layout_width="0dip"
-                    android:layout_weight="1"
-                    android:layout_height="1px"
-                    android:layout_gravity="bottom"
-                    android:layout_marginStart="1dip"
-                    android:layout_marginEnd="1dip"
-                    android:layout_marginBottom="4dip"
-                    android:scaleType="center"
-                    android:contentDescription="@null" />
-                <TextView
-                    android:id="@+id/total_size_text"
-                    android:paddingTop="6dip"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:baselineAligned="true"
-                android:paddingTop="-1dip">
-                <TextView
-                    android:id="@+id/application_size_prefix"
-                    android:text="@string/application_size_label"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1"
-                    android:paddingTop="6dip" />
-                <ImageView
-                    android:id="@+id/info_size_dots"
-                    android:src="@drawable/dotted_line_480px"
-                    android:layout_width="0dip"
-                    android:layout_weight="1"
-                    android:layout_height="1px"
-                    android:layout_gravity="bottom"
-                    android:layout_marginStart="1dip"
-                    android:layout_marginEnd="1dip"
-                    android:layout_marginBottom="4dip"
-                    android:scaleType="center"
-                    android:contentDescription="@null" />
-                <TextView
-                    android:id="@+id/application_size_text"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:paddingTop="6dip"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:baselineAligned="true"
-                android:paddingTop="-1dip">
-                <TextView
-                    android:id="@+id/external_code_size_prefix"
-                    android:text="@string/external_code_size_label"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1"
-                    android:paddingTop="6dip" />
-                <ImageView
-                    android:id="@+id/info_size_dots"
-                    android:src="@drawable/dotted_line_480px"
-                    android:layout_width="0dip"
-                    android:layout_weight="1"
-                    android:layout_height="1px"
-                    android:layout_gravity="bottom"
-                    android:layout_marginStart="1dip"
-                    android:layout_marginEnd="1dip"
-                    android:layout_marginBottom="4dip"
-                    android:scaleType="center"
-                    android:contentDescription="@null" />
-                <TextView
-                    android:id="@+id/external_code_size_text"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:paddingTop="6dip"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/info_size"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:baselineAligned="true"
-                android:paddingTop="-1dip">
-                <TextView
-                    android:id="@+id/data_size_prefix"
-                    android:text="@string/data_size_label"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1"
-                    android:paddingTop="6dip" />
-                <ImageView
-                    android:id="@+id/info_size_dots"
-                    android:src="@drawable/dotted_line_480px"
-                    android:layout_width="0dip"
-                    android:layout_weight="1"
-                    android:layout_height="1px"
-                    android:layout_gravity="bottom"
-                    android:layout_marginStart="1dip"
-                    android:layout_marginEnd="1dip"
-                    android:layout_marginBottom="4dip"
-                    android:scaleType="center"
-                    android:contentDescription="@null" />
-                <TextView
-                    android:id="@+id/data_size_text"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:paddingTop="6dip"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:baselineAligned="true"
-                android:paddingTop="-1dip">
-                <TextView
-                    android:id="@+id/external_data_size_prefix"
-                    android:text="@string/external_data_size_label"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1"
-                    android:paddingTop="6dip" />
-                <ImageView
-                    android:id="@+id/info_size_dots"
-                    android:src="@drawable/dotted_line_480px"
-                    android:layout_width="0dip"
-                    android:layout_weight="1"
-                    android:layout_height="1px"
-                    android:layout_gravity="bottom"
-                    android:layout_marginStart="1dip"
-                    android:layout_marginEnd="1dip"
-                    android:layout_marginBottom="4dip"
-                    android:scaleType="center"
-                    android:contentDescription="@null" />
-                <TextView
-                    android:id="@+id/external_data_size_text"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:paddingTop="6dip"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1" />
-            </LinearLayout>
-
-            <!-- Clear data and install location buttons  -->
-            <include
-                layout="@layout/two_buttons_panel"
-                android:id="@+id/data_buttons_panel"/>
-
-        </LinearLayout>
-
-
-        <!-- Clear cache section -->
-        <RelativeLayout
-            android:id="@+id/cache_panel"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" >
-            <TextView
-                android:id="@+id/cache_header"
-                style="?android:attr/listSeparatorTextViewStyle"
-                android:layout_marginTop="8dip"
-                android:text="@string/cache_header_label" />
-            <LinearLayout
-                android:id="@+id/cache_size"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:baselineAligned="true"
-                android:layout_below="@id/cache_header"
-                android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-                android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-                android:paddingTop="-1dip">
-                <TextView
-                    android:text="@string/cache_size_label"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:paddingTop="6dip"
-                    android:gravity="center_vertical" />
-                <ImageView
-                    android:src="@drawable/dotted_line_480px"
-                    android:layout_width="0dip"
-                    android:layout_weight="1"
-                    android:layout_height="1px"
-                    android:layout_gravity="bottom"
-                    android:layout_marginStart="1dip"
-                    android:layout_marginEnd="1dip"
-                    android:layout_marginBottom="4dip"
-                    android:scaleType="center"
-                    android:contentDescription="@null" />
-                <TextView
-                    android:id="@+id/cache_size_text"
-                    android:textAppearance="?android:attr/textAppearanceMedium"
-                    android:paddingTop="6dip"
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:maxLines="1" />
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_below="@id/cache_size"
-                android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-                android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-                android:paddingTop="4dip"
-                android:orientation="horizontal">
-                <View
-                    android:layout_width="120dip"
-                    android:layout_height="0dip"
-                    android:layout_weight="0.4" />
-                <View
-                    android:layout_width="0dip"
-                    android:layout_height="0dip"
-                    android:visibility="invisible"
-                    android:layout_weight="0.2" />
-                <Button
-                    android:id="@+id/clear_cache_button"
-                    android:layout_width="120dip"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="0.4"
-                    android:text="@string/clear_cache_btn_text" />
-            </LinearLayout>
-
-        </RelativeLayout>
-    </LinearLayout>
-</ScrollView>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index ac1b108..a73eba6 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -724,7 +724,7 @@
     <string name="wifi_p2p_device_info" msgid="3191876744469364173">"Données relatives à l\'appareil utilisé"</string>
     <string name="wifi_p2p_persist_network" msgid="1646424791818168590">"Mémoriser cette connexion"</string>
     <string name="wifi_p2p_menu_search" msgid="3436429984738771974">"Rechercher des appareils"</string>
-    <string name="wifi_p2p_menu_searching" msgid="2396704492143633876">"Searching…"</string>
+    <string name="wifi_p2p_menu_searching" msgid="2396704492143633876">"S\'està cercant..."</string>
     <string name="wifi_p2p_menu_rename" msgid="8448896306960060415">"Renommer l\'appareil"</string>
     <string name="wifi_p2p_peer_devices" msgid="299526878463303432">"Appareils associés"</string>
     <string name="wifi_p2p_remembered_groups" msgid="3847022927914068230">"Groupes mémorisés"</string>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 83449f9..97ba2ed 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -53,11 +53,9 @@
 
     <color name="lock_pattern_background">#00000000</color>
     <color name="lock_pattern_view_regular_color">#ff37474f</color>
-    <color name="lock_pattern_view_success_color">@color/theme_accent</color>
     <color name="lock_pattern_view_error_color">#fff4511e</color>
 
     <color name="unlock_pattern_view_regular_color">@android:color/white</color>
-    <color name="unlock_pattern_view_success_color">@color/theme_accent</color>
     <color name="unlock_pattern_view_error_color">#fff4511e</color>
 
     <color name="fingerprint_title_area_bg">#ff009688</color>
@@ -72,11 +70,6 @@
 
     <color name="card_background">#ffffffff</color>
 
-    <!-- Palette colors referenced by top-level themes. -->
-    <color name="theme_primary">#ff263238</color>
-    <color name="theme_primary_dark">#ff21272b</color>
-    <color name="theme_accent">#ff009688</color>
-
     <color name="switchbar_background_color">#ff37474f</color>
     <color name="switch_accent_color">#ff7fcac3</color>
 
diff --git a/res/values/strings.xml b/res/values/strings.xml
index dbe61b9..c202a89 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1500,7 +1500,7 @@
     <!-- Message in WPS dialog at start up [CHAR LIMIT=150] -->
     <string name="wifi_wps_setup_msg">Starting WPS\u2026</string>
     <!-- Message in WPS dialog for PBC after start up [CHAR LIMIT=150] -->
-    <string name="wifi_wps_onstart_pbc">Press the Wi\u2011Fi Protected Setup button on your router. It may be called \"WPS\" or contain this symbol:</string>
+    <string name="wifi_wps_onstart_pbc">Press the Wi\u2011Fi Protected Setup button on your router. It may be called \"WPS\" or marked with this symbol:</string>
     <!-- Message in WPS dialog for PIN after start up [CHAR LIMIT=150] -->
     <string name="wifi_wps_onstart_pin">Enter pin <xliff:g id="number">%1$s</xliff:g> on your Wi\u2011Fi router. The setup can take up to two minutes to complete.</string>
     <!-- Text displayed when WPS succeeds [CHAR LIMIT=150] -->
@@ -6059,15 +6059,18 @@
    <string name="storage_summary_format"><xliff:g id="size" example="30.00MB">%1$s</xliff:g> used in <xliff:g id="storage_type" example="internal storage">%2$s</xliff:g></string>
 
    <!-- Summary describing internal storage for applications [CHAR LIMIT=25] -->
-   <string name="storage_type_internal">internal storage</string>
+   <string name="storage_type_internal">Internal storage</string>
    <!-- Summary describing external storage for applications [CHAR LIMIT=25] -->
-   <string name="storage_type_external">external storage</string>
+   <string name="storage_type_external">External storage</string>
 
    <!-- Title for data usage screen when entered from app info [CHAR LIMIT=30] -->
    <string name="app_data_usage">App data usage</string>
    <!-- Summary for data usage preference [CHAR LIMIT=15] -->
    <string name="data_summary_format"><xliff:g id="size" example="30.00MB">%1$s</xliff:g> used since <xliff:g id="date" example="Jan 12">%2$s</xliff:g></string>
 
+   <!-- Title of storage preference to control where app is stored -->
+   <string name="storage_used">Storage used</string>
+
    <!-- App notification summary with notifications enabled [CHAR LIMIT=40] -->
    <string name="notifications_enabled">On</string>
    <!-- App notification summary with notifications disabled [CHAR LIMIT=40] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8ea359d..a1a596e 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -335,9 +335,8 @@
     <style name="TextAppearance.Switch" parent="TextAppearance.Medium">
     </style>
 
-    <style name="TextAppearance.CategoryTitle" parent="@android:style/TextAppearance.Material.Small">
-        <item name="android:textColor">@color/theme_accent</item>
-        <item name="android:textStyle">bold</item>
+    <style name="TextAppearance.CategoryTitle" parent="@android:style/TextAppearance.Material.Body2">
+        <item name="android:textColor">?android:attr/colorAccent</item>
     </style>
 
     <style name="TextAppearance.TileTitle" parent="@android:style/TextAppearance.Material.Medium">
diff --git a/res/xml/app_storage_settings.xml b/res/xml/app_storage_settings.xml
new file mode 100644
index 0000000..6baaae1
--- /dev/null
+++ b/res/xml/app_storage_settings.xml
@@ -0,0 +1,34 @@
+<?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.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+                  android:title="@string/application_info_label">
+
+    <com.android.settings.DropDownPreference
+        android:key="app_location_setting"
+        android:title="@string/storage_used"
+        android:summary="@string/storage_type_internal"
+        android:selectable="true" />
+
+    <com.android.settings.applications.LayoutPreference
+        android:key="storage_settings"
+        android:layout="@layout/app_storage_settings" />
+
+    <com.android.settings.applications.LayoutPreference
+        android:key="cache_settings"
+        android:layout="@layout/app_cache_settings" />
+
+</PreferenceScreen>
diff --git a/res/xml/battery_saver_settings.xml b/res/xml/battery_saver_settings.xml
index cb923c8..0134c6f 100644
--- a/res/xml/battery_saver_settings.xml
+++ b/res/xml/battery_saver_settings.xml
@@ -19,7 +19,7 @@
         android:key="battery_saver">
 
     <!-- Turn on automatically -->
-    <com.android.settings.notification.DropDownPreference
+    <com.android.settings.DropDownPreference
             android:key="turn_on_automatically"
             android:title="@string/battery_saver_turn_on_automatically_title"
             android:persistent="false" />
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index db650f3..70dcb9a 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -81,7 +81,7 @@
                 android:entryValues="@array/entryvalues_font_size"
                 android:dialogTitle="@string/dialog_title_font_size" />
 
-        <com.android.settings.notification.DropDownPreference
+        <com.android.settings.DropDownPreference
                 android:key="auto_rotate"
                 android:title="@string/display_auto_rotate_title" />
 
diff --git a/res/xml/installed_app_details.xml b/res/xml/installed_app_details.xml
index 2f72f5d..09f5bb3 100644
--- a/res/xml/installed_app_details.xml
+++ b/res/xml/installed_app_details.xml
@@ -16,7 +16,7 @@
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                   android:title="@string/application_info_label">
-    <com.android.settings.applications.HeaderPreference
+    <com.android.settings.applications.LayoutPreference
         android:key="header_view"
         android:layout="@layout/installed_app_details" />
 
diff --git a/res/xml/notification_settings.xml b/res/xml/notification_settings.xml
index 6e62f83..ac61b00 100644
--- a/res/xml/notification_settings.xml
+++ b/res/xml/notification_settings.xml
@@ -105,7 +105,7 @@
                 android:persistent="false" />
 
          <!-- When device is locked -->
-        <com.android.settings.notification.DropDownPreference
+        <com.android.settings.DropDownPreference
                 android:key="lock_screen_notifications"
                 android:title="@string/lock_screen_notifications_title"
                 android:persistent="false" />
diff --git a/res/xml/other_sound_settings.xml b/res/xml/other_sound_settings.xml
index 08679db..88c4130 100644
--- a/res/xml/other_sound_settings.xml
+++ b/res/xml/other_sound_settings.xml
@@ -60,13 +60,13 @@
             android:persistent="false" />
 
     <!-- Dock speaker plays -->
-    <com.android.settings.notification.DropDownPreference
+    <com.android.settings.DropDownPreference
             android:key="dock_audio_media"
             android:title="@string/dock_audio_media_title"
             android:persistent="false" />
 
     <!-- Emergency tone -->
-    <com.android.settings.notification.DropDownPreference
+    <com.android.settings.DropDownPreference
             android:key="emergency_tone"
             android:title="@string/emergency_tone_title"
             android:persistent="false" />
diff --git a/res/xml/zen_mode_settings.xml b/res/xml/zen_mode_settings.xml
index 7514565..3ac4eef 100644
--- a/res/xml/zen_mode_settings.xml
+++ b/res/xml/zen_mode_settings.xml
@@ -20,7 +20,7 @@
     android:title="@string/zen_mode_settings_title" >
 
     <!-- When calls and notifications arrive -->
-    <com.android.settings.notification.DropDownPreference
+    <com.android.settings.DropDownPreference
             android:key="zen_mode"
             android:title="@string/zen_mode_option_title"
             android:persistent="false" />
@@ -50,7 +50,7 @@
             android:switchTextOff=""
             android:switchTextOn="" />
 
-        <com.android.settings.notification.DropDownPreference
+        <com.android.settings.DropDownPreference
                 android:key="starred"
                 android:title="@string/zen_mode_from"
                 android:persistent="false" />
@@ -79,7 +79,7 @@
         <!-- Start time/End time added and removed here! :-) -->
 
         <!-- Interruptions allowed -->
-        <com.android.settings.notification.DropDownPreference
+        <com.android.settings.DropDownPreference
                 android:key="downtime_mode"
                 android:title="@string/zen_mode_downtime_mode_title"
                 android:order="100"
@@ -103,4 +103,4 @@
 
     </PreferenceCategory>
 
-</PreferenceScreen>
\ No newline at end of file
+</PreferenceScreen>
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index b78cd6e..0d21066 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -870,7 +870,7 @@
 
         mBinding = false;
 
-        int seriesColor = resources.getColor(R.color.sim_noitification);
+        int seriesColor = context.getColor(R.color.sim_noitification);
         if (mCurrentTab != null && mCurrentTab.length() > TAB_MOBILE.length() ){
             final int slotId = Integer.parseInt(mCurrentTab.substring(TAB_MOBILE.length(),
                     mCurrentTab.length()));
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index 337ec23..3358124 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -17,8 +17,7 @@
 package com.android.settings;
 
 import com.android.internal.view.RotationPolicy;
-import com.android.settings.notification.DropDownPreference;
-import com.android.settings.notification.DropDownPreference.Callback;
+import com.android.settings.DropDownPreference.Callback;
 import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settings.search.Indexable;
 
diff --git a/src/com/android/settings/notification/DropDownPreference.java b/src/com/android/settings/DropDownPreference.java
similarity index 98%
rename from src/com/android/settings/notification/DropDownPreference.java
rename to src/com/android/settings/DropDownPreference.java
index 1d1b366..8f8ec78 100644
--- a/src/com/android/settings/notification/DropDownPreference.java
+++ b/src/com/android/settings/DropDownPreference.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.settings.notification;
+package com.android.settings;
 
 import android.content.Context;
 import android.preference.Preference;
diff --git a/src/com/android/settings/FingerprintEnroll.java b/src/com/android/settings/FingerprintEnroll.java
index 865fcdc..376444e 100644
--- a/src/com/android/settings/FingerprintEnroll.java
+++ b/src/com/android/settings/FingerprintEnroll.java
@@ -384,15 +384,6 @@
             }
         };
 
-        private boolean runConfirmDeviceCredentials(int request) {
-            if (DEBUG) Log.v(TAG, "runKeyguardConfirmation(" + request + ")");
-            Resources res = getResources();
-            return new ChooseLockSettingsHelper(getActivity(), this)
-                    .launchConfirmationActivity(request,
-                            res.getText(R.string.master_clear_gesture_prompt),
-                            res.getText(R.string.master_clear_gesture_explanation));
-        }
-
         @Override
         public void onActivityResult(int requestCode, int resultCode, Intent data) {
             super.onActivityResult(requestCode, resultCode, data);
diff --git a/src/com/android/settings/FingerprintSettings.java b/src/com/android/settings/FingerprintSettings.java
index f91fcfa..e7443e3 100644
--- a/src/com/android/settings/FingerprintSettings.java
+++ b/src/com/android/settings/FingerprintSettings.java
@@ -22,7 +22,9 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.os.Handler;
 import android.preference.Preference;
 import android.preference.Preference.OnPreferenceChangeListener;
 import android.preference.PreferenceGroup;
@@ -30,12 +32,13 @@
 import android.service.fingerprint.FingerprintManager;
 import android.service.fingerprint.FingerprintManagerReceiver;
 import android.service.fingerprint.FingerprintManager.FingerprintItem;
+import android.util.AttributeSet;
 import android.util.Log;
+import android.view.View;
 import android.widget.EditText;
 
 import com.android.settings.search.Indexable;
 
-import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -73,14 +76,28 @@
         private static final String KEY_FINGERPRINT_ENABLE_KEYGUARD_TOGGLE =
                 "fingerprint_enable_keyguard_toggle";
 
+        private static final int MSG_REFRESH_FINGERPRINT_TEMPLATES = 1000;
+        private static final int MSG_HIGHLIGHT_FINGERPRINT_ITEM = 1001;
+
         private static final int ADD_FINGERPRINT_REQUEST = 10;
 
         private static final boolean ENABLE_USAGE_CATEGORY = false;
 
         private FingerprintManager mFingerprintManager;
-        private HashMap<Preference, FingerprintItem> mFingerprintMap
-                = new HashMap<Preference, FingerprintManager.FingerprintItem>();
         private EditText mDialogTextField;
+        private PreferenceGroup mManageCategory;
+        private final Handler mHandler = new Handler() {
+            public void handleMessage(android.os.Message msg) {
+                switch (msg.what) {
+                    case MSG_REFRESH_FINGERPRINT_TEMPLATES:
+                        removeFingerprintPreference(msg.arg1);
+                    break;
+                    case MSG_HIGHLIGHT_FINGERPRINT_ITEM:
+                        highlightFingerprintItem(msg.arg1);
+                    break;
+                }
+            };
+        };
 
         @Override
         public void onCreate(Bundle savedInstanceState) {
@@ -90,17 +107,42 @@
             mFingerprintManager.startListening(new FingerprintManagerReceiver() {
                 @Override
                 public void onRemoved(int fingerprintId) {
-                    Log.v(TAG, "Fingerprint template " + fingerprintId + " removed");
-                    // TODO: this is a bit wasteful; just remove the fingerprint id item
-                    createPreferenceHierarchy();
+                    mHandler.obtainMessage(MSG_REFRESH_FINGERPRINT_TEMPLATES, fingerprintId, 0)
+                            .sendToTarget();
                 }
                 @Override
                 public void onProcessed(int fingerprintId) {
-                    Log.v(TAG, "Fingerprint " + fingerprintId + " detected");
+                    if (fingerprintId != 0) {
+                        mHandler.obtainMessage(MSG_HIGHLIGHT_FINGERPRINT_ITEM, fingerprintId, 0)
+                                .sendToTarget();
+                    }
                 }
             });
         }
 
+        protected void removeFingerprintPreference(int fingerprintId) {
+            String name = genKey(fingerprintId);
+            Preference prefToRemove = mManageCategory.findPreference(name);
+            if (prefToRemove != null) {
+                if (!mManageCategory.removePreference(prefToRemove)) {
+                    Log.w(TAG, "Failed to remove preference with key " + name);
+                }
+            } else {
+                Log.w(TAG, "Can't find preference to remove: " + name);
+            }
+        }
+
+        private void highlightFingerprintItem(int fpId) {
+            String prefName = genKey(fpId);
+            Preference pref = mManageCategory.findPreference(prefName);
+            if (pref instanceof FingerprintPreference) {
+                final FingerprintPreference fpref = (FingerprintPreference) pref;
+                fpref.highlight();
+            } else {
+                Log.w(TAG, "Wrong pref " + (pref != null ? pref.getKey() : "null"));
+            }
+        }
+
         /**
          * Important!
          *
@@ -116,10 +158,9 @@
             root = getPreferenceScreen();
 
             // Fingerprint items
-            PreferenceGroup manageCategory = (PreferenceGroup) root.findPreference(
-                    KEY_MANAGE_CATEGORY);
-            if (manageCategory != null) {
-                addFingerprintItemPreferences(manageCategory);
+            mManageCategory = (PreferenceGroup) root.findPreference(KEY_MANAGE_CATEGORY);
+            if (mManageCategory != null) {
+                addFingerprintItemPreferences(mManageCategory);
             }
 
             // Fingerprint usage options
@@ -142,15 +183,16 @@
             manageFingerprintCategory.removeAll();
             List<FingerprintItem> items = mFingerprintManager.getEnrolledFingerprints();
             final int fingerprintCount = items.size();
-            mFingerprintMap.clear();
             for (int i = 0; i < fingerprintCount; i++) {
-                Preference pref = new Preference(manageFingerprintCategory.getContext());
-                pref.setKey(KEY_FINGERPRINT_ITEM);
-                FingerprintItem item = items.get(i);
+                final FingerprintItem item = items.get(i);
+                FingerprintPreference pref = new FingerprintPreference(
+                        manageFingerprintCategory.getContext());
+                pref.setKey(genKey(item.id));
                 pref.setTitle(item.name);
+                pref.setFingerprintItem(item);
+                pref.setPersistent(false);
                 manageFingerprintCategory.addPreference(pref);
                 pref.setOnPreferenceChangeListener(this);
-                mFingerprintMap.put(pref, item);
             }
             Preference addPreference = new Preference(manageFingerprintCategory.getContext());
             addPreference.setKey(KEY_FINGERPRINT_ADD);
@@ -159,6 +201,10 @@
             addPreference.setOnPreferenceChangeListener(this);
         }
 
+        private static String genKey(int id) {
+            return KEY_FINGERPRINT_ITEM + "_" + id;
+        }
+
         @Override
         public void onResume() {
             super.onResume();
@@ -174,8 +220,9 @@
                 Intent intent = new Intent();
                 intent.setClassName("com.android.settings", FingerprintEnroll.class.getName());
                 startActivityForResult(intent, ADD_FINGERPRINT_REQUEST);
-            } else if (KEY_FINGERPRINT_ITEM.equals(key)) {
-                final FingerprintItem item = mFingerprintMap.get(pref);
+            } else if (pref instanceof FingerprintPreference) {
+                FingerprintPreference fpref = (FingerprintPreference) pref;
+                final FingerprintItem item =fpref.getFingerprintItem();
                 showRenameDeleteDialog(item.name, pref, item.id);
                 return super.onPreferenceTreeClick(preferenceScreen, pref);
             }
@@ -232,4 +279,67 @@
             return R.string.help_url_security;
         }
     }
+
+    public static class FingerprintPreference extends Preference {
+        private static final int RESET_HIGHLIGHT_DELAY_MS = 500;
+        private FingerprintItem mFingerprintItem;
+        private View mView;
+        private Drawable mHighlightDrawable;
+        private Context mContext;
+
+        public FingerprintPreference(Context context, AttributeSet attrs, int defStyleAttr,
+                int defStyleRes) {
+            super(context, attrs, defStyleAttr, defStyleRes);
+            mContext = context;
+        }
+        public FingerprintPreference(Context context, AttributeSet attrs, int defStyleAttr) {
+            this(context, attrs, defStyleAttr, 0);
+        }
+
+        public FingerprintPreference(Context context, AttributeSet attrs) {
+            this(context, attrs, com.android.internal.R.attr.preferenceStyle);
+        }
+
+        public FingerprintPreference(Context context) {
+            this(context, null);
+        }
+
+        public void setFingerprintItem(FingerprintItem item) {
+            mFingerprintItem = item;
+        }
+
+        public FingerprintItem getFingerprintItem() {
+            return mFingerprintItem;
+        }
+
+        private Drawable getHighlightDrawable() {
+            if (mHighlightDrawable == null) {
+                mHighlightDrawable = mContext.getDrawable(R.drawable.preference_highlight);
+            }
+            return mHighlightDrawable;
+        }
+
+        public void highlight() {
+            Drawable highlight = getHighlightDrawable();
+            final View view = mView;
+            view.setBackground(highlight);
+            final int centerX = view.getWidth() / 2;
+            final int centerY = view.getHeight() / 2;
+            highlight.setHotspot(centerX, centerY);
+            view.setPressed(true);
+            view.postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    view.setPressed(false);
+                    view.setBackground(null);
+                }
+            }, RESET_HIGHLIGHT_DELAY_MS);
+        }
+
+        @Override
+        protected void onBindView(View view) {
+            super.onBindView(view);
+            mView = view;
+        }
+    };
 }
diff --git a/src/com/android/settings/ResetNetwork.java b/src/com/android/settings/ResetNetwork.java
index 7767604..990f485 100644
--- a/src/com/android/settings/ResetNetwork.java
+++ b/src/com/android/settings/ResetNetwork.java
@@ -100,7 +100,7 @@
 
     private void showFinalConfirmation() {
         Bundle args = new Bundle();
-        if (mSubscriptions.size() > 0) {
+        if (mSubscriptions != null && mSubscriptions.size() > 0) {
             int selectedIndex = mSubscriptionSpinner.getSelectedItemPosition();
             SubscriptionInfo subscription = mSubscriptions.get(selectedIndex);
             args.putInt(PhoneConstants.SUBSCRIPTION_KEY, subscription.getSubscriptionId());
@@ -140,7 +140,7 @@
         mSubscriptionSpinner = (Spinner) mContentView.findViewById(R.id.reset_network_subscription);
 
         mSubscriptions = SubscriptionManager.from(getActivity()).getActiveSubscriptionInfoList();
-        if (mSubscriptions.size() > 0) {
+        if (mSubscriptions != null && mSubscriptions.size() > 0) {
             // Get the default subscription in the order of data, voice, sms, first up.
             int defaultSubscription = SubscriptionManager.getDefaultDataSubId();
             if (!SubscriptionManager.isUsableSubIdValue(defaultSubscription)) {
diff --git a/src/com/android/settings/applications/AppOpsSummary.java b/src/com/android/settings/applications/AppOpsSummary.java
index 3401c99..382caed 100644
--- a/src/com/android/settings/applications/AppOpsSummary.java
+++ b/src/com/android/settings/applications/AppOpsSummary.java
@@ -18,6 +18,7 @@
 
 import android.app.Fragment;
 import android.app.FragmentManager;
+import android.content.res.TypedArray;
 import android.os.Bundle;
 import android.preference.PreferenceFrameLayout;
 import android.support.v13.app.FragmentPagerAdapter;
@@ -103,7 +104,15 @@
         mViewPager.setAdapter(adapter);
         mViewPager.setOnPageChangeListener(adapter);
         PagerTabStrip tabs = (PagerTabStrip) rootView.findViewById(R.id.tabs);
-        tabs.setTabIndicatorColorResource(R.color.theme_accent);
+
+        // This should be set in the XML layout, but PagerTabStrip lives in
+        // support-v4 and doesn't have styleable attributes.
+        final TypedArray ta = tabs.getContext().obtainStyledAttributes(
+                new int[] { android.R.attr.colorAccent });
+        final int colorAccent = ta.getColor(0, 0);
+        ta.recycle();
+
+        tabs.setTabIndicatorColorResource(colorAccent);
 
         // We have to do this now because PreferenceFrameLayout looks at it
         // only when the view is added.
diff --git a/src/com/android/settings/applications/AppStorageSettings.java b/src/com/android/settings/applications/AppStorageSettings.java
index 72fa805..2f65a76 100644
--- a/src/com/android/settings/applications/AppStorageSettings.java
+++ b/src/com/android/settings/applications/AppStorageSettings.java
@@ -32,10 +32,8 @@
 import android.os.RemoteException;
 import android.text.format.Formatter;
 import android.util.Log;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
-import android.view.ViewGroup;
 import android.widget.Button;
 import android.widget.TextView;
 
@@ -43,8 +41,10 @@
 import com.android.settings.Utils;
 import com.android.settings.applications.ApplicationsState.AppEntry;
 import com.android.settings.applications.ApplicationsState.Callbacks;
+import com.android.settings.DropDownPreference;
 
-public class AppStorageSettings extends AppInfoWithHeader implements OnClickListener, Callbacks {
+public class AppStorageSettings extends AppInfoWithHeader
+        implements OnClickListener, Callbacks, DropDownPreference.Callback {
     private static final String TAG = AppStorageSettings.class.getSimpleName();
 
     //internal constants used in Handler
@@ -65,6 +65,10 @@
     private static final int DLG_CANNOT_CLEAR_DATA = DLG_BASE + 2;
     private static final int DLG_MOVE_FAILED = DLG_BASE + 3;
 
+    private static final String KEY_MOVE_PREFERENCE = "app_location_setting";
+    private static final String KEY_STORAGE_SETTINGS = "storage_settings";
+    private static final String KEY_CACHE_SETTINGS = "cache_settings";
+
     private CanBeOnSdCardChecker mCanBeOnSdCardChecker;
     private TextView mTotalSize;
     private TextView mAppSize;
@@ -76,7 +80,8 @@
     private TextView mCacheSize;
     private Button mClearDataButton;
     private Button mClearCacheButton;
-    private Button mMoveAppButton;
+
+    private DropDownPreference mMoveDropDown;
     private boolean mMoveInProgress = false;
 
     private boolean mCanClearData = true;
@@ -102,40 +107,38 @@
         super.onCreate(savedInstanceState);
 
         mCanBeOnSdCardChecker = new CanBeOnSdCardChecker();
+        addPreferencesFromResource(R.xml.app_storage_settings);
+        setupViews();
     }
 
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        final View view = inflater.inflate(R.layout.storage_settings, container, false);
-
-        final ViewGroup allDetails = (ViewGroup)view.findViewById(R.id.all_details);
-        Utils.forceCustomPadding(allDetails, true /* additive padding */);
+    private void setupViews() {
         mComputingStr = getActivity().getText(R.string.computing_size);
         mInvalidSizeStr = getActivity().getText(R.string.invalid_size_value);
+        LayoutPreference view = (LayoutPreference) findPreference(KEY_STORAGE_SETTINGS);
 
         // Set default values on sizes
-        mTotalSize = (TextView)view.findViewById(R.id.total_size_text);
-        mAppSize = (TextView)view.findViewById(R.id.application_size_text);
-        mDataSize = (TextView)view.findViewById(R.id.data_size_text);
-        mExternalCodeSize = (TextView)view.findViewById(R.id.external_code_size_text);
-        mExternalDataSize = (TextView)view.findViewById(R.id.external_data_size_text);
+        mTotalSize = (TextView) view.findViewById(R.id.total_size_text);
+        mAppSize = (TextView) view.findViewById(R.id.application_size_text);
+        mDataSize = (TextView) view.findViewById(R.id.data_size_text);
+        mExternalCodeSize = (TextView) view.findViewById(R.id.external_code_size_text);
+        mExternalDataSize = (TextView) view.findViewById(R.id.external_data_size_text);
 
         if (Environment.isExternalStorageEmulated()) {
-            ((View)mExternalCodeSize.getParent()).setVisibility(View.GONE);
-            ((View)mExternalDataSize.getParent()).setVisibility(View.GONE);
+            ((View) mExternalCodeSize.getParent()).setVisibility(View.GONE);
+            ((View) mExternalDataSize.getParent()).setVisibility(View.GONE);
         }
+        mClearDataButton = (Button) view.findViewById(R.id.clear_data_button)
+                .findViewById(R.id.button);
 
-        // Initialize clear data and move install location buttons
-        View data_buttons_panel = view.findViewById(R.id.data_buttons_panel);
-        mMoveAppButton = (Button) data_buttons_panel.findViewById(R.id.left_button);
+        mMoveDropDown = (DropDownPreference) findPreference(KEY_MOVE_PREFERENCE);
+        mMoveDropDown.setCallback(this);
 
+        view = (LayoutPreference) findPreference(KEY_CACHE_SETTINGS);
         // Cache section
-        mCacheSize = (TextView)view.findViewById(R.id.cache_size_text);
-        mClearCacheButton = (Button)view.findViewById(R.id.clear_cache_button);
-        mClearDataButton = (Button) data_buttons_panel.findViewById(R.id.right_button);
-
-        return view;
+        mCacheSize = (TextView) view.findViewById(R.id.cache_size_text);
+        mClearCacheButton = (Button) view.findViewById(R.id.clear_cache_button)
+                .findViewById(R.id.button);
+        mClearCacheButton.setText(R.string.clear_cache_btn_text);
     }
 
     @Override
@@ -157,16 +160,24 @@
             } else {
                 showDialogInner(DLG_CLEAR_DATA, 0);
             }
-        } else if (v == mMoveAppButton) {
+        }
+    }
+
+    @Override
+    public boolean onItemSelected(int pos, Object value) {
+        boolean selectedExternal = (Boolean) value;
+        boolean isExternal = (mAppEntry.info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
+        if (selectedExternal ^ isExternal) {
             if (mPackageMoveObserver == null) {
                 mPackageMoveObserver = new PackageMoveObserver();
             }
-            int moveFlags = (mAppEntry.info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0 ?
-                    PackageManager.MOVE_INTERNAL : PackageManager.MOVE_EXTERNAL_MEDIA;
+            int moveFlags = selectedExternal ? PackageManager.MOVE_EXTERNAL_MEDIA
+                    : PackageManager.MOVE_INTERNAL;
             mMoveInProgress = true;
             refreshButtons();
             mPm.movePackage(mAppEntry.info.packageName, mPackageMoveObserver, moveFlags);
         }
+        return true;
     }
 
     private String getSizeStr(long size) {
@@ -248,16 +259,26 @@
         retrieveAppEntry();
         refreshButtons();
         refreshSizeInfo();
+        boolean isExternal = (mAppEntry.info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
+        mMoveDropDown.setSelectedItem(isExternal ? 1 : 0);
         return true;
     }
 
     private void refreshButtons() {
         if (!mMoveInProgress) {
-            initMoveButton();
+            initMoveDropDown();
             initDataButtons();
         } else {
-            mMoveAppButton.setText(R.string.moving);
-            mMoveAppButton.setEnabled(false);
+            mMoveDropDown.setSummary(R.string.moving);
+            mMoveDropDown.setSelectable(false);
+        }
+    }
+
+    private void updateMoveEnabled(boolean enabled) {
+        mMoveDropDown.clearItems();
+        mMoveDropDown.addItem(R.string.storage_type_internal, false);
+        if (enabled) {
+            mMoveDropDown.addItem(R.string.storage_type_external, true);
         }
     }
 
@@ -287,30 +308,22 @@
         }
     }
 
-    private void initMoveButton() {
+    private void initMoveDropDown() {
         if (Environment.isExternalStorageEmulated()) {
-            mMoveAppButton.setVisibility(View.INVISIBLE);
+            updateMoveEnabled(false);
             return;
         }
         boolean dataOnly = (mPackageInfo == null) && (mAppEntry != null);
         boolean moveDisable = true;
-        if (dataOnly) {
-            mMoveAppButton.setText(R.string.move_app);
-        } else if ((mAppEntry.info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) {
-            mMoveAppButton.setText(R.string.move_app_to_internal);
+        if ((mAppEntry.info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) {
             // Always let apps move to internal storage from sdcard.
             moveDisable = false;
         } else {
-            mMoveAppButton.setText(R.string.move_app_to_sdcard);
             mCanBeOnSdCardChecker.init();
             moveDisable = !mCanBeOnSdCardChecker.check(mAppEntry.info);
         }
-        if (moveDisable || mAppControlRestricted) {
-            mMoveAppButton.setEnabled(false);
-        } else {
-            mMoveAppButton.setOnClickListener(this);
-            mMoveAppButton.setEnabled(true);
-        }
+        updateMoveEnabled(!moveDisable);
+        mMoveDropDown.setSelectable(!mAppControlRestricted);
     }
 
     /*
@@ -360,7 +373,7 @@
         int result = msg.arg1;
         String packageName = mAppEntry.info.packageName;
         mClearDataButton.setText(R.string.clear_user_data_text);
-        if(result == OP_SUCCESSFUL) {
+        if (result == OP_SUCCESSFUL) {
             Log.i(TAG, "Cleared user data for package : "+packageName);
             mState.requestSize(mPackageName, mUserId);
         } else {
@@ -485,7 +498,7 @@
     class ClearUserDataObserver extends IPackageDataObserver.Stub {
        public void onRemoveCompleted(final String packageName, final boolean succeeded) {
            final Message msg = mHandler.obtainMessage(MSG_CLEAR_USER_DATA);
-           msg.arg1 = succeeded?OP_SUCCESSFUL:OP_FAILED;
+           msg.arg1 = succeeded ? OP_SUCCESSFUL : OP_FAILED;
            mHandler.sendMessage(msg);
         }
     }
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index 7f20b32..85b3523 100755
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -85,6 +85,7 @@
 
     // Menu identifiers
     public static final int UNINSTALL_ALL_USERS_MENU = 1;
+    public static final int UNINSTALL_UPDATES = 2;
 
     // Result code identifiers
     public static final int REQUEST_UNINSTALL = 0;
@@ -108,10 +109,8 @@
 
     private boolean mInitialized;
     private boolean mShowUninstalled;
-    private HeaderPreference mHeader;
+    private LayoutPreference mHeader;
     private Button mUninstallButton;
-    private View mMoreControlButtons;
-    private Button mSpecialDisableButton;
     private boolean mUpdatedSysApp = false;
     private TextView mAppVersion;
     private Button mForceStopButton;
@@ -149,34 +148,18 @@
     }
 
     private void initUninstallButtons() {
-        mUpdatedSysApp = (mAppEntry.info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
         final boolean isBundled = (mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
         boolean enabled = true;
-        if (mUpdatedSysApp) {
-            mUninstallButton.setText(R.string.app_factory_reset);
-            boolean showSpecialDisable = false;
-            if (isBundled) {
-                showSpecialDisable = handleDisableable(mSpecialDisableButton);
-                mSpecialDisableButton.setOnClickListener(this);
-            }
-            if (mAppControlRestricted) {
-                showSpecialDisable = false;
-            }
-            mMoreControlButtons.setVisibility(showSpecialDisable ? View.VISIBLE : View.GONE);
+        if (isBundled) {
+            enabled = handleDisableable(mUninstallButton);
         } else {
-            mMoreControlButtons.setVisibility(View.GONE);
-            if (isBundled) {
-                enabled = handleDisableable(mUninstallButton);
-            } else if ((mPackageInfo.applicationInfo.flags
-                    & ApplicationInfo.FLAG_INSTALLED) == 0
+            if ((mPackageInfo.applicationInfo.flags & ApplicationInfo.FLAG_INSTALLED) == 0
                     && mUserManager.getUsers().size() >= 2) {
                 // When we have multiple users, there is a separate menu
                 // to uninstall for all users.
-                mUninstallButton.setText(R.string.uninstall_text);
                 enabled = false;
-            } else {
-                mUninstallButton.setText(R.string.uninstall_text);
             }
+            mUninstallButton.setText(R.string.uninstall_text);
         }
         // If this is a device admin, it can't be uninstalled or disabled.
         // We do this here so the text of the button is still set correctly.
@@ -276,7 +259,7 @@
     }
 
     private void handleHeader() {
-        mHeader = (HeaderPreference) findPreference(KEY_HEADER);
+        mHeader = (LayoutPreference) findPreference(KEY_HEADER);
 
         // Get Control button panel
         View btnPanel = mHeader.findViewById(R.id.control_buttons_panel);
@@ -284,16 +267,12 @@
         mForceStopButton.setText(R.string.force_stop);
         mUninstallButton = (Button) btnPanel.findViewById(R.id.left_button);
         mForceStopButton.setEnabled(false);
-
-        // Get More Control button panel
-        mMoreControlButtons = mHeader.findViewById(R.id.more_control_buttons_panel);
-        mMoreControlButtons.findViewById(R.id.right_button).setVisibility(View.INVISIBLE);
-        mSpecialDisableButton = (Button) mMoreControlButtons.findViewById(R.id.left_button);
-        mMoreControlButtons.setVisibility(View.GONE);
     }
 
     @Override
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        menu.add(0, UNINSTALL_UPDATES, 0, R.string.app_factory_reset)
+                .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
         menu.add(0, UNINSTALL_ALL_USERS_MENU, 1, R.string.uninstall_all_users_text)
                 .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
     }
@@ -315,14 +294,19 @@
             showIt = false;
         }
         menu.findItem(UNINSTALL_ALL_USERS_MENU).setVisible(showIt);
+        mUpdatedSysApp = (mAppEntry.info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
+        menu.findItem(UNINSTALL_UPDATES).setVisible(mUpdatedSysApp && !mAppControlRestricted);
     }
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
-        int menuId = item.getItemId();
-        if (menuId == UNINSTALL_ALL_USERS_MENU) {
-            uninstallPkg(mAppEntry.info.packageName, true, false);
-            return true;
+        switch (item.getItemId()) {
+            case UNINSTALL_ALL_USERS_MENU:
+                uninstallPkg(mAppEntry.info.packageName, true, false);
+                return true;
+            case UNINSTALL_UPDATES:
+                showDialogInner(DLG_FACTORY_RESET, 0);
+                return true;
         }
         return false;
     }
@@ -604,25 +588,23 @@
     public void onClick(View v) {
         String packageName = mAppEntry.info.packageName;
         if(v == mUninstallButton) {
-            if (mUpdatedSysApp) {
-                showDialogInner(DLG_FACTORY_RESET, 0);
-            } else {
-                if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
-                    if (mAppEntry.info.enabled) {
-                        showDialogInner(DLG_DISABLE, 0);
+            if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+                if (mAppEntry.info.enabled) {
+                    if (mUpdatedSysApp) {
+                        showDialogInner(DLG_SPECIAL_DISABLE, 0);
                     } else {
-                        new DisableChanger(this, mAppEntry.info,
-                                PackageManager.COMPONENT_ENABLED_STATE_DEFAULT)
-                        .execute((Object)null);
+                        showDialogInner(DLG_DISABLE, 0);
                     }
-                } else if ((mAppEntry.info.flags & ApplicationInfo.FLAG_INSTALLED) == 0) {
-                    uninstallPkg(packageName, true, false);
                 } else {
-                    uninstallPkg(packageName, false, false);
+                    new DisableChanger(this, mAppEntry.info,
+                            PackageManager.COMPONENT_ENABLED_STATE_DEFAULT)
+                                    .execute((Object) null);
                 }
+            } else if ((mAppEntry.info.flags & ApplicationInfo.FLAG_INSTALLED) == 0) {
+                uninstallPkg(packageName, true, false);
+            } else {
+                uninstallPkg(packageName, false, false);
             }
-        } else if(v == mSpecialDisableButton) {
-            showDialogInner(DLG_SPECIAL_DISABLE, 0);
         } else if (v == mForceStopButton) {
             showDialogInner(DLG_FORCE_STOP, 0);
             //forceStopPackage(mAppInfo.packageName);
diff --git a/src/com/android/settings/applications/HeaderPreference.java b/src/com/android/settings/applications/LayoutPreference.java
similarity index 89%
rename from src/com/android/settings/applications/HeaderPreference.java
rename to src/com/android/settings/applications/LayoutPreference.java
index a3d4bde..c74ad16 100644
--- a/src/com/android/settings/applications/HeaderPreference.java
+++ b/src/com/android/settings/applications/LayoutPreference.java
@@ -27,18 +27,18 @@
 import com.android.settings.R;
 import com.android.settings.Utils;
 
-public class HeaderPreference extends Preference {
+public class LayoutPreference extends Preference {
 
     private View mRootView;
 
-    public HeaderPreference(Context context, AttributeSet attrs) {
+    public LayoutPreference(Context context, AttributeSet attrs) {
         super(context, attrs);
         final TypedArray a = context.obtainStyledAttributes(
                 attrs, com.android.internal.R.styleable.Preference, 0, 0);
         int layoutResource = a.getResourceId(com.android.internal.R.styleable.Preference_layout,
                 0);
         if (layoutResource == 0) {
-            throw new IllegalArgumentException("HeaderPreference requires a layout to be defined");
+            throw new IllegalArgumentException("LayoutPreference requires a layout to be defined");
         }
         // Need to create view now so that findViewById can be called immediately.
         final View view = LayoutInflater.from(getContext())
@@ -47,6 +47,7 @@
         final ViewGroup allDetails = (ViewGroup) view.findViewById(R.id.all_details);
         Utils.forceCustomPadding(allDetails, true /* additive padding */);
         mRootView = view;
+        setShouldDisableView(false);
     }
 
     @Override
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
index f40bfdc..555d18c 100644
--- a/src/com/android/settings/applications/ManageApplications.java
+++ b/src/com/android/settings/applications/ManageApplications.java
@@ -34,6 +34,7 @@
 import android.content.pm.IPackageManager;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.res.TypedArray;
 import android.net.NetworkPolicyManager;
 import android.net.Uri;
 import android.os.AsyncTask;
@@ -924,7 +925,15 @@
         mViewPager.setAdapter(adapter);
         mViewPager.setOnPageChangeListener(adapter);
         PagerTabStrip tabs = (PagerTabStrip) rootView.findViewById(R.id.tabs);
-        tabs.setTabIndicatorColorResource(R.color.theme_accent);
+
+        // This should be set in the XML layout, but PagerTabStrip lives in
+        // support-v4 and doesn't have styleable attributes.
+        final TypedArray ta = tabs.getContext().obtainStyledAttributes(
+                new int[] { android.R.attr.colorAccent });
+        final int colorAccent = ta.getColor(0, 0);
+        ta.recycle();
+
+        tabs.setTabIndicatorColorResource(colorAccent);
 
         // We have to do this now because PreferenceFrameLayout looks at it
         // only when the view is added.
diff --git a/src/com/android/settings/applications/ProcessStatsUi.java b/src/com/android/settings/applications/ProcessStatsUi.java
index 14e0b90..bf1f666 100644
--- a/src/com/android/settings/applications/ProcessStatsUi.java
+++ b/src/com/android/settings/applications/ProcessStatsUi.java
@@ -474,10 +474,10 @@
                 memStates = ProcessStats.ALL_MEM_ADJ;
                 break;
         }
-        Resources res = getResources();
-        colors.setColors(res.getColor(R.color.running_processes_apps_ram),
-                res.getColor(R.color.running_processes_apps_ram),
-                res.getColor(R.color.running_processes_free_ram));
+        final Context context = getActivity();
+        colors.setColors(context.getColor(R.color.running_processes_apps_ram),
+                context.getColor(R.color.running_processes_apps_ram),
+                context.getColor(R.color.running_processes_free_ram));
 
         // Compute memory badness for chart color.
         /*
diff --git a/src/com/android/settings/applications/RunningProcessesView.java b/src/com/android/settings/applications/RunningProcessesView.java
index 13d9655..b71262e 100644
--- a/src/com/android/settings/applications/RunningProcessesView.java
+++ b/src/com/android/settings/applications/RunningProcessesView.java
@@ -449,10 +449,10 @@
         mHeader = inflater.inflate(R.layout.running_processes_header, null);
         mListView.addHeaderView(mHeader, null, false /* set as not selectable */);
         mColorBar = (LinearColorBar)mHeader.findViewById(R.id.color_bar);
-        Resources res = getResources();
-        mColorBar.setColors(res.getColor(R.color.running_processes_system_ram),
-                res.getColor(R.color.running_processes_apps_ram),
-                res.getColor(R.color.running_processes_free_ram));
+        final Context context = getContext();
+        mColorBar.setColors(context.getColor(R.color.running_processes_system_ram),
+                context.getColor(R.color.running_processes_apps_ram),
+                context.getColor(R.color.running_processes_free_ram));
         mBackgroundProcessPrefix = (TextView)mHeader.findViewById(R.id.freeSizePrefix);
         mAppsProcessPrefix = (TextView)mHeader.findViewById(R.id.appsSizePrefix);
         mForegroundProcessPrefix = (TextView)mHeader.findViewById(R.id.systemSizePrefix);
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingRequest.java b/src/com/android/settings/bluetooth/BluetoothPairingRequest.java
index 44198d3..5b06661 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingRequest.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingRequest.java
@@ -91,7 +91,7 @@
                         .setContentIntent(pending)
                         .setAutoCancel(true)
                         .setDefaults(Notification.DEFAULT_SOUND)
-                        .setColor(res.getColor(
+                        .setColor(context.getColor(
                                 com.android.internal.R.color.system_notification_accent_color));
 
                 NotificationManager manager = (NotificationManager)
diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
index e436b79..b3a9571 100644
--- a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
+++ b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
@@ -157,7 +157,7 @@
                         .setContentIntent(PendingIntent.getActivity(context, 0,
                                 connectionAccessIntent, 0))
                         .setDeleteIntent(PendingIntent.getBroadcast(context, 0, deleteIntent, 0))
-                        .setColor(context.getResources().getColor(
+                        .setColor(context.getColor(
                                 com.android.internal.R.color.system_notification_accent_color))
                         .build();
 
diff --git a/src/com/android/settings/deviceinfo/StorageItemPreference.java b/src/com/android/settings/deviceinfo/StorageItemPreference.java
index e4f3ff9..87e827e 100644
--- a/src/com/android/settings/deviceinfo/StorageItemPreference.java
+++ b/src/com/android/settings/deviceinfo/StorageItemPreference.java
@@ -39,7 +39,7 @@
         super(context);
 
         if (colorRes != 0) {
-            this.color = context.getResources().getColor(colorRes);
+            this.color = context.getColor(colorRes);
 
             final Resources res = context.getResources();
             final int width = res.getDimensionPixelSize(R.dimen.device_memory_usage_button_width);
diff --git a/src/com/android/settings/notification/NotificationSettings.java b/src/com/android/settings/notification/NotificationSettings.java
index 41ae0ab..123f0ef 100644
--- a/src/com/android/settings/notification/NotificationSettings.java
+++ b/src/com/android/settings/notification/NotificationSettings.java
@@ -49,6 +49,7 @@
 import android.util.Log;
 
 import com.android.internal.widget.LockPatternUtils;
+import com.android.settings.DropDownPreference;
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.Utils;
diff --git a/src/com/android/settings/notification/SettingPref.java b/src/com/android/settings/notification/SettingPref.java
index a06c35a..a20d1b4 100644
--- a/src/com/android/settings/notification/SettingPref.java
+++ b/src/com/android/settings/notification/SettingPref.java
@@ -26,6 +26,7 @@
 import android.provider.Settings.Global;
 import android.provider.Settings.System;
 
+import com.android.settings.DropDownPreference;
 import com.android.settings.SettingsPreferenceFragment;
 
 /** Helper to manage a two-state or dropdown preference bound to a global or system setting. */
diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java
index 556296c..441990b 100644
--- a/src/com/android/settings/notification/ZenModeSettings.java
+++ b/src/com/android/settings/notification/ZenModeSettings.java
@@ -50,6 +50,7 @@
 import android.widget.ScrollView;
 import android.widget.TimePicker;
 
+import com.android.settings.DropDownPreference;
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.search.BaseSearchIndexProvider;
diff --git a/src/com/android/settings/sim/SimBootReceiver.java b/src/com/android/settings/sim/SimBootReceiver.java
index 58e3721..2fe833b 100644
--- a/src/com/android/settings/sim/SimBootReceiver.java
+++ b/src/com/android/settings/sim/SimBootReceiver.java
@@ -136,7 +136,7 @@
         NotificationCompat.Builder builder =
                 new NotificationCompat.Builder(context)
                 .setSmallIcon(R.drawable.ic_sim_card_alert_white_48dp)
-                .setColor(resources.getColor(R.color.sim_noitification))
+                .setColor(context.getColor(R.color.sim_noitification))
                 .setContentTitle(resources.getString(R.string.sim_notification_title))
                 .setContentText(resources.getString(R.string.sim_notification_summary));
         Intent resultIntent = new Intent(context, SimSettingsActivity.class);
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index a4ecf0e..5c66309 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -447,7 +447,7 @@
             case MENU_ID_CONNECT: {
                 if (mSelectedAccessPoint.isSaved()) {
                     connect(mSelectedAccessPoint.getConfig());
-                } else if (mSelectedAccessPoint.getSecurity() != AccessPoint.SECURITY_NONE) {
+                } else if (mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_NONE) {
                     /** Bypass dialog for unsecured networks */
                     mSelectedAccessPoint.generateOpenNetworkConfig();
                     connect(mSelectedAccessPoint.getConfig());