Make check icon in thumbnail tile vary against system accent color
Mock:
https://docs.google.com/presentation/d/15JadcGi5k1_0znUN_XdFpU7UxeXwxjK3Y7LxvhW5ETM/edit?ts=5eb5f9a8#slide=id.g777aaff414_1_0
Screenshot:
https://screenshot.googleplex.com/D8Oua3hJ5qg.png
https://screenshot.googleplex.com/b4sBUjrQwak.png
https://screenshot.googleplex.com/1NFNw5yGpMR.png
Test: Manually
Fixes: 158429764
Change-Id: Ic20576505bebd61c8cda3e2ccc54973dee62acf8
diff --git a/res/drawable/ic_check_circle_filled_24px.xml b/res/drawable/ic_check_circle_filled_24px.xml
deleted file mode 100644
index 01d2091..0000000
--- a/res/drawable/ic_check_circle_filled_24px.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path
- android:fillColor="@color/accent_color"
- android:pathData="M12,2C6.5,2 2,6.5 2,12s4.5,10 10,10s10,-4.5 10,-10S17.5,2 12,2zM10,17l-4,-4l1.4,-1.4l2.6,2.6l6.6,-6.6L18,9L10,17z"/>
- <path
- android:pathData="m8.0085,14.9866 l-1.9939,-1.994 0.6892,-0.6889 0.6892,-0.6889 1.2925,1.2926c0.7109,0.711 1.3035,1.2926 1.3169,1.2926 0.0134,0 1.5034,-1.4789 3.3111,-3.2865l3.2866,-3.2865 0.689,0.689 0.689,0.689 -3.9878,3.9878 -3.9878,3.9878z"
- android:strokeWidth="0.02439024"
- android:fillColor="@color/selected_check_color"/>
-</vector>
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index c6b2a3f..e022a6e 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -33,9 +33,6 @@
<color name="tip_dot_color">#81C995</color>
<color name="tip_dot_line_color">#000000</color>
- <color name="selected_check_color">#000000</color>
- <color name="selected_check_background_color">#81C995</color>
-
<color name="toolbar_icon_color">@color/text_color_light</color>
<color name="divider_color">@color/white_14_alpha</color>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 82d02b0..33ae4ea 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -50,9 +50,6 @@
<color name="tip_dot_color">#34A853</color>
<color name="tip_dot_line_color">#FFFFFF</color>
- <color name="selected_check_color">#FFFFFF</color>
- <color name="selected_check_background_color">#1E8E3E</color>
-
<color name="toolbar_icon_color">@color/text_color_dark</color>
<color name="divider_color">@color/black_14_alpha</color>
diff --git a/src/com/android/customization/widget/OptionSelectorController.java b/src/com/android/customization/widget/OptionSelectorController.java
index ef97385..a532e40 100644
--- a/src/com/android/customization/widget/OptionSelectorController.java
+++ b/src/com/android/customization/widget/OptionSelectorController.java
@@ -190,7 +190,8 @@
if (mShowCheckmark && option.equals(mAppliedOption)) {
Resources res = mContainer.getContext().getResources();
- Drawable checkmark = res.getDrawable(R.drawable.ic_check_circle_filled_24px);
+ Drawable checkmark = res.getDrawable(R.drawable.check_circle_accent_24dp,
+ mContainer.getContext().getTheme());
Drawable frame = holder.tileView.getForeground();
Drawable[] layers = {frame, checkmark};
if (frame == null) {