From 9c6668de11fb5e953e63c4770e5b035677be36ca Mon Sep 17 00:00:00 2001
From: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date: Wed, 11 Sep 2019 18:10:23 -0300
Subject: [PATCH] onclite: doze: Follow Android 10 changes on switchbar

Change-Id: Ifad28dc874233eb41d89580895b769ecbc3ea670
Signed-off-by: Dhina17 <dhinalogu@gmail.com>
---
 .../switchbar_switch_thumb_tint.xml           | 20 ++++++++++++++++++
 .../switchbar_switch_track_tint.xml           | 21 +++++++++++++++++++
 doze/res/color/switch_bar_bg.xml              |  2 +-
 doze/res/layout/switch_bar.xml                |  6 +++---
 4 files changed, 45 insertions(+), 4 deletions(-)
 create mode 100644 doze/res/color-night/switchbar_switch_thumb_tint.xml
 create mode 100644 doze/res/color-night/switchbar_switch_track_tint.xml

diff --git a/doze/res/color-night/switchbar_switch_thumb_tint.xml b/doze/res/color-night/switchbar_switch_thumb_tint.xml
new file mode 100644
index 0000000..e3895a2
--- /dev/null
+++ b/doze/res/color-night/switchbar_switch_thumb_tint.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2018 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:color/black" />
+</selector>
diff --git a/doze/res/color-night/switchbar_switch_track_tint.xml b/doze/res/color-night/switchbar_switch_track_tint.xml
new file mode 100644
index 0000000..fcccbfc
--- /dev/null
+++ b/doze/res/color-night/switchbar_switch_track_tint.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2018 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="#82000000" />
+</selector>
diff --git a/doze/res/color/switch_bar_bg.xml b/doze/res/color/switch_bar_bg.xml
index ba2dae1..cae20c7 100644
--- a/doze/res/color/switch_bar_bg.xml
+++ b/doze/res/color/switch_bar_bg.xml
@@ -15,6 +15,6 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="#ff80868B" android:state_activated="false" />
+    <item android:color="@*android:color/material_grey_600" android:state_activated="false" />
     <item android:color="?android:attr/colorAccent" android:state_activated="true" />
 </selector>
diff --git a/doze/res/layout/switch_bar.xml b/doze/res/layout/switch_bar.xml
index 9e11a0a..3307ee1 100644
--- a/doze/res/layout/switch_bar.xml
+++ b/doze/res/layout/switch_bar.xml
@@ -32,9 +32,9 @@
         android:paddingStart="56dp"
         android:maxLines="2"
         android:ellipsize="end"
-        android:textAppearance="@android:style/TextAppearance.Material.Title"
-        android:textColor="@android:color/white"
-        android:textSize="18sp"
+        android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"
+        android:textColor="?android:attr/textColorPrimaryInverse"
+        android:textSize="16sp"
         android:textAlignment="viewStart" />
 
     <Switch
-- 
GitLab