Revert "Workaround Button disabled state on v21-22"
This reverts commit d118156d0e0644203d4d082d7dca695e471c3722.
Change-Id: I6964cc4c3622e89121501fd845c220108ef49261
BUG: 24856872
diff --git a/v7/appcompat/api/current.txt b/v7/appcompat/api/current.txt
index 2df0ec0..2d53759 100644
--- a/v7/appcompat/api/current.txt
+++ b/v7/appcompat/api/current.txt
@@ -712,7 +712,6 @@
field public static int abc_btn_check_to_on_mtrl_000;
field public static int abc_btn_check_to_on_mtrl_015;
field public static int abc_btn_colored_material;
- field public static int abc_btn_default_material;
field public static int abc_btn_default_mtrl_shape;
field public static int abc_btn_radio_material;
field public static int abc_btn_radio_to_on_mtrl_000;
diff --git a/v7/appcompat/res/drawable-v21/abc_btn_default_material.xml b/v7/appcompat/res/drawable-v21/abc_btn_default_material.xml
deleted file mode 100644
index bd7d08d..0000000
--- a/v7/appcompat/res/drawable-v21/abc_btn_default_material.xml
+++ /dev/null
@@ -1,20 +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.
--->
-
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="?attr/colorControlHighlight">
- <item android:drawable="@drawable/abc_btn_default_mtrl_shape" />
-</ripple>
\ No newline at end of file
diff --git a/v7/appcompat/res/values-v21/styles_base.xml b/v7/appcompat/res/values-v21/styles_base.xml
index 4ec0ee12..bf21d77 100644
--- a/v7/appcompat/res/values-v21/styles_base.xml
+++ b/v7/appcompat/res/values-v21/styles_base.xml
@@ -178,15 +178,9 @@
<style name="Base.Widget.AppCompat.SeekBar" parent="android:Widget.Material.SeekBar" />
- <style name="Base.Widget.AppCompat.Button" parent="android:Widget.Material.Button">
- <!-- Use our background so that we use our internal tinting (for disabled) -->
- <item name="android:background">@drawable/abc_btn_default_material</item>
- </style>
+ <style name="Base.Widget.AppCompat.Button" parent="android:Widget.Material.Button" />
- <style name="Base.Widget.AppCompat.Button.Small" parent="android:Widget.Material.Button.Small">
- <!-- Use our background so that we use our internal tinting (for disabled) -->
- <item name="android:background">@drawable/abc_btn_default_material</item>
- </style>
+ <style name="Base.Widget.AppCompat.Button.Small" parent="android:Widget.Material.Button.Small" />
<style name="Base.Widget.AppCompat.Button.Borderless" parent="android:Widget.Material.Button.Borderless" />
diff --git a/v7/appcompat/res/values-v21/themes_base.xml b/v7/appcompat/res/values-v21/themes_base.xml
index 3d9f010..6a4ab87 100644
--- a/v7/appcompat/res/values-v21/themes_base.xml
+++ b/v7/appcompat/res/values-v21/themes_base.xml
@@ -71,6 +71,8 @@
<item name="listChoiceBackgroundIndicator">?android:attr/listChoiceBackgroundIndicator</item>
<!-- Copy the platform default styles for the AppCompat widgets -->
+ <item name="buttonStyle">?android:attr/buttonStyle</item>
+ <item name="buttonStyleSmall">?android:attr/buttonStyleSmall</item>
<item name="checkboxStyle">?android:attr/checkboxStyle</item>
<item name="checkedTextViewStyle">?android:attr/checkedTextViewStyle</item>
<item name="radioButtonStyle">?android:attr/radioButtonStyle</item>
@@ -116,6 +118,8 @@
<item name="listChoiceBackgroundIndicator">?android:attr/listChoiceBackgroundIndicator</item>
<!-- Copy the platform default styles for the AppCompat widgets -->
+ <item name="buttonStyle">?android:attr/buttonStyle</item>
+ <item name="buttonStyleSmall">?android:attr/buttonStyleSmall</item>
<item name="checkboxStyle">?android:attr/checkboxStyle</item>
<item name="checkedTextViewStyle">?android:attr/checkedTextViewStyle</item>
<item name="radioButtonStyle">?android:attr/radioButtonStyle</item>
diff --git a/v7/appcompat/res/values-v23/styles_base.xml b/v7/appcompat/res/values-v23/styles_base.xml
index 75f2713..e1c8910 100644
--- a/v7/appcompat/res/values-v23/styles_base.xml
+++ b/v7/appcompat/res/values-v23/styles_base.xml
@@ -17,10 +17,6 @@
<resources>
- <style name="Base.Widget.AppCompat.Button" parent="android:Widget.Material.Button" />
-
- <style name="Base.Widget.AppCompat.Button.Small" parent="android:Widget.Material.Button.Small" />
-
<style name="Base.Widget.AppCompat.Button.Colored" parent="android:Widget.Material.Button.Colored" />
</resources>
diff --git a/v7/appcompat/res/values-v23/themes_base.xml b/v7/appcompat/res/values-v23/themes_base.xml
index 8f2e133..becb1f2 100644
--- a/v7/appcompat/res/values-v23/themes_base.xml
+++ b/v7/appcompat/res/values-v23/themes_base.xml
@@ -25,10 +25,6 @@
<item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
<item name="controlBackground">@drawable/abc_control_background_material</item>
-
- <!-- Copy the platform default styles for the AppCompat widgets -->
- <item name="buttonStyle">?android:attr/buttonStyle</item>
- <item name="buttonStyleSmall">?android:attr/buttonStyleSmall</item>
</style>
<style name="Base.V23.Theme.AppCompat.Light" parent="Base.V22.Theme.AppCompat.Light">
@@ -36,10 +32,6 @@
<item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
<item name="controlBackground">@drawable/abc_control_background_material</item>
-
- <!-- Copy the platform default styles for the AppCompat widgets -->
- <item name="buttonStyle">?android:attr/buttonStyle</item>
- <item name="buttonStyleSmall">?android:attr/buttonStyleSmall</item>
</style>
</resources>
diff --git a/v7/appcompat/src/android/support/v7/internal/widget/TintManager.java b/v7/appcompat/src/android/support/v7/internal/widget/TintManager.java
index a8fb7ac..bfaa570 100644
--- a/v7/appcompat/src/android/support/v7/internal/widget/TintManager.java
+++ b/v7/appcompat/src/android/support/v7/internal/widget/TintManager.java
@@ -305,8 +305,7 @@
} else if (resId == R.drawable.abc_switch_thumb_material) {
tint = createSwitchThumbColorStateList(context);
} else if (resId == R.drawable.abc_btn_default_mtrl_shape
- || resId == R.drawable.abc_btn_borderless_material
- || resId == R.drawable.abc_btn_default_material) {
+ || resId == R.drawable.abc_btn_borderless_material) {
tint = createDefaultButtonColorStateList(context);
} else if (resId == R.drawable.abc_btn_colored_material) {
tint = createColoredButtonColorStateList(context);