Merge "Make ContactPreferences use SharedPreferences instead of System settings (3/5)" into lmp-dev
diff --git a/res-common/drawable/action_bar_tab.xml b/res-common/drawable/action_bar_tab.xml
deleted file mode 100644
index 20b509e..0000000
--- a/res-common/drawable/action_bar_tab.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2013 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
-    android:tint="@color/tab_pressed_color">
-    <item>
-        <ripple android:color="@color/tab_pressed_color">
-            <item android:drawable="@color/tab_default_color" />
-        </ripple>
-    </item>
-    <item>
-        <selector>
-            <item android:drawable="@drawable/tab_selected"
-                    android:state_focused="false"
-                    android:state_pressed="false"
-                    android:state_selected="true" />
-            <item android:drawable="@drawable/tab_selected_focused"
-                    android:state_focused="true"
-                    android:state_pressed="false"
-                    android:state_selected="true" />
-            <item android:drawable="@drawable/tab_unselected_focused"
-                    android:state_focused="true"
-                    android:state_pressed="false"
-                    android:state_selected="false" />
-            <item android:drawable="@drawable/tab_selected"
-                    android:state_selected="true" />
-        </selector>
-    </item>
-</layer-list>
\ No newline at end of file
diff --git a/res-common/drawable/tab_selected.xml b/res-common/drawable/tab_selected.xml
deleted file mode 100644
index 16c791e..0000000
--- a/res-common/drawable/tab_selected.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2013 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-    <!-- Use a rectangle to draw a bottom aligned line. The other three sides
-         of the rectangle are off the side of the screen -->
-    <item
-        android:top="@dimen/tab_selected_underline_height_negative"
-        android:right="@dimen/tab_selected_underline_height_negative"
-        android:left="@dimen/tab_selected_underline_height_negative">
-        <shape android:shape="rectangle">
-            <stroke android:width="@dimen/tab_selected_underline_height"
-                android:color="@color/tab_selected_color"/>
-        </shape>
-    </item>
-</layer-list>
\ No newline at end of file
diff --git a/res-common/drawable/tab_selected_focused.xml b/res-common/drawable/tab_selected_focused.xml
deleted file mode 100644
index b21b0a4..0000000
--- a/res-common/drawable/tab_selected_focused.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2013 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
-    <!-- Tab selected underline -->
-    <item android:drawable="@drawable/tab_selected" />
-    <!-- Focus rectangle -->
-    <item android:drawable="@drawable/tab_unselected_focused" />
-</layer-list>
\ No newline at end of file
diff --git a/res-common/drawable/tab_unselected_focused.xml b/res-common/drawable/tab_unselected_focused.xml
deleted file mode 100644
index aef4da8..0000000
--- a/res-common/drawable/tab_unselected_focused.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2013 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle" >
-    <stroke
-        android:width="4dp"
-        android:color="@color/focus_color" />
-</shape>
\ No newline at end of file
diff --git a/res-common/values/colors.xml b/res-common/values/colors.xml
index ec9cc87..8700256 100644
--- a/res-common/values/colors.xml
+++ b/res-common/values/colors.xml
@@ -55,30 +55,61 @@
     <color name="textColorIconOverlay">#fff</color>
     <color name="textColorIconOverlayShadow">#000</color>
 
-    <!-- Make sure to also update LetterTileProvider#NUM_OF_TILE_COLORS when adding or removing
-    colors -->
+    <!-- Background colors for LetterTileDrawables. This set of colors is a subset of
+        https://spec.googleplex.com/quantumpalette#extended which passes Google Accessibility
+        Requirements for the color in question on white with >= 3.0 contrast. We used
+        http://leaverou.github.io/contrast-ratio/#white-on-%23db4437 to double-check the contrast.
+
+        These colors are also used by MaterialColorMapUtils to generate primary activity colors.
+    -->
     <array name="letter_tile_colors">
-        <item>#f2b31b</item>
-        <item>#f8971c</item>
-        <item>#f0592b</item>
-        <item>#db4436</item>
-        <item>#d5197e</item>
-        <item>#8f3e97</item>
-        <item>#65499d</item>
-        <item>#547dbe</item>
-        <item>#38a4dc</item>
-        <item>#0b9c57</item>
-        <item>#8bc248</item>
-        <item>#666666</item>
+        <item>#DB4437</item>
+        <item>#E91E63</item>
+        <item>#9C27B0</item>
+        <item>#673AB7</item>
+        <item>#3F51B5</item>
+        <item>#4285F4</item>
+        <item>#039BE5</item>
+        <item>#0097A7</item>
+        <item>#009688</item>
+        <item>#0F9D58</item>
+        <item>#689F38</item>
+        <item>#EF6C00</item>
+        <item>#FF5722</item>
+        <item>#757575</item>
     </array>
+
+    <!-- Darker versions of letter_tile_colors, two shades darker. These colors are used
+        for settings secondary activity colors. -->
+    <array name="letter_tile_colors_dark">
+        <item>#C53929</item>
+        <item>#C2185B</item>
+        <item>#7B1FA2</item>
+        <item>#512DA8</item>
+        <item>#303F9F</item>
+        <item>#3367D6</item>
+        <item>#0277BD</item>
+        <item>#006064</item>
+        <item>#00796B</item>
+        <item>#0B8043</item>
+        <item>#33691E</item>
+        <item>#E65100</item>
+        <item>#E64A19</item>
+        <item>#424242</item>
+    </array>
+
+    <!-- The default color used for tinting photos when no color can be extracted via Palette,
+            this is Blue Grey 500 -->
+    <color name="quickcontact_default_photo_tint_color">#607D8B</color>
+    <!-- The default secondary color when no color can be extracted via Palette,
+            this is Blue Grey 700 -->
+    <color name="quickcontact_default_photo_tint_color_dark">#455A64</color>
+
+
     <color name="letter_tile_default_color">#cccccc</color>
 
     <color name="letter_tile_font_color">#ffffff</color>
 
-    <color name="tab_default_color">@color/actionbar_background_color</color>
-    <color name="tab_pressed_color">#0097a8</color>
-    <color name="tab_selected_color">#0097a8</color>
-
     <!-- Background color of action bars. Ensure this stays in sync with packages/Telephony
          actionbar_background_color. -->
     <color name="actionbar_background_color">#0fc6dc</color>
diff --git a/res-common/values/dimens.xml b/res-common/values/dimens.xml
index 4d81b81..2013e85 100644
--- a/res-common/values/dimens.xml
+++ b/res-common/values/dimens.xml
@@ -113,7 +113,6 @@
 
     <!-- Height of the selection indicator of a tab. -->
     <dimen name="tab_selected_underline_height">2dp</dimen>
-    <dimen name="tab_selected_underline_height_negative">-2dp</dimen>
     <!-- Size of text in tabs. -->
     <dimen name="tab_text_size">14sp</dimen>