Fix action bar theme inheritance and icons, make colors public

Theme.Quantum.Light.DarkActionBar is still broken, but fix incoming.

BUG: 14084633
BUG: 14083272
Change-Id: Id5f2f9ce5b0af741fc79d1fb325cfee74c7a1e37
diff --git a/api/current.txt b/api/current.txt
index 2274ea0..6003211 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -382,6 +382,7 @@
     field public static final int codes = 16843330; // 0x1010242
     field public static final int collapseColumns = 16843083; // 0x101014b
     field public static final int color = 16843173; // 0x10101a5
+    field public static final int colorAccent = 16843842; // 0x1010442
     field public static final int colorActivatedHighlight = 16843664; // 0x1010390
     field public static final int colorBackground = 16842801; // 0x1010031
     field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
@@ -397,6 +398,9 @@
     field public static final int colorLongPressedHighlight = 16843662; // 0x101038e
     field public static final int colorMultiSelectHighlight = 16843665; // 0x1010391
     field public static final int colorPressedHighlight = 16843661; // 0x101038d
+    field public static final int colorPrimary = 16843840; // 0x1010440
+    field public static final int colorPrimaryDark = 16843841; // 0x1010441
+    field public static final int colorPrimaryLight = 16843839; // 0x101043f
     field public static final int columnCount = 16843639; // 0x1010377
     field public static final int columnDelay = 16843215; // 0x10101cf
     field public static final int columnOrderPreserved = 16843640; // 0x1010378
diff --git a/core/res/res/layout/action_bar_home_quantum.xml b/core/res/res/layout/action_bar_home_quantum.xml
index 3968429..9213458 100644
--- a/core/res/res/layout/action_bar_home_quantum.xml
+++ b/core/res/res/layout/action_bar_home_quantum.xml
@@ -25,9 +25,13 @@
         android:visibility="gone"
         android:layout_width="48dp"
         android:layout_height="48dp"
-        android:scaleType="center" />
+        android:scaleType="centerInside" />
     <ImageView android:id="@android:id/home"
-        android:layout_width="48dp"
-        android:layout_height="48dp"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="8dip"
+        android:layout_marginTop="@android:dimen/action_bar_icon_vertical_padding"
+        android:layout_marginBottom="@android:dimen/action_bar_icon_vertical_padding"
+        android:adjustViewBounds="true"
         android:scaleType="fitCenter" />
 </view>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index d3bee28..a2ea8bb 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2149,6 +2149,10 @@
   <public type="attr" name="slideEdge" />
   <public type="attr" name="actionBarTheme" />
   <public type="attr" name="textAppearanceListItemSecondary" />
+  <public type="attr" name="colorPrimaryLight" />
+  <public type="attr" name="colorPrimary" />
+  <public type="attr" name="colorPrimaryDark" />
+  <public type="attr" name="colorAccent" />
 
   <public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
 
diff --git a/core/res/res/values/styles_quantum.xml b/core/res/res/values/styles_quantum.xml
index 595dc79..e42703e 100644
--- a/core/res/res/values/styles_quantum.xml
+++ b/core/res/res/values/styles_quantum.xml
@@ -761,7 +761,7 @@
         <item name="background">@null</item>
         <item name="backgroundStacked">@null</item>
         <item name="backgroundSplit">@null</item>
-        <item name="displayOptions">showHome|showTitle</item>
+        <item name="displayOptions">useLogo|showHome|showTitle</item>
         <item name="divider">?attr/dividerVertical</item>
         <item name="titleTextStyle">@style/TextAppearance.Quantum.Widget.ActionBar.Title</item>
         <item name="subtitleTextStyle">@style/TextAppearance.Quantum.Widget.ActionBar.Subtitle</item>
diff --git a/core/res/res/values/themes_quantum.xml b/core/res/res/values/themes_quantum.xml
index 58d95be..3ee7217 100644
--- a/core/res/res/values/themes_quantum.xml
+++ b/core/res/res/values/themes_quantum.xml
@@ -303,7 +303,7 @@
         <item name="actionBarSize">@dimen/action_bar_default_height_quantum</item>
         <item name="actionModePopupWindowStyle">@style/Widget.Quantum.PopupWindow.ActionMode</item>
         <item name="actionBarWidgetTheme">@null</item>
-        <item name="actionBarTheme">@style/Theme.Quantum.ActionBar</item>
+        <item name="actionBarTheme">@style/ThemeOverlay.Quantum.ActionBarWidget</item>
         <item name="actionBarItemBackground">@drawable/item_background_quantum</item>
 
         <item name="actionModeCutDrawable">@drawable/ic_menu_cut_quantum</item>
@@ -648,7 +648,7 @@
         <item name="actionBarSize">@dimen/action_bar_default_height_quantum</item>
         <item name="actionModePopupWindowStyle">@style/Widget.Quantum.Light.PopupWindow.ActionMode</item>
         <item name="actionBarWidgetTheme">@null</item>
-        <item name="actionBarTheme">@style/Theme.Quantum.Light.ActionBar</item>
+        <item name="actionBarTheme">@style/ThemeOverlay.Quantum.Light.ActionBarWidget</item>
         <item name="actionBarItemBackground">@drawable/item_background_quantum</item>
 
         <item name="actionModeCutDrawable">@drawable/ic_menu_cut_quantum</item>
@@ -722,11 +722,21 @@
         <item name="colorButtonPressedColored">?attr/colorPrimaryDark</item>
     </style>
 
-    <style name="Theme.Quantum.ActionBar">
+    <style name="ThemeOverlay" />
+    <style name="ThemeOverlay.Quantum" />
+    <style name="ThemeOverlay.Quantum.Light" />
+
+    <!-- Variant of the quantum theme that replaces the activated control color
+         (which by default is identical to the action bar background color) with
+         the normal control color . -->
+    <style name="ThemeOverlay.Quantum.ActionBarWidget">
         <item name="colorControlActivated">?attr/colorControlNormal</item>
     </style>
 
-    <style name="Theme.Quantum.Light.ActionBar">
+    <!-- Variant of the quantum (light) theme that replaces the activated control
+         color (which by default is identical to the action bar background color)
+         with the normal control color . -->
+    <style name="ThemeOverlay.Quantum.Light.ActionBarWidget">
         <item name="colorControlActivated">?attr/colorControlNormal</item>
     </style>
 
@@ -734,8 +744,7 @@
          with an inverse color profile. The dark action bar sharply stands out against
          the light content. -->
     <style name="Theme.Quantum.Light.DarkActionBar">
-        <item name="actionBarWidgetTheme">@null</item>
-        <item name="actionBarTheme">@style/Theme.Quantum.ActionBar</item>
+        <!-- TODO -->
     </style>
 
     <!-- Variant of the quantum (dark) theme with no action bar. -->