[automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev am: a26ca75570 -s ours am: cee3e9bfce -s ours am: ebdc111881 -s ours am: 87231f645a -s ours
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15591581
Change-Id: I2b39b07cd852ec1507c9f0910bc15116537eecf8
diff --git a/res/drawable-night/accessibility_button_navigation.xml b/res/drawable-night/accessibility_button_navigation.xml
new file mode 100644
index 0000000..d6fd485
--- /dev/null
+++ b/res/drawable-night/accessibility_button_navigation.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M325.2,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7v-42.2h239V231.9z"
+ android:fillColor="#3D4043"/>
+ <path
+ android:pathData="M269.7,205.2c1.5,0 2.7,1.2 2.7,2.7s-1.2,2.7 -2.7,2.7c-1.5,0 -2.7,-1.2 -2.7,-2.7S268.2,205.2 269.7,205.2zM273.8,214.7v17.6H271v-8.1h-2.7v8.1h-2.7v-17.6c-2.7,-0.2 -5.6,-0.7 -8.1,-1.4l0.7,-2.7c3.5,0.9 7.7,1.4 11.5,1.4c3.8,0 8,-0.4 11.5,-1.4l0.7,2.7C279.4,214 276.5,214.5 273.8,214.7z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M205.7,219.7m-9.4,0a9.4,9.4 0,1 1,18.8 0a9.4,9.4 0,1 1,-18.8 0"
+ android:fillColor="#808589"/>
+ <path
+ android:pathData="M132.1,219.7l16,9.2l0,-18.5z"
+ android:fillColor="#808589"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9V231.9z"
+ android:fillColor="#808589"/>
+ <path
+ android:pathData="M269.7,255.3c-19.6,0 -35.6,-16 -35.6,-35.6s16,-35.6 35.6,-35.6s35.6,16 35.6,35.6S289.3,255.3 269.7,255.3zM269.7,187.1c-17.9,0 -32.5,14.6 -32.5,32.5c0,17.9 14.6,32.5 32.5,32.5s32.5,-14.6 32.5,-32.5C302.2,201.7 287.6,187.1 269.7,187.1z"
+ android:fillColor="#729CEE"/>
+</vector>
diff --git a/res/drawable-night/accessibility_button_preview_base.xml b/res/drawable-night/accessibility_button_preview_base.xml
new file mode 100644
index 0000000..a5b0bfa
--- /dev/null
+++ b/res/drawable-night/accessibility_button_preview_base.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9L325.4,231.9L325.4,231.9z"
+ android:fillColor="#808589"/>
+</vector>
diff --git a/res/drawable-night/accessibility_button_preview_large_floating_menu.xml b/res/drawable-night/accessibility_button_preview_large_floating_menu.xml
new file mode 100644
index 0000000..74ecbfc
--- /dev/null
+++ b/res/drawable-night/accessibility_button_preview_large_floating_menu.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M325.4,198.2h-40.9c-22.1,0 -40,-18 -40,-40s18,-40 40,-40h40.9v2.6h-40.9c-20.7,0 -37.5,16.8 -37.5,37.5s16.8,37.5 37.5,37.5h40.9V198.2z"
+ android:fillColor="#808589"/>
+ <path
+ android:pathData="M284.3,128.4c-16.5,0 -29.8,13.4 -29.8,29.8c0,16.5 13.4,29.8 29.8,29.8s29.8,-13.4 29.8,-29.8C314.2,141.7 300.9,128.4 284.3,128.4zM284.3,142.7c1.7,0 3.1,1.4 3.1,3.1c0,1.7 -1.4,3.1 -3.1,3.1s-3.1,-1.4 -3.1,-3.1C281.2,144.1 282.7,142.7 284.3,142.7zM289.1,153.7V174H286v-9.4h-3.1v9.4h-3.2v-20.3c-3.1,-0.3 -6.5,-0.8 -9.4,-1.5l0.8,-3.1c4.1,1 8.9,1.5 13.3,1.5s9.2,-0.5 13.3,-1.5l0.8,3.1C295.6,152.9 292.2,153.4 289.1,153.7z"
+ android:fillColor="#D9DBDF"/>
+</vector>
diff --git a/res/drawable-night/accessibility_button_preview_small_floating_menu.xml b/res/drawable-night/accessibility_button_preview_small_floating_menu.xml
new file mode 100644
index 0000000..4226086
--- /dev/null
+++ b/res/drawable-night/accessibility_button_preview_small_floating_menu.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M325.4,189.2h-31.7c-17.1,0 -31,-13.9 -31,-31s13.9,-31 31,-31h31.7v2h-31.7c-16,0 -29,13 -29,29s13,29 29,29h31.7V189.2z"
+ android:fillColor="#808589"/>
+ <path
+ android:pathData="M293.6,135.1c-12.8,0 -23.1,10.4 -23.1,23.1c0,12.8 10.4,23.1 23.1,23.1s23.1,-10.4 23.1,-23.1C316.7,145.4 306.4,135.1 293.6,135.1zM293.6,146.2c1.3,0 2.4,1.1 2.4,2.4s-1.1,2.4 -2.4,2.4s-2.4,-1.1 -2.4,-2.4S292.3,146.2 293.6,146.2zM297.3,154.7v15.7h-2.4v-7.3h-2.4v7.3H290v-15.7c-2.4,-0.2 -5,-0.6 -7.3,-1.2l0.6,-2.4c3.2,0.8 6.9,1.2 10.3,1.2s7.1,-0.4 10.3,-1.2l0.6,2.4C302.3,154.1 299.7,154.5 297.3,154.7z"
+ android:fillColor="#D9DBDF"/>
+</vector>
diff --git a/res/drawable-night/accessibility_button_preview_three_finger.xml b/res/drawable-night/accessibility_button_preview_three_finger.xml
new file mode 100644
index 0000000..7afb0f7
--- /dev/null
+++ b/res/drawable-night/accessibility_button_preview_three_finger.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M242.5,226.9h-73.3c-1.7,0 -3.1,1.4 -3.1,3.1s1.4,3.1 3.1,3.1h73.3c1.7,0 3.1,-1.4 3.1,-3.1S244.2,226.9 242.5,226.9z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M182.7,222.6v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-2.9,1.2 -4.9,4 -4.9,7.4c0,4.4 3.5,8 8,8c4.4,0 8,-3.5 8,-8C187.6,226.7 185.6,223.8 182.7,222.6z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M209,222.6v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-2.9,1.2 -4.9,4 -4.9,7.4c0,4.4 3.5,8 8,8c4.4,0 8,-3.5 8,-8C213.9,226.7 211.9,223.8 209,222.6z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M235.2,222.6v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-2.9,1.2 -4.9,4 -4.9,7.4c0,4.4 3.5,8 8,8c4.4,0 8,-3.5 8,-8C240,226.7 238,223.8 235.2,222.6z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9V231.9z"
+ android:fillColor="#80868B"/>
+</vector>
diff --git a/res/drawable-night/accessibility_button_preview_two_finger.xml b/res/drawable-night/accessibility_button_preview_two_finger.xml
new file mode 100644
index 0000000..05871d9
--- /dev/null
+++ b/res/drawable-night/accessibility_button_preview_two_finger.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9V231.9z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M242.4,226.9h-9.3h-5.6h-43.4h-4.7h-10.2c-1.7,0 -3.1,1.4 -3.1,3.1s1.4,3.1 3.1,3.1h10.2h3.9h45h4.8h9.3c1.7,0 3.1,-1.4 3.1,-3.1S244.1,226.9 242.4,226.9z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M194,223.5v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-1.6,0.7 -2.9,1.9 -3.8,3.4c-0.7,1.2 -1.1,2.5 -1.1,4c0,0.7 0.1,1.5 0.3,2.2c0.9,3.3 4,5.8 7.7,5.8c3.6,0 6.7,-2.5 7.7,-5.8c0.2,-0.7 0.3,-1.4 0.3,-2.2c0,-1.5 -0.4,-2.8 -1.1,-4C197,225.4 195.6,224.2 194,223.5z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M223.7,223.5v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-1.6,0.7 -2.9,1.9 -3.8,3.4c-0.7,1.2 -1.1,2.5 -1.1,4c0,0.7 0.1,1.5 0.3,2.2c0.9,3.3 4,5.8 7.7,5.8c3.6,0 6.7,-2.5 7.7,-5.8c0.2,-0.7 0.3,-1.4 0.3,-2.2c0,-1.5 -0.4,-2.8 -1.1,-4C226.6,225.4 225.3,224.2 223.7,223.5z"
+ android:fillColor="#669DF6"/>
+</vector>
diff --git a/res/drawable-night/accessibility_captions_banner.xml b/res/drawable-night/accessibility_captions_banner.xml
new file mode 100644
index 0000000..7ee30f2
--- /dev/null
+++ b/res/drawable-night/accessibility_captions_banner.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M383.9,300H28.1C12.6,300 0,287.4 0,271.9V28.1C0,12.6 12.6,0 28.1,0h355.8C399.4,0 412,12.6 412,28.1v243.8C412,287.4 399.4,300 383.9,300z"/>
+ <path
+ android:pathData="M79.2,179.6h53.6v8.5h-53.6z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M142.5,179.6h30.4v8.5h-30.4z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M79.2,195.5h79.2v8.5h-79.2z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M168.1,195.5h34.1v8.5h-34.1z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M211.9,195.5h34.1v8.5h-34.1z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M182.7,179.6h73.1v8.5h-73.1z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M265.5,179.6h26.8v8.5h-26.8z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M302.1,179.6h26.8v8.5h-26.8z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M142.7,67.9h-11.5c-1.6,0 -2.9,1.3 -2.9,2.9H67.8c-7.9,0 -14.4,6.5 -14.4,14.4v132.4c0,7.9 6.5,14.4 14.4,14.4h276.4c7.9,0 14.4,-6.5 14.4,-14.4V85.2c0,-7.9 -6.5,-14.4 -14.4,-14.4H203.1c0,-1.6 -1.3,-2.9 -2.9,-2.9h-28.8c-1.6,0 -2.9,1.3 -2.9,2.9h-23C145.5,69.2 144.3,67.9 142.7,67.9zM344.2,73.7c6.4,0 11.5,5.2 11.5,11.5v132.4c0,6.3 -5.2,11.5 -11.5,11.5H67.8c-6.4,0 -11.5,-5.2 -11.5,-11.5V85.2c0,-6.3 5.2,-11.5 11.5,-11.5H344.2z"
+ android:fillColor="#80868B"/>
+</vector>
diff --git a/res/drawable-night/accessibility_shortcut_type_hardware.xml b/res/drawable-night/accessibility_shortcut_type_hardware.xml
new file mode 100644
index 0000000..9ef3664
--- /dev/null
+++ b/res/drawable-night/accessibility_shortcut_type_hardware.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M206.1,19.1c35,0 67.9,13.6 92.6,38.4C323.4,82.1 337,115 337,150s-13.6,67.9 -38.4,92.6C273.9,267.3 241,281 206,281s-67.9,-13.6 -92.6,-38.4C88.8,217.9 75.1,185 75.1,150s13.6,-67.9 38.4,-92.6S171.1,19.1 206.1,19.1M206.1,17.1c-73.4,0 -133,59.5 -133,132.9S132.6,282.9 206,282.9s133,-59.5 133,-132.9S279.5,17.1 206.1,17.1L206.1,17.1z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M287,187.8v-1.5h2.9v-13.7c0,-1.6 -1.3,-2.9 -2.9,-2.9v-23.2c1.6,0 2.9,-1.3 2.9,-2.9V132c0,-1.6 -1.3,-2.9 -2.9,-2.9V68.4c0,-8 -6.5,-14.5 -14.5,-14.5H139.4c-8,0 -14.5,6.5 -14.5,14.5v185.3c1,0.7 1.9,1.4 2.9,2.1V68.4c0,-6.4 5.2,-11.6 11.6,-11.6h133.1c6.4,0 11.6,5.2 11.6,11.6v188.7c1,-0.7 1.9,-1.4 2.9,-2.2v-50.5c1.6,0 2.9,-1.3 2.9,-2.9v-13.7H287z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M287,204.4c1.6,0 2.9,-1.3 2.9,-2.9v-14H287v-0.9h2.9v-14c0,-1.6 -1.3,-2.9 -2.9,-2.9"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M825.7,300H469.3c-15.3,0 -27.8,-12.8 -27.8,-28.5v-243C441.5,12.8 454,0 469.3,0h356.5c15.2,0 27.7,12.8 27.7,28.5v243.2C853.5,287.2 841,300 825.7,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M728.5,187.8v-1.5h2.9v-13.7c0,-1.6 -1.3,-2.9 -2.9,-2.9v-23.2c1.6,0 2.9,-1.3 2.9,-2.9V132c0,-1.6 -1.3,-2.9 -2.9,-2.9V68.4c0,-8 -6.5,-14.5 -14.5,-14.5H580.9c-8,0 -14.5,6.5 -14.5,14.5v185.3c1,0.7 1.9,1.4 2.9,2.1V68.4c0,-6.4 5.2,-11.6 11.6,-11.6H714c6.4,0 11.6,5.2 11.6,11.6v188.7c1,-0.7 1.9,-1.4 2.9,-2.2v-50.5c1.6,0 2.9,-1.3 2.9,-2.9v-13.7H728.5z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M728.5,204.4c1.6,0 2.9,-1.3 2.9,-2.9v-14h-2.9v-0.9h2.9v-14c0,-1.6 -1.3,-2.9 -2.9,-2.9"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M648.2,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.6 38.3,57.5 38.3,92.5s-13.6,67.9 -38.4,92.6C716,267.3 683.1,281 648.1,281s-67.9,-13.6 -92.6,-38.4c-24.6,-24.7 -38.3,-57.6 -38.3,-92.6s13.6,-67.9 38.4,-92.6C580.4,32.7 613.2,19.1 648.2,19.1M648.2,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S721.6,17.1 648.2,17.1L648.2,17.1z"
+ android:fillColor="#E8EAED"/>
+</vector>
diff --git a/res/drawable-night/accessibility_shortcut_type_software.xml b/res/drawable-night/accessibility_shortcut_type_software.xml
new file mode 100644
index 0000000..8d55ae9
--- /dev/null
+++ b/res/drawable-night/accessibility_shortcut_type_software.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"/>
+ <path
+ android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
+ android:fillColor="#80868b"/>
+ <path
+ android:pathData="M286.7,210.83a11.59,11.59 0,0 1,-11.58 11.58H142a11.59,11.59 0,0 1,-11.58 -11.58V183.26H286.7Z"
+ android:fillColor="#3c4043"/>
+ <path
+ android:pathData="M250.41,193.38a1.77,1.77 0,1 1,-1.78 1.77A1.77,1.77 0,0 1,250.41 193.38ZM253.07,199.58v11.53h-1.78v-5.32h-1.77v5.32h-1.77L247.75,199.58a30.78,30.78 0,0 1,-5.32 -0.89l0.44,-1.77a32.34,32.34 0,0 0,15.07 0l0.45,1.77A30.78,30.78 0,0 1,253.07 199.58Z"
+ android:fillColor="#fff"/>
+ <path
+ android:pathData="M208.55,202.84m-6.13,0a6.13,6.13 0,1 1,12.26 0a6.13,6.13 0,1 1,-12.26 0"
+ android:fillColor="#80868b"/>
+ <path
+ android:pathData="M250.41,202.84m-22.28,0a22.28,22.28 0,1 1,44.56 0a22.28,22.28 0,1 1,-44.56 0"
+ android:strokeWidth="2"
+ android:fillColor="#00000000"
+ android:strokeColor="#669df6"/>
+ <path
+ android:pathData="M160.45,202.84l10.43,6.02l0,-12.05l-10.43,6.03z"
+ android:fillColor="#80868b"/>
+ <path
+ android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
+ android:fillColor="#3c4043"/>
+</vector>
diff --git a/res/drawable-night/accessibility_shortcut_type_software_floating.xml b/res/drawable-night/accessibility_shortcut_type_software_floating.xml
new file mode 100644
index 0000000..25d53ca
--- /dev/null
+++ b/res/drawable-night/accessibility_shortcut_type_software_floating.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"/>
+ <path
+ android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
+ android:fillColor="#80868b"/>
+ <path
+ android:strokeWidth="1"
+ android:pathData="M286.7,144.13H266a19.63,19.63 0,1 0,0 39.26H286.7"
+ android:fillColor="#00000000"
+ android:strokeColor="#80868b"/>
+ <path
+ android:pathData="M266,148.65a15.11,15.11 0,1 0,15.1 15.11A15.11,15.11 0,0 0,266 148.65ZM266,155.93a1.59,1.59 0,0 1,0 3.17,1.59 1.59,0 1,1 0,-3.17ZM268.37,161.47v10.29h-1.58L266.79,167h-1.59v4.75h-1.58L263.62,161.47a27.23,27.23 0,0 1,-4.75 -0.79l0.4,-1.58a29.06,29.06 0,0 0,13.46 0l0.39,1.58A27.23,27.23 0,0 1,268.33 161.47Z"
+ android:fillColor="#dadce0"/>
+ <path
+ android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
+ android:fillColor="#3c4043"/>
+</vector>
diff --git a/res/drawable-night/accessibility_shortcut_type_software_gesture.xml b/res/drawable-night/accessibility_shortcut_type_software_gesture.xml
new file mode 100644
index 0000000..9055865
--- /dev/null
+++ b/res/drawable-night/accessibility_shortcut_type_software_gesture.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M139.5,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7v166.4c0,6.4 -5.2,11.6 -11.6,11.6H139.5c-6.4,0 -11.6,-5.2 -11.6,-11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1v166.1C125.1,218.8 131.6,225.3 139.5,225.3z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M198.4,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C201.6,208.4 200.2,206.5 198.4,205.7z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M217.7,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C220.9,208.4 219.6,206.5 217.7,205.7z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M206.1,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C88.8,217.9 75.1,185 75.1,150s13.6,-67.9 38.4,-92.6C138.2,32.7 171.1,19.1 206.1,19.1M206.1,17.1c-73.4,0 -133,59.5 -133,132.9S132.6,282.9 206,282.9S339,223.4 339,150S279.5,17.1 206.1,17.1L206.1,17.1z"
+ android:fillColor="#3C4043"/>
+</vector>
diff --git a/res/drawable-night/accessibility_shortcut_type_software_gesture_talkback.xml b/res/drawable-night/accessibility_shortcut_type_software_gesture_talkback.xml
new file mode 100644
index 0000000..0b6f1e6
--- /dev/null
+++ b/res/drawable-night/accessibility_shortcut_type_software_gesture_talkback.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M138,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9V45.7c-1.9,-1.5 -3.8,-2.9 -5.8,-4.3v169.4c0,6.4 -5.2,11.6 -11.6,11.6H138c-6.4,0 -11.6,-5.2 -11.6,-11.6V43.5c-1,0.7 -1.9,1.5 -2.9,2.2v165C123.5,218.8 130,225.3 138,225.3z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M206,283.9c-73.9,0 -133.9,-60.1 -133.9,-133.9S132.1,16.1 206,16.1c73.9,0 133.9,60.1 133.9,133.9S279.9,283.9 206,283.9zM206,18.1C133.2,18.1 74.1,77.2 74.1,150S133.2,281.9 206,281.9S337.9,222.8 337.9,150S278.8,18.1 206,18.1z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M190.9,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C194.1,208.4 192.8,206.5 190.9,205.7z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M208,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C211.2,208.4 209.9,206.5 208,205.7z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M225.1,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C228.2,208.4 226.9,206.5 225.1,205.7z"
+ android:fillColor="#669DF6"/>
+</vector>
diff --git a/res/drawable-night/ic_illustration_fullscreen.xml b/res/drawable-night/ic_illustration_fullscreen.xml
new file mode 100644
index 0000000..c5f1f92
--- /dev/null
+++ b/res/drawable-night/ic_illustration_fullscreen.xml
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M-83.4,-43h-356.4c-15.3,0 -27.8,-12.8 -27.8,-28.5v-243c0,-15.7 12.5,-28.5 27.8,-28.5h356.5c15.2,0 27.7,12.8 27.7,28.5v243.2C-55.6,-55.8 -68.1,-43 -83.4,-43z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M-260.2,-323.9c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4c-24.7,-24.8 -38.4,-57.7 -38.4,-92.7s13.6,-67.9 38.4,-92.6C-328.1,-310.3 -295.2,-323.9 -260.2,-323.9M-260.2,-325.9c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S-186.8,-325.9 -260.2,-325.9L-260.2,-325.9z"
+ android:fillColor="#E8EAED"/>
+ <path
+ android:pathData="M-205.5,-235.3v-7.7c0,-1.1 -0.9,-1.9 -1.9,-1.9v-40.4c0,-5.3 -4.3,-9.6 -9.6,-9.6h-88.5c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C-206.4,-233.4 -205.5,-234.3 -205.5,-235.3zM-209.4,-100.6c0,4.2 -3.5,7.7 -7.7,7.7h-88.5c-4.2,0 -7.7,-3.5 -7.7,-7.7v-184.8c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V-100.6z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M-217.1,-224.1c2,0 3.7,1.7 3.7,3.7v54.8c0,2 -1.7,3.7 -3.7,3.7h-88.5c-2,0 -3.7,-1.7 -3.7,-3.7v-54.8c0,-2 1.7,-3.7 3.7,-3.7H-217.1M-217.1,-228.1h-88.5c-4.2,0 -7.7,3.5 -7.7,7.7v54.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7v-54.8C-209.4,-224.6 -212.8,-228.1 -217.1,-228.1L-217.1,-228.1z"
+ android:fillColor="#F9AB00"/>
+ <path
+ android:pathData="M-230.7,-217.4l11,0l0,11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M-219.7,-217.4L-235.3,-201.8"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M-292.4,-167.9l-10.9,0l0,-11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M-303.3,-167.9L-287.7,-183.5"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,-43H27.8C12.5,-43 0,-55.8 0,-71.5v-243C0,-330.2 12.5,-343 27.8,-343h356.5c15.2,0 27.7,12.8 27.7,28.5v243.2C412,-55.8 399.5,-43 384.2,-43z"/>
+ <path
+ android:pathData="M207.4,-323.9c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6S324.8,-125 300,-100.3c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C90.1,-125.1 76.4,-158 76.4,-193s13.6,-67.9 38.4,-92.6C139.5,-310.3 172.4,-323.9 207.4,-323.9M207.4,-325.9c-73.4,0 -133,59.5 -133,132.9S133.9,-60.1 207.3,-60.1s133,-59.5 133,-132.9S280.8,-325.9 207.4,-325.9L207.4,-325.9z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M262.1,-235.3v-7.7c0,-1.1 -0.9,-1.9 -1.9,-1.9v-40.4c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,-233.4 262.1,-234.3 262.1,-235.3zM258.2,-100.6c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7v-184.8c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V-100.6z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M250.5,-224.1c2,0 3.7,1.7 3.7,3.7v54.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7v-54.8c0,-2 1.7,-3.7 3.7,-3.7H250.5M250.5,-228.1H162c-4.2,0 -7.7,3.5 -7.7,7.7v54.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7v-54.8C258.2,-224.6 254.8,-228.1 250.5,-228.1L250.5,-228.1z"
+ android:fillColor="#FCC934"/>
+ <path
+ android:pathData="M236.9,-217.4l11,0l0,11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M247.9,-217.4L232.3,-201.8"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M175.2,-167.9l-10.9,0l0,-11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M164.3,-167.9L179.9,-183.5"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,650.3H27.8C12.5,650.3 0,637.5 0,621.8v-243c0,-15.7 12.5,-28.5 27.8,-28.5h356.5c15.2,0 27.7,12.8 27.7,28.5V622C412,637.5 399.5,650.3 384.2,650.3z"/>
+ <path
+ android:pathData="M207.4,369.4c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6c0,35 -13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4c-24.7,-24.8 -38.4,-57.7 -38.4,-92.7s13.6,-67.9 38.4,-92.6C139.5,383 172.4,369.4 207.4,369.4M207.4,367.4c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.8,367.4 207.4,367.4L207.4,367.4z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M262.1,458v-7.7c0,-1.1 -0.9,-1.9 -1.9,-1.9V408c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,459.9 262.1,459.1 262.1,458zM258.2,592.7c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7V408c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V592.7z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M250.5,404.3c2,0 3.7,1.7 3.7,3.7v184.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7V408c0,-2 1.7,-3.7 3.7,-3.7H250.5M250.5,400.3H162c-4.2,0 -7.7,3.5 -7.7,7.7v184.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7V408C258.2,403.7 254.8,400.3 250.5,400.3L250.5,400.3z"
+ android:fillColor="#FCC934"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M207.4,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6S324.8,218 300,242.7c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C90.1,217.9 76.4,185 76.4,150S90,82.1 114.8,57.4C139.5,32.7 172.4,19.1 207.4,19.1M207.4,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.8,17.1 207.4,17.1L207.4,17.1z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M262.1,107.7V100c0,-1.1 -0.9,-1.9 -1.9,-1.9V57.6c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,109.6 262.1,108.7 262.1,107.7zM258.2,242.4c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7V57.6c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V242.4z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M250.5,53.9c2,0 3.7,1.7 3.7,3.7v184.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7V57.6c0,-2 1.7,-3.7 3.7,-3.7H250.5M250.5,49.9H162c-4.2,0 -7.7,3.5 -7.7,7.7v184.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7V57.6C258.2,53.4 254.8,49.9 250.5,49.9L250.5,49.9z"
+ android:fillColor="#FCC934"/>
+ <path
+ android:pathData="M236.9,60.6l11,0l0,11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M247.9,60.6L232.3,76.2"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M175.2,240.1l-10.9,0l0,-11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M164.3,240.1L179.9,224.5"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M-83.4,300h-356.4c-15.3,0 -27.8,-12.8 -27.8,-28.5v-243c0,-15.7 12.5,-28.5 27.8,-28.5h356.5c15.2,0 27.7,12.8 27.7,28.5v243.2C-55.6,287.2 -68.1,300 -83.4,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M-260.2,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4c-24.7,-24.8 -38.4,-57.7 -38.4,-92.7s13.6,-67.9 38.4,-92.6C-328.1,32.7 -295.2,19.1 -260.2,19.1M-260.2,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S-186.8,17.1 -260.2,17.1L-260.2,17.1z"
+ android:fillColor="#E8EAED"/>
+ <path
+ android:pathData="M-205.5,107.7V100c0,-1.1 -0.9,-1.9 -1.9,-1.9V57.6c0,-5.3 -4.3,-9.6 -9.6,-9.6h-88.5c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C-206.4,109.6 -205.5,108.7 -205.5,107.7zM-209.4,242.4c0,4.2 -3.5,7.7 -7.7,7.7h-88.5c-4.2,0 -7.7,-3.5 -7.7,-7.7V57.6c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V242.4z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M-217.1,53.9c2,0 3.7,1.7 3.7,3.7v184.8c0,2 -1.7,3.7 -3.7,3.7h-88.5c-2,0 -3.7,-1.7 -3.7,-3.7V57.6c0,-2 1.7,-3.7 3.7,-3.7H-217.1M-217.1,49.9h-88.5c-4.2,0 -7.7,3.5 -7.7,7.7v184.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7V57.6C-209.4,53.4 -212.8,49.9 -217.1,49.9L-217.1,49.9z"
+ android:fillColor="#F9AB00"/>
+ <path
+ android:pathData="M-230.7,60.6l11,0l0,11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M-219.7,60.6L-235.3,76.2"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M-292.4,240.1l-10.9,0l0,-11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M-303.3,240.1L-287.7,224.5"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M242.2,574.2h-13.9v10.4h13.9V574.2zM245.7,560.3h-31.3c-1.9,0 -3.5,1.5 -3.5,3.4v24.4c0,1.9 1.6,3.5 3.5,3.5h31.3c1.9,0 3.5,-1.6 3.5,-3.5v-24.4C249.1,561.8 247.6,560.3 245.7,560.3zM245.7,588.2h-31.3v-24.5h31.3V588.2z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M-83.4,650.3h-356.4c-15.3,0 -27.8,-12.8 -27.8,-28.5v-243c0,-15.7 12.5,-28.5 27.8,-28.5h356.5c15.2,0 27.7,12.8 27.7,28.5V622C-55.6,637.5 -68.1,650.3 -83.4,650.3z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M-260.2,369.4c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6c0,35 -13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4c-24.7,-24.8 -38.4,-57.7 -38.4,-92.7s13.6,-67.9 38.4,-92.6C-328.1,383 -295.2,369.4 -260.2,369.4M-260.2,367.4c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S-186.8,367.4 -260.2,367.4L-260.2,367.4z"
+ android:fillColor="#E8EAED"/>
+ <path
+ android:pathData="M-205.5,458v-7.7c0,-1.1 -0.9,-1.9 -1.9,-1.9V408c0,-5.3 -4.3,-9.6 -9.6,-9.6h-88.5c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C-206.4,459.9 -205.5,459.1 -205.5,458zM-209.4,592.7c0,4.2 -3.5,7.7 -7.7,7.7h-88.5c-4.2,0 -7.7,-3.5 -7.7,-7.7V408c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V592.7z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M-217.1,404.3c2,0 3.7,1.7 3.7,3.7v184.8c0,2 -1.7,3.7 -3.7,3.7h-88.5c-2,0 -3.7,-1.7 -3.7,-3.7V408c0,-2 1.7,-3.7 3.7,-3.7H-217.1M-217.1,400.3h-88.5c-4.2,0 -7.7,3.5 -7.7,7.7v184.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7V408C-209.4,403.7 -212.8,400.3 -217.1,400.3L-217.1,400.3z"
+ android:fillColor="#F9AB00"/>
+ <path
+ android:pathData="M-225.4,574.2h-13.9v10.4h13.9V574.2zM-221.9,560.3h-31.3c-1.9,0 -3.5,1.5 -3.5,3.4v24.4c0,1.9 1.6,3.5 3.5,3.5h31.3c1.9,0 3.5,-1.6 3.5,-3.5v-24.4C-218.4,561.8 -220,560.3 -221.9,560.3zM-221.9,588.2h-31.3v-24.5h31.3V588.2z"
+ android:fillColor="#5F6368"/>
+</vector>
diff --git a/res/drawable-night/ic_illustration_switch.xml b/res/drawable-night/ic_illustration_switch.xml
new file mode 100644
index 0000000..9cabced
--- /dev/null
+++ b/res/drawable-night/ic_illustration_switch.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M207.4,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6S324.8,218 300,242.7c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C90.1,217.9 76.4,185 76.4,150S90,82.1 114.8,57.4C139.5,32.7 172.4,19.1 207.4,19.1M207.4,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.8,17.1 207.4,17.1L207.4,17.1z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M262.1,107.7V100c0,-1.1 -0.9,-1.9 -1.9,-1.9V57.6c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,109.6 262.1,108.7 262.1,107.7zM258.2,242.4c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7V57.6c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V242.4z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M250.5,53.9c2,0 3.7,1.7 3.7,3.7v184.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7V57.6c0,-2 1.7,-3.7 3.7,-3.7H250.5M250.5,49.9H162c-4.2,0 -7.7,3.5 -7.7,7.7v184.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7V57.6C258.2,53.4 254.8,49.9 250.5,49.9L250.5,49.9z"
+ android:fillColor="#FCC934"/>
+ <path
+ android:pathData="M214.2,223.8v17.5h34.9v-34.9h-17.5v3.5h14v27.9h-27.9v-14H214.2z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M228.2,206.3h-14v14h14V206.3z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M242.2,222.1v3.5h-6.3l7.9,7.9l-2.5,2.5l-7.9,-7.9v6.3h-3.5v-12.2H242.2z"
+ android:fillColor="#DADCE0"/>
+</vector>
diff --git a/res/drawable-night/ic_illustration_window.xml b/res/drawable-night/ic_illustration_window.xml
new file mode 100644
index 0000000..7984df5
--- /dev/null
+++ b/res/drawable-night/ic_illustration_window.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
+ <path
+ android:pathData="M207.4,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6S324.8,218 300,242.7c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C90.1,217.9 76.4,185 76.4,150S90,82.1 114.8,57.4C139.5,32.7 172.4,19.1 207.4,19.1M207.4,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.8,17.1 207.4,17.1L207.4,17.1z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M262.1,107.7V100c0,-1.1 -0.9,-1.9 -1.9,-1.9V57.6c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,109.6 262.1,108.7 262.1,107.7zM258.2,242.4c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7V57.6c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V242.4z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M250.5,118.9c2,0 3.7,1.7 3.7,3.7v54.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7v-54.8c0,-2 1.7,-3.7 3.7,-3.7H250.5M250.5,114.9H162c-4.2,0 -7.7,3.5 -7.7,7.7v54.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7v-54.8C258.2,118.4 254.8,114.9 250.5,114.9L250.5,114.9z"
+ android:fillColor="#FCC934"/>
+ <path
+ android:pathData="M236.9,125.6l11,0l0,11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M247.9,125.6L232.3,141.2"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M175.2,175.1l-10.9,0l0,-11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M164.3,175.1L179.9,159.5"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#FCC934"
+ android:strokeLineCap="round"/>
+</vector>
diff --git a/res/drawable/accessibility_button_navigation.xml b/res/drawable/accessibility_button_navigation.xml
index 82e3c70..8fdb627 100644
--- a/res/drawable/accessibility_button_navigation.xml
+++ b/res/drawable/accessibility_button_navigation.xml
@@ -15,53 +15,29 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="125dp"
- android:height="153dp"
- android:viewportWidth="125"
- android:viewportHeight="153">
- <group>
- <clip-path
- android:pathData="M0,0h125v153h-125z"/>
- <path
- android:pathData="M7.4,-62.9L117.6,-62.9A6.3,6.3 0,0 1,123.9 -56.6L123.9,145.6A6.3,6.3 0,0 1,117.6 151.9L7.4,151.9A6.3,6.3 0,0 1,1.1 145.6L1.1,-56.6A6.3,6.3 0,0 1,7.4 -62.9z"
- android:strokeWidth="1.8"
- android:fillColor="#DADCE0"
- android:strokeColor="#BDC1C6"/>
- <group>
- <clip-path
- android:pathData="M7.4,-62.9L116.6,-62.9A6.3,6.3 0,0 1,122.9 -56.6L122.9,145.6A6.3,6.3 0,0 1,116.6 151.9L7.4,151.9A6.3,6.3 0,0 1,1.1 145.6L1.1,-56.6A6.3,6.3 0,0 1,7.4 -62.9z"/>
- <path
- android:pathData="M12.4,-61L112.6,-61A5.4,5.4 0,0 1,118 -55.6L118,140.6A5.4,5.4 0,0 1,112.6 146L12.4,146A5.4,5.4 0,0 1,7 140.6L7,-55.6A5.4,5.4 0,0 1,12.4 -61z"
- android:fillColor="#F8F9FA"/>
- <group>
- <clip-path
- android:pathData="M12.4,-61L112.6,-61A5.4,5.4 0,0 1,118 -55.6L118,140.6A5.4,5.4 0,0 1,112.6 146L12.4,146A5.4,5.4 0,0 1,7 140.6L7,-55.6A5.4,5.4 0,0 1,12.4 -61z"/>
- </group>
- </group>
- <path
- android:pathData="M7,126H118V140.6C118,143.582 115.582,146 112.6,146H12.4C9.418,146 7,143.582 7,140.6V126Z"
- android:fillColor="#000000"
- android:fillAlpha="0.87"/>
- <path
- android:strokeWidth="1"
- android:pathData="M63.5,138.688C64.713,138.688 65.697,137.708 65.697,136.5C65.697,135.292 64.713,134.312 63.5,134.312C62.286,134.312 61.303,135.292 61.303,136.5C61.303,137.708 62.286,138.688 63.5,138.688Z"
- android:fillColor="#00000000"
- android:fillType="evenOdd"
- android:strokeColor="#9AA0A6"/>
- <path
- android:strokeWidth="1"
- android:pathData="M33.694,133.953C33.827,133.876 33.994,133.972 33.994,134.126V138.874C33.994,139.028 33.827,139.125 33.694,139.047L29.604,136.673C29.471,136.596 29.471,136.404 29.604,136.327L33.694,133.953Z"
- android:fillColor="#00000000"
- android:fillType="evenOdd"
- android:strokeColor="#9AA0A6"/>
- <path
- android:pathData="M96.111,131.2C96.111,131.86 95.611,132.4 95,132.4C94.389,132.4 93.889,131.86 93.889,131.2C93.889,130.54 94.389,130 95,130C95.611,130 96.111,130.54 96.111,131.2ZM95,133C96.572,133 98.272,132.82 99.722,132.4L100,133.6C98.967,133.9 97.778,134.098 96.667,134.2V142H95.556V138.4H94.444V142H93.333V134.2C92.222,134.098 91.033,133.9 90,133.6L90.278,132.4C91.728,132.82 93.428,133 95,133Z"
- android:fillColor="#ffffff"
- android:fillType="evenOdd"/>
- <path
- android:pathData="M94.5,135.5m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
- android:strokeWidth="4"
- android:fillColor="#00000000"
- android:strokeColor="#4285F4"/>
- </group>
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M325.2,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7v-42.2h239V231.9z"/>
+ <path
+ android:pathData="M269.7,205.2c1.5,0 2.7,1.2 2.7,2.7s-1.2,2.7 -2.7,2.7c-1.5,0 -2.7,-1.2 -2.7,-2.7S268.2,205.2 269.7,205.2zM273.8,214.7v17.6H271v-8.1h-2.7v8.1h-2.7v-17.6c-2.7,-0.2 -5.6,-0.7 -8.1,-1.4l0.7,-2.7c3.5,0.9 7.7,1.4 11.5,1.4c3.8,0 8,-0.4 11.5,-1.4l0.7,2.7C279.4,214 276.5,214.5 273.8,214.7z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M205.7,219.7m-9.4,0a9.4,9.4 0,1 1,18.8 0a9.4,9.4 0,1 1,-18.8 0"
+ android:fillColor="#BDC0C4"/>
+ <path
+ android:pathData="M132.1,219.7l16,9.2l0,-18.5z"
+ android:fillColor="#BDC0C4"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9V231.9z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M269.7,255.3c-19.6,0 -35.6,-16 -35.6,-35.6s16,-35.6 35.6,-35.6s35.6,16 35.6,35.6S289.3,255.3 269.7,255.3zM269.7,187.1c-17.9,0 -32.5,14.6 -32.5,32.5c0,17.9 14.6,32.5 32.5,32.5s32.5,-14.6 32.5,-32.5C302.2,201.7 287.6,187.1 269.7,187.1z"
+ android:fillColor="#3773DF"/>
</vector>
diff --git a/res/drawable/accessibility_button_preview_base.xml b/res/drawable/accessibility_button_preview_base.xml
index 9e3ec59..b75b1a8 100644
--- a/res/drawable/accessibility_button_preview_base.xml
+++ b/res/drawable/accessibility_button_preview_base.xml
@@ -15,28 +15,14 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="125dp"
- android:height="153dp"
- android:viewportWidth="125"
- android:viewportHeight="153">
- <group>
- <clip-path
- android:pathData="M0,0h125v153h-125z"/>
- <path
- android:pathData="M7.4,-62.9L117.6,-62.9A6.3,6.3 0,0 1,123.9 -56.6L123.9,145.6A6.3,6.3 0,0 1,117.6 151.9L7.4,151.9A6.3,6.3 0,0 1,1.1 145.6L1.1,-56.6A6.3,6.3 0,0 1,7.4 -62.9z"
- android:strokeWidth="1.8"
- android:fillColor="#DADCE0"
- android:strokeColor="#BDC1C6"/>
- <group>
- <clip-path
- android:pathData="M7.4,-62.9L116.6,-62.9A6.3,6.3 0,0 1,122.9 -56.6L122.9,145.6A6.3,6.3 0,0 1,116.6 151.9L7.4,151.9A6.3,6.3 0,0 1,1.1 145.6L1.1,-56.6A6.3,6.3 0,0 1,7.4 -62.9z"/>
- <path
- android:pathData="M12.4,-61L112.6,-61A5.4,5.4 0,0 1,118 -55.6L118,140.6A5.4,5.4 0,0 1,112.6 146L12.4,146A5.4,5.4 0,0 1,7 140.6L7,-55.6A5.4,5.4 0,0 1,12.4 -61z"
- android:fillColor="#F8F9FA"/>
- <group>
- <clip-path
- android:pathData="M12.4,-61L112.6,-61A5.4,5.4 0,0 1,118 -55.6L118,140.6A5.4,5.4 0,0 1,112.6 146L12.4,146A5.4,5.4 0,0 1,7 140.6L7,-55.6A5.4,5.4 0,0 1,12.4 -61z"/>
- </group>
- </group>
- </group>
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9L325.4,231.9L325.4,231.9z"
+ android:fillColor="#DADCE0"/>
</vector>
diff --git a/res/drawable/accessibility_button_preview_large_floating_menu.xml b/res/drawable/accessibility_button_preview_large_floating_menu.xml
index e003dc7..794f3ca 100644
--- a/res/drawable/accessibility_button_preview_large_floating_menu.xml
+++ b/res/drawable/accessibility_button_preview_large_floating_menu.xml
@@ -15,27 +15,14 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="125dp"
- android:height="153dp"
- android:viewportWidth="125"
- android:viewportHeight="153">
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
<path
- android:pathData="M0,0h125v153h-125z"
- android:fillColor="#00000000"/>
- <group>
- <clip-path
- android:pathData="M89,95h29v34h-29z"/>
- <path
- android:strokeWidth="1"
- android:pathData="M105,97.5L131,97.5A14.5,14.5 0,0 1,145.5 112L145.5,112A14.5,14.5 0,0 1,131 126.5L105,126.5A14.5,14.5 0,0 1,90.5 112L90.5,112A14.5,14.5 0,0 1,105 97.5z"
- android:fillColor="#ffffff"
- android:strokeColor="#DADCE0"/>
- <path
- android:pathData="M105.4,112m-11.2,0a11.2,11.2 0,1 1,22.4 0a11.2,11.2 0,1 1,-22.4 0"
- android:fillColor="#80868B"/>
- <path
- android:pathData="M106.467,107.733C106.467,108.32 105.987,108.8 105.4,108.8C104.814,108.8 104.334,108.32 104.334,107.733C104.334,107.147 104.814,106.667 105.4,106.667C105.987,106.667 106.467,107.147 106.467,107.733ZM105.4,109.333C106.91,109.333 108.542,109.173 109.934,108.8L110.2,109.867C109.208,110.133 108.067,110.309 107,110.4V117.333H105.934V114.133H104.867V117.333H103.8V110.4C102.734,110.309 101.592,110.133 100.6,109.867L100.867,108.8C102.259,109.173 103.891,109.333 105.4,109.333Z"
- android:fillColor="#ffffff"
- android:fillType="evenOdd"/>
- </group>
-</vector>
\ No newline at end of file
+ android:pathData="M325.4,198.2h-40.9c-22.1,0 -40,-18 -40,-40s18,-40 40,-40h40.9v2.6h-40.9c-20.7,0 -37.5,16.8 -37.5,37.5s16.8,37.5 37.5,37.5h40.9V198.2z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M284.3,128.4c-16.5,0 -29.8,13.4 -29.8,29.8c0,16.5 13.4,29.8 29.8,29.8s29.8,-13.4 29.8,-29.8C314.2,141.7 300.9,128.4 284.3,128.4zM284.3,142.7c1.7,0 3.1,1.4 3.1,3.1c0,1.7 -1.4,3.1 -3.1,3.1s-3.1,-1.4 -3.1,-3.1C281.2,144.1 282.7,142.7 284.3,142.7zM289.1,153.7V174H286v-9.4h-3.1v9.4h-3.2v-20.3c-3.1,-0.3 -6.5,-0.8 -9.4,-1.5l0.8,-3.1c4.1,1 8.9,1.5 13.3,1.5s9.2,-0.5 13.3,-1.5l0.8,3.1C295.6,152.9 292.2,153.4 289.1,153.7z"
+ android:fillColor="#606368"/>
+</vector>
diff --git a/res/drawable/accessibility_button_preview_small_floating_menu.xml b/res/drawable/accessibility_button_preview_small_floating_menu.xml
index 3ff8e4b..670a516 100644
--- a/res/drawable/accessibility_button_preview_small_floating_menu.xml
+++ b/res/drawable/accessibility_button_preview_small_floating_menu.xml
@@ -15,27 +15,14 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="125dp"
- android:height="153dp"
- android:viewportWidth="125"
- android:viewportHeight="153">
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
<path
- android:pathData="M0,0h125v153h-125z"
- android:fillColor="#00000000"/>
- <group>
- <clip-path
- android:pathData="M89,106h29v22h-29z"/>
- <path
- android:strokeWidth="1"
- android:pathData="M111,107.5L137,107.5A9.5,9.5 0,0 1,146.5 117L146.5,117A9.5,9.5 0,0 1,137 126.5L111,126.5A9.5,9.5 0,0 1,101.5 117L101.5,117A9.5,9.5 0,0 1,111 107.5z"
- android:fillColor="#ffffff"
- android:strokeColor="#DADCE0"/>
- <path
- android:pathData="M111.168,116.968m-7.168,0a7.168,7.168 0,1 1,14.336 0a7.168,7.168 0,1 1,-14.336 0"
- android:fillColor="#80868B"/>
- <path
- android:pathData="M111.851,114.237C111.851,114.612 111.543,114.92 111.168,114.92C110.792,114.92 110.485,114.612 110.485,114.237C110.485,113.861 110.792,113.554 111.168,113.554C111.543,113.554 111.851,113.861 111.851,114.237ZM111.168,115.261C112.134,115.261 113.178,115.158 114.069,114.92L114.24,115.602C113.605,115.773 112.875,115.886 112.192,115.944V120.381H111.509V118.333H110.827V120.381H110.144V115.944C109.461,115.886 108.731,115.773 108.096,115.602L108.267,114.92C109.157,115.158 110.202,115.261 111.168,115.261Z"
- android:fillColor="#ffffff"
- android:fillType="evenOdd"/>
- </group>
-</vector>
\ No newline at end of file
+ android:pathData="M325.4,189.2h-31.7c-17.1,0 -31,-13.9 -31,-31s13.9,-31 31,-31h31.7v2h-31.7c-16,0 -29,13 -29,29s13,29 29,29h31.7V189.2z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M293.6,135.1c-12.8,0 -23.1,10.4 -23.1,23.1c0,12.8 10.4,23.1 23.1,23.1s23.1,-10.4 23.1,-23.1C316.7,145.4 306.4,135.1 293.6,135.1zM293.6,146.2c1.3,0 2.4,1.1 2.4,2.4s-1.1,2.4 -2.4,2.4s-2.4,-1.1 -2.4,-2.4S292.3,146.2 293.6,146.2zM297.3,154.7v15.7h-2.4v-7.3h-2.4v7.3H290v-15.7c-2.4,-0.2 -5,-0.6 -7.3,-1.2l0.6,-2.4c3.2,0.8 6.9,1.2 10.3,1.2s7.1,-0.4 10.3,-1.2l0.6,2.4C302.3,154.1 299.7,154.5 297.3,154.7z"
+ android:fillColor="#606368"/>
+</vector>
diff --git a/res/drawable/accessibility_button_preview_three_finger.xml b/res/drawable/accessibility_button_preview_three_finger.xml
new file mode 100644
index 0000000..d18ce60
--- /dev/null
+++ b/res/drawable/accessibility_button_preview_three_finger.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M242.5,226.9h-73.3c-1.7,0 -3.1,1.4 -3.1,3.1s1.4,3.1 3.1,3.1h73.3c1.7,0 3.1,-1.4 3.1,-3.1S244.2,226.9 242.5,226.9z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M182.7,222.6v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-2.9,1.2 -4.9,4 -4.9,7.4c0,4.4 3.5,8 8,8c4.4,0 8,-3.5 8,-8C187.6,226.7 185.6,223.8 182.7,222.6z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M209,222.6v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-2.9,1.2 -4.9,4 -4.9,7.4c0,4.4 3.5,8 8,8c4.4,0 8,-3.5 8,-8C213.9,226.7 211.9,223.8 209,222.6z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M235.2,222.6v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-2.9,1.2 -4.9,4 -4.9,7.4c0,4.4 3.5,8 8,8c4.4,0 8,-3.5 8,-8C240,226.7 238,223.8 235.2,222.6z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9V231.9z"
+ android:fillColor="#DADCE0"/>
+</vector>
diff --git a/res/drawable/accessibility_button_preview_two_finger.xml b/res/drawable/accessibility_button_preview_two_finger.xml
new file mode 100644
index 0000000..bec95af
--- /dev/null
+++ b/res/drawable/accessibility_button_preview_two_finger.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9V231.9z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M242.4,226.9h-9.3h-5.6h-43.4h-4.7h-10.2c-1.7,0 -3.1,1.4 -3.1,3.1s1.4,3.1 3.1,3.1h10.2h3.9h45h4.8h9.3c1.7,0 3.1,-1.4 3.1,-3.1S244.1,226.9 242.4,226.9z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M194,223.5v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-1.6,0.7 -2.9,1.9 -3.8,3.4c-0.7,1.2 -1.1,2.5 -1.1,4c0,0.7 0.1,1.5 0.3,2.2c0.9,3.3 4,5.8 7.7,5.8c3.6,0 6.7,-2.5 7.7,-5.8c0.2,-0.7 0.3,-1.4 0.3,-2.2c0,-1.5 -0.4,-2.8 -1.1,-4C197,225.4 195.6,224.2 194,223.5z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M223.7,223.5v-17.5h7.5l-10.6,-18.7l-10.6,18.7h7.5v17.5c-1.6,0.7 -2.9,1.9 -3.8,3.4c-0.7,1.2 -1.1,2.5 -1.1,4c0,0.7 0.1,1.5 0.3,2.2c0.9,3.3 4,5.8 7.7,5.8c3.6,0 6.7,-2.5 7.7,-5.8c0.2,-0.7 0.3,-1.4 0.3,-2.2c0,-1.5 -0.4,-2.8 -1.1,-4C226.6,225.4 225.3,224.2 223.7,223.5z"
+ android:fillColor="#1A73E8"/>
+</vector>
diff --git a/res/drawable/accessibility_captions.png b/res/drawable/accessibility_captions.png
deleted file mode 100644
index 718f4ef..0000000
--- a/res/drawable/accessibility_captions.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/accessibility_captions_banner.xml b/res/drawable/accessibility_captions_banner.xml
new file mode 100644
index 0000000..6597ffb
--- /dev/null
+++ b/res/drawable/accessibility_captions_banner.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M383.9,300H28.1C12.6,300 0,287.4 0,271.9V28.1C0,12.6 12.6,0 28.1,0h355.8C399.4,0 412,12.6 412,28.1v243.8C412,287.4 399.4,300 383.9,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M79.2,179.6h53.6v8.5h-53.6z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M142.5,179.6h30.4v8.5h-30.4z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M79.2,195.5h79.2v8.5h-79.2z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M168.1,195.5h34.1v8.5h-34.1z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M211.9,195.5h34.1v8.5h-34.1z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M182.7,179.6h73.1v8.5h-73.1z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M265.5,179.6h26.8v8.5h-26.8z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M302.1,179.6h26.8v8.5h-26.8z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M142.7,67.9h-11.5c-1.6,0 -2.9,1.3 -2.9,2.9H67.8c-7.9,0 -14.4,6.5 -14.4,14.4v132.4c0,7.9 6.5,14.4 14.4,14.4h276.4c7.9,0 14.4,-6.5 14.4,-14.4V85.2c0,-7.9 -6.5,-14.4 -14.4,-14.4H203.1c0,-1.6 -1.3,-2.9 -2.9,-2.9h-28.8c-1.6,0 -2.9,1.3 -2.9,2.9h-23C145.5,69.2 144.3,67.9 142.7,67.9zM344.2,73.7c6.4,0 11.5,5.2 11.5,11.5v132.4c0,6.3 -5.2,11.5 -11.5,11.5H67.8c-6.4,0 -11.5,-5.2 -11.5,-11.5V85.2c0,-6.3 5.2,-11.5 11.5,-11.5H344.2z"
+ android:fillColor="#DADCE0"/>
+</vector>
diff --git a/res/drawable/accessibility_shortcut_type_hardware.png b/res/drawable/accessibility_shortcut_type_hardware.png
deleted file mode 100644
index 664ceb3..0000000
--- a/res/drawable/accessibility_shortcut_type_hardware.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/accessibility_shortcut_type_hardware.xml b/res/drawable/accessibility_shortcut_type_hardware.xml
new file mode 100644
index 0000000..b6b227b
--- /dev/null
+++ b/res/drawable/accessibility_shortcut_type_hardware.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M287,187.8v-1.5h2.9v-13.7c0,-1.6 -1.3,-2.9 -2.9,-2.9v-23.2c1.6,0 2.9,-1.3 2.9,-2.9V132c0,-1.6 -1.3,-2.9 -2.9,-2.9V68.4c0,-8 -6.5,-14.5 -14.5,-14.5H139.4c-8,0 -14.5,6.5 -14.5,14.5v185.3c1,0.7 1.9,1.4 2.9,2.1V68.4c0,-6.4 5.2,-11.6 11.6,-11.6h133.1c6.4,0 11.6,5.2 11.6,11.6v188.7c1,-0.7 1.9,-1.4 2.9,-2.2v-50.5c1.6,0 2.9,-1.3 2.9,-2.9v-13.7L287,187.8L287,187.8z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M287,204.4c1.6,0 2.9,-1.3 2.9,-2.9v-14H287v-0.9h2.9v-14c0,-1.6 -1.3,-2.9 -2.9,-2.9"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M206.7,19.1c35,0 67.9,13.6 92.6,38.4C324,82.1 337.6,115 337.6,150s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C89.4,217.9 75.7,185 75.7,150s13.6,-67.9 38.4,-92.6C138.9,32.7 171.7,19.1 206.7,19.1M206.7,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.1,17.1 206.7,17.1L206.7,17.1z"
+ android:fillColor="#E8EAED"/>
+</vector>
diff --git a/res/drawable/accessibility_shortcut_type_software.png b/res/drawable/accessibility_shortcut_type_software.png
deleted file mode 100644
index 0212548..0000000
--- a/res/drawable/accessibility_shortcut_type_software.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/accessibility_shortcut_type_software.xml b/res/drawable/accessibility_shortcut_type_software.xml
new file mode 100644
index 0000000..d0573aa
--- /dev/null
+++ b/res/drawable/accessibility_shortcut_type_software.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
+ android:fillColor="#fff"/>
+ <path
+ android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
+ android:fillColor="#dadce0"/>
+ <path
+ android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
+ android:fillColor="#e8eaed"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M286.7,210.83a11.59,11.59 0,0 1,-11.58 11.58H142a11.59,11.59 0,0 1,-11.58 -11.58V183.26H286.7Z"/>
+ <path
+ android:pathData="M250.41,193.38a1.77,1.77 0,1 1,-1.78 1.77A1.77,1.77 0,0 1,250.41 193.38ZM253.07,199.58v11.53h-1.78v-5.32h-1.77v5.32h-1.77L247.75,199.58a30.78,30.78 0,0 1,-5.32 -0.89l0.44,-1.77a32.34,32.34 0,0 0,15.07 0l0.45,1.77A30.78,30.78 0,0 1,253.07 199.58Z"
+ android:fillColor="#fff"/>
+ <path
+ android:pathData="M208.55,202.84m-6.13,0a6.13,6.13 0,1 1,12.26 0a6.13,6.13 0,1 1,-12.26 0"
+ android:fillColor="#bdc1c6"/>
+ <path
+ android:pathData="M250.41,202.84m-22.28,0a22.28,22.28 0,1 1,44.56 0a22.28,22.28 0,1 1,-44.56 0"
+ android:strokeWidth="2"
+ android:fillColor="#00000000"
+ android:strokeColor="#1a73e8"/>
+ <path
+ android:pathData="M160.45,202.84l10.43,6.02l0,-12.05l-10.43,6.03z"
+ android:fillColor="#bdc1c6"/>
+</vector>
diff --git a/res/drawable/accessibility_shortcut_type_software_floating.xml b/res/drawable/accessibility_shortcut_type_software_floating.xml
index 9582015..88ce42d 100644
--- a/res/drawable/accessibility_shortcut_type_software_floating.xml
+++ b/res/drawable/accessibility_shortcut_type_software_floating.xml
@@ -15,54 +15,25 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="180dp"
- android:height="180dp"
- android:viewportWidth="180"
- android:viewportHeight="180">
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
<path
- android:pathData="M90,90m-89,0a89,89 0,1 1,178 0a89,89 0,1 1,-178 0"
- android:strokeWidth="2"
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
+ android:fillColor="#fff"/>
+ <path
+ android:pathData="M142,225.3H275.1a14.51,14.51 0,0 0,14.5 -14.5V69a2.9,2.9 0,0 0,2.9 -2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7V210.8a11.61,11.61 0,0 1,-11.6 11.6H142a11.61,11.61 0,0 1,-11.6 -11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1V210.9A14.62,14.62 0,0 0,142 225.3Z"
+ android:fillColor="#dadce0"/>
+ <path
+ android:strokeWidth="1"
+ android:pathData="M286.7,144.13H266a19.63,19.63 0,1 0,0 39.26H286.7"
android:fillColor="#00000000"
- android:strokeColor="#ECEEEF"/>
- <group>
- <clip-path
- android:pathData="M90,90m-87,0a87,87 0,1 1,174 0a87,87 0,1 1,-174 0"/>
- <path
- android:pathData="M35.4,-70.9L144.6,-70.9A6.3,6.3 0,0 1,150.9 -64.6L150.9,137.6A6.3,6.3 0,0 1,144.6 143.9L35.4,143.9A6.3,6.3 0,0 1,29.1 137.6L29.1,-64.6A6.3,6.3 0,0 1,35.4 -70.9z"
- android:strokeWidth="1.8"
- android:fillColor="#F2F3F4"
- android:strokeColor="#DADCE0"/>
- <group>
- <clip-path
- android:pathData="M35.4,-70.9L144.6,-70.9A6.3,6.3 0,0 1,150.9 -64.6L150.9,137.6A6.3,6.3 0,0 1,144.6 143.9L35.4,143.9A6.3,6.3 0,0 1,29.1 137.6L29.1,-64.6A6.3,6.3 0,0 1,35.4 -70.9z"/>
- <path
- android:pathData="M40.4,-69L140.6,-69A5.4,5.4 0,0 1,146 -63.6L146,132.6A5.4,5.4 0,0 1,140.6 138L40.4,138A5.4,5.4 0,0 1,35 132.6L35,-63.6A5.4,5.4 0,0 1,40.4 -69z"
- android:fillColor="#ffffff"/>
- <group>
- <clip-path
- android:pathData="M40.4,-69L140.6,-69A5.4,5.4 0,0 1,146 -63.6L146,132.6A5.4,5.4 0,0 1,140.6 138L40.4,138A5.4,5.4 0,0 1,35 132.6L35,-63.6A5.4,5.4 0,0 1,40.4 -69z"/>
- <path
- android:strokeWidth="1"
- android:pathData="M132,90.5L158,90.5A14.5,14.5 0,0 1,172.5 105L172.5,105A14.5,14.5 0,0 1,158 119.5L132,119.5A14.5,14.5 0,0 1,117.5 105L117.5,105A14.5,14.5 0,0 1,132 90.5z"
- android:fillColor="#ffffff"
- android:strokeColor="#DADCE0"/>
- <path
- android:pathData="M132.4,105m-11.2,0a11.2,11.2 0,1 1,22.4 0a11.2,11.2 0,1 1,-22.4 0"
- android:fillColor="#80868B"/>
- <path
- android:pathData="M133.467,100.733C133.467,101.32 132.987,101.8 132.4,101.8C131.813,101.8 131.333,101.32 131.333,100.733C131.333,100.147 131.813,99.666 132.4,99.666C132.987,99.666 133.467,100.147 133.467,100.733ZM132.4,102.333C133.909,102.333 135.541,102.173 136.933,101.8L137.2,102.867C136.208,103.133 135.067,103.309 134,103.4V110.333H132.933V107.133H131.867V110.333H130.8V103.4C129.733,103.309 128.592,103.133 127.6,102.867L127.867,101.8C129.259,102.173 130.891,102.333 132.4,102.333Z"
- android:fillColor="#ffffff"
- android:fillType="evenOdd"/>
- <path
- android:pathData="M121.719,120.653C121.719,121.29 121.198,121.81 120.562,121.81C119.927,121.81 119.406,121.29 119.406,120.653C119.406,120.017 119.927,119.497 120.562,119.497C121.198,119.497 121.719,120.017 121.719,120.653ZM120.562,122.533C122.38,122.533 124.346,122.316 126.023,121.81L126.344,123.255C125.149,123.617 123.774,123.855 122.49,123.978V133.374H121.205V129.038H119.92V133.374H118.635V123.978C117.351,123.855 115.976,123.617 114.781,123.255L115.102,121.81C116.779,122.316 118.745,122.533 120.562,122.533Z"
- android:fillColor="#ffffff"
- android:fillType="evenOdd"/>
- <group>
- <clip-path
- android:pathData="M121.719,120.653C121.719,121.29 121.198,121.81 120.562,121.81C119.927,121.81 119.406,121.29 119.406,120.653C119.406,120.017 119.927,119.497 120.562,119.497C121.198,119.497 121.719,120.017 121.719,120.653ZM120.562,122.533C122.38,122.533 124.346,122.316 126.023,121.81L126.344,123.255C125.149,123.617 123.774,123.855 122.49,123.978V133.374H121.205V129.038H119.92V133.374H118.635V123.978C117.351,123.855 115.976,123.617 114.781,123.255L115.102,121.81C116.779,122.316 118.745,122.533 120.562,122.533Z"
- android:fillType="evenOdd"/>
- </group>
- </group>
- </group>
- </group>
+ android:strokeColor="#dadce0"/>
+ <path
+ android:pathData="M266,148.65a15.11,15.11 0,1 0,15.1 15.11A15.11,15.11 0,0 0,266 148.65ZM266,155.93a1.59,1.59 0,0 1,0 3.17,1.59 1.59,0 1,1 0,-3.17ZM268.37,161.47v10.29h-1.58L266.79,167h-1.59v4.75h-1.58L263.62,161.47a27.23,27.23 0,0 1,-4.75 -0.79l0.4,-1.58a29.06,29.06 0,0 0,13.46 0l0.39,1.58A27.23,27.23 0,0 1,268.33 161.47Z"
+ android:fillColor="#5f6368"/>
+ <path
+ android:pathData="M207.4,19.1a131.11,131.11 0,0 1,131 131,131 131,0 0,1 -262,-0.1 130.94,130.94 0,0 1,131 -130.9m0,-2A132.9,132.9 0,1 0,340.3 150,133 133,0 0,0 207.4,17.1Z"
+ android:fillColor="#e8eaed"/>
</vector>
diff --git a/res/drawable/accessibility_shortcut_type_software_gesture.png b/res/drawable/accessibility_shortcut_type_software_gesture.png
deleted file mode 100644
index 0a2921a..0000000
--- a/res/drawable/accessibility_shortcut_type_software_gesture.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/accessibility_shortcut_type_software_gesture.xml b/res/drawable/accessibility_shortcut_type_software_gesture.xml
new file mode 100644
index 0000000..514dd51
--- /dev/null
+++ b/res/drawable/accessibility_shortcut_type_software_gesture.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M842.3,299.9H485.9c-15.3,0 -27.8,-12.8 -27.8,-28.5v-243c0,-15.7 12.5,-28.5 27.8,-28.5h356.5c15.2,0 27.7,12.8 27.7,28.5v243.2C870.1,287.1 857.6,299.9 842.3,299.9z"/>
+ <path
+ android:pathData="M597.6,225.2h133.1c8,0 14.5,-6.5 14.5,-14.5V68.9c1.6,0 2.9,-1.3 2.9,-2.9V49c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7v166.4c0,6.4 -5.2,11.6 -11.6,11.6H597.6c-6.4,0 -11.6,-5.2 -11.6,-11.6V42.6c-1,0.7 -1.9,1.4 -2.9,2.1v166.1C583.2,218.7 589.7,225.2 597.6,225.2z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M688,207.8h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2H688c1.1,0 2,-0.9 2,-2S689.1,207.8 688,207.8z"
+ android:fillColor="#80868B"/>
+ <path
+ android:pathData="M656.5,205.6v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C659.7,208.3 658.3,206.4 656.5,205.6z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M675.8,205.6v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C679,208.3 677.7,206.4 675.8,205.6z"
+ android:fillColor="#669DF6"/>
+ <path
+ android:pathData="M664.2,19c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4c-24.7,-24.8 -38.4,-57.7 -38.4,-92.7s13.6,-67.9 38.4,-92.6C596.3,32.6 629.2,19 664.2,19M664.2,17c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S737.6,17 664.2,17L664.2,17z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M139.4,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9v-17c-1.9,-1.6 -3.8,-3.2 -5.8,-4.7v166.4c0,6.4 -5.2,11.6 -11.6,11.6H139.4c-6.4,0 -11.6,-5.2 -11.6,-11.6V42.7c-1,0.7 -1.9,1.4 -2.9,2.1v166.1C125,218.8 131.5,225.3 139.4,225.3z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M198.4,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C201.5,208.4 200.1,206.5 198.4,205.7z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M217.6,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2s5.2,-2.3 5.2,-5.2C220.9,208.4 219.5,206.5 217.6,205.7z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M206.1,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6s-13.6,67.9 -38.4,92.6c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4S75.1,185 75.1,150s13.6,-67.9 38.4,-92.6C138.2,32.7 171.1,19.1 206.1,19.1M206.1,17.1c-73.4,0 -133,59.5 -133,132.9S132.6,282.9 206,282.9S339,223.4 339,150S279.5,17.1 206.1,17.1L206.1,17.1z"
+ android:fillColor="#E8EAED"/>
+</vector>
diff --git a/res/drawable/accessibility_shortcut_type_software_gesture_talkback.png b/res/drawable/accessibility_shortcut_type_software_gesture_talkback.png
deleted file mode 100644
index 85fec85..0000000
--- a/res/drawable/accessibility_shortcut_type_software_gesture_talkback.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/accessibility_shortcut_type_software_gesture_talkback.xml b/res/drawable/accessibility_shortcut_type_software_gesture_talkback.xml
new file mode 100644
index 0000000..9388e66
--- /dev/null
+++ b/res/drawable/accessibility_shortcut_type_software_gesture_talkback.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
+ <path
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M138,225.3h133.1c8,0 14.5,-6.5 14.5,-14.5V69c1.6,0 2.9,-1.3 2.9,-2.9V45.7c-1.9,-1.5 -3.8,-2.9 -5.8,-4.3v169.4c0,6.4 -5.2,11.6 -11.6,11.6H138c-6.4,0 -11.6,-5.2 -11.6,-11.6V43.5c-1,0.7 -1.9,1.5 -2.9,2.2v165C123.5,218.8 130,225.3 138,225.3z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M206,283.9c-73.9,0 -133.9,-60.1 -133.9,-133.9S132.1,16.1 206,16.1c73.9,0 133.9,60.1 133.9,133.9S279.9,283.9 206,283.9zM206,18.1C133.2,18.1 74.1,77.2 74.1,150S133.2,281.9 206,281.9S337.9,222.8 337.9,150S278.8,18.1 206,18.1z"
+ android:fillColor="#E8EAED"/>
+ <path
+ android:pathData="M229.9,207.9h-47.8c-1.1,0 -2,0.9 -2,2s0.9,2 2,2h47.8c1.1,0 2,-0.9 2,-2S231,207.9 229.9,207.9z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M190.9,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C194.1,208.4 192.8,206.5 190.9,205.7z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M208,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C211.2,208.4 209.9,206.5 208,205.7z"
+ android:fillColor="#1A73E8"/>
+ <path
+ android:pathData="M225.1,205.7v-11.4h4.9l-6.9,-12.2l-6.9,12.2h4.9v11.4c-1.9,0.8 -3.2,2.6 -3.2,4.8c0,2.9 2.3,5.2 5.2,5.2c2.9,0 5.2,-2.3 5.2,-5.2C228.2,208.4 226.9,206.5 225.1,205.7z"
+ android:fillColor="#1A73E8"/>
+</vector>
diff --git a/res/drawable/accessibility_shortcut_type_triple_tap.png b/res/drawable/accessibility_shortcut_type_triple_tap.png
deleted file mode 100644
index 6a08d29..0000000
--- a/res/drawable/accessibility_shortcut_type_triple_tap.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_illustration_fullscreen.xml b/res/drawable/ic_illustration_fullscreen.xml
index fbb62bf..2aca693 100644
--- a/res/drawable/ic_illustration_fullscreen.xml
+++ b/res/drawable/ic_illustration_fullscreen.xml
@@ -14,26 +14,48 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="77dp"
- android:height="134dp"
- android:viewportWidth="77"
- android:viewportHeight="134">
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
<path
- android:pathData="M69.6,1.1H7.4C3.921,1.1 1.1,3.921 1.1,7.4V126.6C1.1,130.079 3.921,132.9 7.4,132.9H69.6C73.079,132.9 75.9,130.079 75.9,126.6V7.4C75.9,3.921 73.079,1.1 69.6,1.1Z"
- android:strokeWidth="1.8"
- android:fillColor="#F2F3F4"
- android:strokeColor="#DADCE0"/>
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
<path
- android:pathData="M66.642,5H10.358C7.399,5 5,7.418 5,10.4V123.6C5,126.582 7.399,129 10.358,129H66.642C69.601,129 72,126.582 72,123.6V10.4C72,7.418 69.601,5 66.642,5Z"
- android:fillColor="#ffffff"/>
+ android:pathData="M207.4,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6S324.8,218 300,242.7c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C90.1,217.9 76.4,185 76.4,150S90,82.1 114.8,57.4C139.5,32.7 172.4,19.1 207.4,19.1M207.4,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.8,17.1 207.4,17.1L207.4,17.1z"
+ android:fillColor="#E8EAED"/>
<path
- android:pathData="M66,10H11C10.448,10 10,10.448 10,11V123C10,123.552 10.448,124 11,124H66C66.552,124 67,123.552 67,123V11C67,10.448 66.552,10 66,10ZM11,5C7.686,5 5,7.686 5,11V123C5,126.314 7.686,129 11,129H66C69.314,129 72,126.314 72,123V11C72,7.686 69.314,5 66,5H11Z"
- android:fillColor="#F29900"
- android:fillType="evenOdd"/>
+ android:pathData="M262.1,107.7V100c0,-1.1 -0.9,-1.9 -1.9,-1.9V57.6c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,109.6 262.1,108.7 262.1,107.7zM258.2,242.4c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7V57.6c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V242.4z"
+ android:fillColor="#DADCE0"/>
<path
- android:pathData="M49.077,15V19.314H54.612L48,25.958L51.037,29L57.692,22.334V27.921H62V15H49.077Z"
- android:fillColor="#F29900"/>
+ android:pathData="M250.5,53.9c2,0 3.7,1.7 3.7,3.7v184.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7V57.6c0,-2 1.7,-3.7 3.7,-3.7H250.5M250.5,49.9H162c-4.2,0 -7.7,3.5 -7.7,7.7v184.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7V57.6C258.2,53.4 254.8,49.9 250.5,49.9L250.5,49.9z"
+ android:fillColor="#F9AB00"/>
<path
- android:pathData="M25.963,105L19.308,111.655V106.077H15V119H27.923V114.692H22.366L29,108.037L25.963,105Z"
- android:fillColor="#F29900"/>
+ android:pathData="M236.9,60.6l11,0l0,11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M247.9,60.6L232.3,76.2"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M175.2,240.1l-10.9,0l0,-11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M164.3,240.1L179.9,224.5"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
</vector>
diff --git a/res/drawable/ic_illustration_switch.xml b/res/drawable/ic_illustration_switch.xml
index 9d3990b..bfe533c 100644
--- a/res/drawable/ic_illustration_switch.xml
+++ b/res/drawable/ic_illustration_switch.xml
@@ -14,33 +14,29 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="77dp"
- android:height="134dp"
- android:viewportWidth="77"
- android:viewportHeight="134">
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
<path
- android:pathData="M69.6,1.1H7.4C3.921,1.1 1.1,3.921 1.1,7.4V126.6C1.1,130.079 3.921,132.9 7.4,132.9H69.6C73.079,132.9 75.9,130.079 75.9,126.6V7.4C75.9,3.921 73.079,1.1 69.6,1.1Z"
- android:strokeWidth="1.8"
- android:fillColor="#F2F3F4"
- android:strokeColor="#DADCE0"/>
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
<path
- android:pathData="M66.642,5H10.358C7.399,5 5,7.418 5,10.4V123.6C5,126.582 7.399,129 10.358,129H66.642C69.601,129 72,126.582 72,123.6V10.4C72,7.418 69.601,5 66.642,5Z"
- android:fillColor="#ffffff"/>
+ android:pathData="M207.4,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6S324.8,218 300,242.7c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C90.1,217.9 76.4,185 76.4,150S90,82.1 114.8,57.4C139.5,32.7 172.4,19.1 207.4,19.1M207.4,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.8,17.1 207.4,17.1L207.4,17.1z"
+ android:fillColor="#E8EAED"/>
<path
- android:pathData="M63,94H39V118H63V94Z"
- android:fillColor="#000000"
- android:fillAlpha="0.7"/>
+ android:pathData="M262.1,107.7V100c0,-1.1 -0.9,-1.9 -1.9,-1.9V57.6c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9V127c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,109.6 262.1,108.7 262.1,107.7zM258.2,242.4c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7V57.6c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V242.4z"
+ android:fillColor="#DADCE0"/>
<path
- android:pathData="M43,106V114H59V98H51V99.6H57.4V112.4H44.6V106H43Z"
- android:fillColor="#ffffff"/>
+ android:pathData="M250.5,53.9c2,0 3.7,1.7 3.7,3.7v184.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7V57.6c0,-2 1.7,-3.7 3.7,-3.7L250.5,53.9M250.5,49.9H162c-4.2,0 -7.7,3.5 -7.7,7.7v184.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7V57.6C258.2,53.4 254.8,49.9 250.5,49.9L250.5,49.9z"
+ android:fillColor="#F9AB00"/>
<path
- android:pathData="M49.4,98H43V104.4H49.4V98Z"
- android:fillColor="#ffffff"/>
+ android:pathData="M214.2,223.8v17.5h34.9v-34.9h-17.5v3.5h14v27.9h-27.9v-14H214.2z"
+ android:fillColor="#5F6368"/>
<path
- android:pathData="M55.8,105.2V106.8H52.928L56.56,110.432L55.432,111.56L51.8,107.928V110.8H50.2V105.2H55.8Z"
- android:fillColor="#ffffff"/>
+ android:pathData="M228.2,206.3h-14v14h14V206.3z"
+ android:fillColor="#5F6368"/>
<path
- android:pathData="M66,10H11C10.448,10 10,10.448 10,11V123C10,123.552 10.448,124 11,124H66C66.552,124 67,123.552 67,123V11C67,10.448 66.552,10 66,10ZM11,5C7.686,5 5,7.686 5,11V123C5,126.314 7.686,129 11,129H66C69.314,129 72,126.314 72,123V11C72,7.686 69.314,5 66,5H11Z"
- android:fillColor="#F29900"
- android:fillType="evenOdd"/>
+ android:pathData="M242.2,222.1v3.5h-6.3l7.9,7.9l-2.5,2.5l-7.9,-7.9v6.3h-3.5v-12.2H242.2z"
+ android:fillColor="#5F6368"/>
</vector>
diff --git a/res/drawable/ic_illustration_window.xml b/res/drawable/ic_illustration_window.xml
index 1b87d7d..22513f4 100644
--- a/res/drawable/ic_illustration_window.xml
+++ b/res/drawable/ic_illustration_window.xml
@@ -14,28 +14,48 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="77dp"
- android:height="134dp"
- android:viewportWidth="77"
- android:viewportHeight="134">
+ android:width="412dp"
+ android:height="300dp"
+ android:viewportWidth="412"
+ android:viewportHeight="300">
<path
- android:pathData="M69.6,1.1H7.4C3.921,1.1 1.1,3.921 1.1,7.4V126.6C1.1,130.079 3.921,132.9 7.4,132.9H69.6C73.079,132.9 75.9,130.079 75.9,126.6V7.4C75.9,3.921 73.079,1.1 69.6,1.1Z"
- android:strokeWidth="1.8"
- android:fillColor="#F2F3F4"
- android:strokeColor="#DADCE0"/>
+ android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
+ android:fillColor="#FFFFFF"/>
<path
- android:pathData="M66.642,5H10.358C7.399,5 5,7.418 5,10.4V123.6C5,126.582 7.399,129 10.358,129H66.642C69.601,129 72,126.582 72,123.6V10.4C72,7.418 69.601,5 66.642,5Z"
- android:fillColor="#ffffff"/>
+ android:pathData="M207.4,19.1c35,0 67.9,13.6 92.6,38.4c24.7,24.7 38.4,57.6 38.4,92.6S324.8,218 300,242.7c-24.7,24.7 -57.6,38.4 -92.6,38.4s-67.9,-13.6 -92.6,-38.4C90.1,217.9 76.4,185 76.4,150S90,82.1 114.8,57.4C139.5,32.7 172.4,19.1 207.4,19.1M207.4,17.1c-73.4,0 -133,59.5 -133,132.9s59.5,132.9 132.9,132.9s133,-59.5 133,-132.9S280.8,17.1 207.4,17.1L207.4,17.1z"
+ android:fillColor="#E8EAED"/>
<path
- android:pathData="M63,48H14C12.895,48 12,48.895 12,50V85C12,86.105 12.895,87 14,87H63C64.105,87 65,86.105 65,85V50C65,48.895 64.105,48 63,48Z"
- android:strokeLineJoin="bevel"
- android:strokeWidth="5"
+ android:pathData="M262.1,107.7V100c0,-1.1 -0.9,-1.9 -1.9,-1.9V57.6c0,-5.3 -4.3,-9.6 -9.6,-9.6H162c-5.3,0 -9.6,4.3 -9.6,9.6v184.8c0,5.3 4.3,9.6 9.6,9.6h88.5c5.3,0 9.6,-4.3 9.6,-9.6v-94.3c1.1,0 1.9,-0.9 1.9,-1.9v-19.2c0,-1.1 -0.9,-1.9 -1.9,-1.9v-15.4C261.2,109.6 262.1,108.7 262.1,107.7zM258.2,242.4c0,4.2 -3.5,7.7 -7.7,7.7H162c-4.2,0 -7.7,-3.5 -7.7,-7.7V57.6c0,-4.2 3.5,-7.7 7.7,-7.7h88.5c4.2,0 7.7,3.5 7.7,7.7V242.4z"
+ android:fillColor="#DADCE0"/>
+ <path
+ android:pathData="M250.5,118.9c2,0 3.7,1.7 3.7,3.7v54.8c0,2 -1.7,3.7 -3.7,3.7H162c-2,0 -3.7,-1.7 -3.7,-3.7v-54.8c0,-2 1.7,-3.7 3.7,-3.7H250.5M250.5,114.9H162c-4.2,0 -7.7,3.5 -7.7,7.7v54.8c0,4.2 3.5,7.7 7.7,7.7h88.5c4.2,0 7.7,-3.5 7.7,-7.7v-54.8C258.2,118.4 254.8,114.9 250.5,114.9L250.5,114.9z"
+ android:fillColor="#F9AB00"/>
+ <path
+ android:pathData="M236.9,125.6l11,0l0,11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
android:fillColor="#00000000"
- android:strokeColor="#F29900"/>
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
<path
- android:pathData="M46.077,54V58.314H51.612L45,64.958L48.037,68L54.692,61.334V66.921H59V54H46.077Z"
- android:fillColor="#F29900"/>
+ android:pathData="M247.9,125.6L232.3,141.2"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
<path
- android:pathData="M28.963,67L22.308,73.655V68.077H18V81H30.923V76.692H25.366L32,70.037L28.963,67Z"
- android:fillColor="#F29900"/>
+ android:pathData="M175.2,175.1l-10.9,0l0,-11"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M164.3,175.1L179.9,159.5"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#F9AB00"
+ android:strokeLineCap="round"/>
</vector>
diff --git a/res/layout/accessibility_button_preview.xml b/res/layout/accessibility_button_preview.xml
deleted file mode 100644
index 07cb0ff..0000000
--- a/res/layout/accessibility_button_preview.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2021 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.
--->
-
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:clipToPadding="false"
- android:importantForAccessibility="noHideDescendants">
-
- <ImageView
- android:id="@+id/preview_image"
- android:layout_width="match_parent"
- android:layout_height="@dimen/accessibility_button_preview_height"
- android:layout_gravity="center"
- android:scaleType="fitCenter"
- android:focusable="false"
- android:clickable="false"
- android:adjustViewBounds="true"/>
-</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/accessibility_captions_preview.xml b/res/layout/accessibility_captions_preview.xml
deleted file mode 100644
index 1818e64..0000000
--- a/res/layout/accessibility_captions_preview.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2020 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.
--->
-
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="@dimen/captioning_preview_height"
- android:contentDescription="@null"
- android:scaleType="fitCenter"
- android:src="@drawable/accessibility_captions" />
-
-</FrameLayout>
diff --git a/res/layout/accessibility_edit_shortcut_component.xml b/res/layout/accessibility_edit_shortcut_component.xml
index 0d3324f..d54fff6 100644
--- a/res/layout/accessibility_edit_shortcut_component.xml
+++ b/res/layout/accessibility_edit_shortcut_component.xml
@@ -53,11 +53,9 @@
</LinearLayout>
- <ImageView
- android:id="@+id/image"
- android:layout_width="@dimen/accessibility_imageview_size"
- android:layout_height="@dimen/accessibility_imageview_size"
- android:layout_marginStart="44dp"
- android:scaleType="fitCenter" />
+ <include layout="@layout/accessibility_lottie_animation_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="44dp"/>
</LinearLayout>
diff --git a/res/layout/accessibility_lottie_animation_view.xml b/res/layout/accessibility_lottie_animation_view.xml
new file mode 100644
index 0000000..f4638be
--- /dev/null
+++ b/res/layout/accessibility_lottie_animation_view.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2021 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
+ -->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/illustration_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+
+ <ImageView
+ android:id="@+id/image_background"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:maxHeight="@dimen/accessibility_imageview_size"
+ android:src="@drawable/protection_background"
+ android:adjustViewBounds="true"/>
+
+ <com.airbnb.lottie.LottieAnimationView
+ android:id="@+id/image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:maxHeight="@dimen/accessibility_imageview_size"
+ android:adjustViewBounds="true"/>
+
+</FrameLayout>
diff --git a/res/layout/battery_chart_graph.xml b/res/layout/battery_chart_graph.xml
index db86693..e89c912 100644
--- a/res/layout/battery_chart_graph.xml
+++ b/res/layout/battery_chart_graph.xml
@@ -40,12 +40,14 @@
android:contentDescription="@string/battery_usage_chart"
android:textAppearance="?android:attr/textAppearanceSmall"
settings:textColor="?android:attr/textColorSecondary" />
+ <!-- Use non-scalable text size from text_size_small_material -->
<TextView
android:id="@+id/companion_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary"/>
+ android:textColor="?android:attr/textColorSecondary"
+ android:textSize="14dp" />
</LinearLayout>
diff --git a/res/layout/dialog_single_radio_choice_list_item.xml b/res/layout/dialog_single_radio_choice_list_item.xml
index 49ef352..106a8a5 100644
--- a/res/layout/dialog_single_radio_choice_list_item.xml
+++ b/res/layout/dialog_single_radio_choice_list_item.xml
@@ -55,7 +55,7 @@
<ImageView
android:id="@+id/image"
- android:layout_width="@dimen/accessibility_imageview_size"
+ android:layout_width="match_parent"
android:layout_height="@dimen/accessibility_imageview_size"
android:layout_marginTop="16dp"
android:scaleType="fitStart"
diff --git a/res/layout/panel_layout.xml b/res/layout/panel_layout.xml
index 9e15f15..4258c20 100644
--- a/res/layout/panel_layout.xml
+++ b/res/layout/panel_layout.xml
@@ -18,8 +18,9 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/panel_container"
- android:layout_width="match_parent"
+ android:layout_width="@dimen/settings_panel_width"
android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
android:background="@drawable/settings_panel_rounded_top_corner_background" >
<LinearLayout
diff --git a/res/raw/accessibility_shortcut_type_triple_tap.json b/res/raw/accessibility_shortcut_type_triple_tap.json
new file mode 100644
index 0000000..870e671
--- /dev/null
+++ b/res/raw/accessibility_shortcut_type_triple_tap.json
@@ -0,0 +1,1959 @@
+{
+ "v": "5.6.5",
+ "fr": 60,
+ "ip": 0,
+ "op": 180,
+ "w": 412,
+ "h": 300,
+ "nm": "Triple_Tap_Screen",
+ "ddd": 0,
+ "assets": [
+ {
+ "id": "comp_0",
+ "layers": [
+ {
+ "ddd": 0,
+ "ind": 1,
+ "ty": 4,
+ "nm": ".white",
+ "cl": "white",
+ "hd": true,
+ "sr": 1,
+ "ks": {
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 11
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 10
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 206,
+ 150,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100,
+ 100
+ ],
+ "ix": 6
+ }
+ },
+ "ao": 0,
+ "shapes": [
+ {
+ "ty": "gr",
+ "it": [
+ {
+ "ind": 0,
+ "ty": "sh",
+ "ix": 1,
+ "ks": {
+ "a": 0,
+ "k": {
+ "i": [
+ [
+ 15.4,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 15.4
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -15.4,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ -15.4
+ ],
+ [
+ 0,
+ 0
+ ]
+ ],
+ "o": [
+ [
+ 0,
+ 0
+ ],
+ [
+ -15.4,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ -15.4
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 15.4,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 15.4
+ ]
+ ],
+ "v": [
+ [
+ 178,
+ 150
+ ],
+ [
+ -178,
+ 150
+ ],
+ [
+ -206,
+ 122
+ ],
+ [
+ -206,
+ -122
+ ],
+ [
+ -178,
+ -150
+ ],
+ [
+ 178,
+ -150
+ ],
+ [
+ 206,
+ -122
+ ],
+ [
+ 206,
+ 122
+ ]
+ ],
+ "c": true
+ },
+ "ix": 2
+ },
+ "nm": "Path 1",
+ "mn": "ADBE Vector Shape - Group",
+ "hd": false
+ },
+ {
+ "ty": "fl",
+ "c": {
+ "a": 0,
+ "k": [
+ 1,
+ 1,
+ 1,
+ 1
+ ],
+ "ix": 4
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 5
+ },
+ "r": 1,
+ "bm": 0,
+ "nm": "Fill 1",
+ "mn": "ADBE Vector Graphic - Fill",
+ "hd": false
+ },
+ {
+ "ty": "tr",
+ "p": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100
+ ],
+ "ix": 3
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 6
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 7
+ },
+ "sk": {
+ "a": 0,
+ "k": 0,
+ "ix": 4
+ },
+ "sa": {
+ "a": 0,
+ "k": 0,
+ "ix": 5
+ },
+ "nm": "Transform"
+ }
+ ],
+ "nm": "Group 1",
+ "np": 2,
+ "cix": 2,
+ "bm": 0,
+ "ix": 1,
+ "mn": "ADBE Vector Group",
+ "hd": false
+ }
+ ],
+ "ip": 0,
+ "op": 1800,
+ "st": 0,
+ "bm": 0
+ }
+ ]
+ }
+ ],
+ "layers": [
+ {
+ "ddd": 0,
+ "ind": 1,
+ "ty": 4,
+ "nm": ".grey200",
+ "cl": "grey200",
+ "sr": 1,
+ "ks": {
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 11
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 10
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 206,
+ 150,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 1.35,
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100,
+ 100
+ ],
+ "ix": 6
+ }
+ },
+ "ao": 0,
+ "shapes": [
+ {
+ "ty": "gr",
+ "it": [
+ {
+ "ind": 0,
+ "ty": "sh",
+ "ix": 1,
+ "ks": {
+ "a": 0,
+ "k": {
+ "i": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ -73.4
+ ],
+ [
+ -73.4,
+ 0
+ ],
+ [
+ 0,
+ 73.4
+ ],
+ [
+ 73.4,
+ 0
+ ]
+ ],
+ "o": [
+ [
+ -73.4,
+ 0
+ ],
+ [
+ 0,
+ 73.4
+ ],
+ [
+ 73.4,
+ 0
+ ],
+ [
+ 0,
+ -73.4
+ ],
+ [
+ 0,
+ 0
+ ]
+ ],
+ "v": [
+ [
+ 1.4,
+ -132.9
+ ],
+ [
+ -131.6,
+ 0
+ ],
+ [
+ 1.3,
+ 132.9
+ ],
+ [
+ 134.3,
+ 0
+ ],
+ [
+ 1.4,
+ -132.9
+ ]
+ ],
+ "c": true
+ },
+ "ix": 2
+ },
+ "nm": "Path 1",
+ "mn": "ADBE Vector Shape - Group",
+ "hd": false
+ },
+ {
+ "ind": 1,
+ "ty": "sh",
+ "ix": 2,
+ "ks": {
+ "a": 0,
+ "k": {
+ "i": [
+ [
+ 0,
+ 0
+ ],
+ [
+ -24.7,
+ -24.8
+ ],
+ [
+ 0,
+ -35
+ ],
+ [
+ 24.8,
+ -24.7
+ ],
+ [
+ 35,
+ 0
+ ],
+ [
+ 24.7,
+ 24.8
+ ],
+ [
+ 0,
+ 35
+ ],
+ [
+ -24.8,
+ 24.7
+ ],
+ [
+ -35,
+ 0
+ ]
+ ],
+ "o": [
+ [
+ 35,
+ 0
+ ],
+ [
+ 24.7,
+ 24.7
+ ],
+ [
+ 0,
+ 35
+ ],
+ [
+ -24.7,
+ 24.7
+ ],
+ [
+ -35,
+ 0
+ ],
+ [
+ -24.7,
+ -24.8
+ ],
+ [
+ 0,
+ -35
+ ],
+ [
+ 24.7,
+ -24.7
+ ],
+ [
+ 0,
+ 0
+ ]
+ ],
+ "v": [
+ [
+ 1.4,
+ -130.9
+ ],
+ [
+ 94,
+ -92.5
+ ],
+ [
+ 132.4,
+ 0.1
+ ],
+ [
+ 94,
+ 92.7
+ ],
+ [
+ 1.4,
+ 131.1
+ ],
+ [
+ -91.2,
+ 92.7
+ ],
+ [
+ -129.6,
+ 0
+ ],
+ [
+ -91.2,
+ -92.6
+ ],
+ [
+ 1.4,
+ -130.9
+ ]
+ ],
+ "c": false
+ },
+ "ix": 2
+ },
+ "nm": "Path 2",
+ "mn": "ADBE Vector Shape - Group",
+ "hd": false
+ },
+ {
+ "ty": "fl",
+ "c": {
+ "a": 0,
+ "k": [
+ 0.909803926945,
+ 0.917647063732,
+ 0.929411768913,
+ 1
+ ],
+ "ix": 4
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 5
+ },
+ "r": 1,
+ "bm": 0,
+ "nm": "Fill 1",
+ "mn": "ADBE Vector Graphic - Fill",
+ "hd": false
+ },
+ {
+ "ty": "tr",
+ "p": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100
+ ],
+ "ix": 3
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 6
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 7
+ },
+ "sk": {
+ "a": 0,
+ "k": 0,
+ "ix": 4
+ },
+ "sa": {
+ "a": 0,
+ "k": 0,
+ "ix": 5
+ },
+ "nm": "Transform"
+ }
+ ],
+ "nm": "Group 1",
+ "np": 3,
+ "cix": 2,
+ "bm": 0,
+ "ix": 1,
+ "mn": "ADBE Vector Group",
+ "hd": false
+ }
+ ],
+ "ip": 0,
+ "op": 300,
+ "st": 0,
+ "bm": 0
+ },
+ {
+ "ddd": 0,
+ "ind": 2,
+ "ty": 4,
+ "nm": ".grey300",
+ "cl": "grey300",
+ "sr": 1,
+ "ks": {
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 11
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 10
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 205,
+ 150,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100,
+ 100
+ ],
+ "ix": 6
+ }
+ },
+ "ao": 0,
+ "shapes": [
+ {
+ "ty": "gr",
+ "it": [
+ {
+ "ty": "gr",
+ "it": [
+ {
+ "ind": 0,
+ "ty": "sh",
+ "ix": 1,
+ "ks": {
+ "a": 0,
+ "k": {
+ "i": [
+ [
+ -7.9,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 8
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 1.6
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 2,
+ 1.5
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 6.4,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 6.4
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 1,
+ -0.7
+ ],
+ [
+ 0,
+ 0
+ ]
+ ],
+ "o": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 8,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 1.6,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -1.9,
+ -1.6
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0,
+ 6.4
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -6.4,
+ 0
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ -1,
+ 0.7
+ ],
+ [
+ 0,
+ 0
+ ],
+ [
+ 0.1,
+ 7.9
+ ]
+ ],
+ "v": [
+ [
+ -64,
+ 75.3
+ ],
+ [
+ 69.1,
+ 75.3
+ ],
+ [
+ 83.6,
+ 60.8
+ ],
+ [
+ 83.6,
+ -81
+ ],
+ [
+ 86.5,
+ -83.9
+ ],
+ [
+ 86.5,
+ -100.9
+ ],
+ [
+ 80.7,
+ -105.6
+ ],
+ [
+ 80.7,
+ 60.8
+ ],
+ [
+ 69.1,
+ 72.4
+ ],
+ [
+ -64,
+ 72.4
+ ],
+ [
+ -75.6,
+ 60.8
+ ],
+ [
+ -75.6,
+ -107.3
+ ],
+ [
+ -78.5,
+ -105.2
+ ],
+ [
+ -78.5,
+ 60.9
+ ]
+ ],
+ "c": true
+ },
+ "ix": 2
+ },
+ "nm": "Path 1",
+ "mn": "ADBE Vector Shape - Group",
+ "hd": false
+ },
+ {
+ "ty": "fl",
+ "c": {
+ "a": 0,
+ "k": [
+ 0.854901969433,
+ 0.86274510622,
+ 0.878431379795,
+ 1
+ ],
+ "ix": 4
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 5
+ },
+ "r": 1,
+ "bm": 0,
+ "nm": "Fill 1",
+ "mn": "ADBE Vector Graphic - Fill",
+ "hd": false
+ },
+ {
+ "ty": "tr",
+ "p": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100
+ ],
+ "ix": 3
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 6
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 7
+ },
+ "sk": {
+ "a": 0,
+ "k": 0,
+ "ix": 4
+ },
+ "sa": {
+ "a": 0,
+ "k": 0,
+ "ix": 5
+ },
+ "nm": "Transform"
+ }
+ ],
+ "nm": "Group 1",
+ "np": 2,
+ "cix": 2,
+ "bm": 0,
+ "ix": 1,
+ "mn": "ADBE Vector Group",
+ "hd": false
+ },
+ {
+ "ty": "tr",
+ "p": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100
+ ],
+ "ix": 3
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 6
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 7
+ },
+ "sk": {
+ "a": 0,
+ "k": 0,
+ "ix": 4
+ },
+ "sa": {
+ "a": 0,
+ "k": 0,
+ "ix": 5
+ },
+ "nm": "Transform"
+ }
+ ],
+ "nm": "Group 1",
+ "np": 1,
+ "cix": 2,
+ "bm": 0,
+ "ix": 1,
+ "mn": "ADBE Vector Group",
+ "hd": false
+ }
+ ],
+ "ip": 0,
+ "op": 300,
+ "st": 0,
+ "bm": 0
+ },
+ {
+ "ddd": 0,
+ "ind": 3,
+ "ty": 4,
+ "nm": "cursor 5",
+ "sr": 1,
+ "ks": {
+ "o": {
+ "a": 1,
+ "k": [
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 36,
+ "s": [
+ 0
+ ]
+ },
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 39.582,
+ "s": [
+ 100
+ ]
+ },
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 44.953,
+ "s": [
+ 100
+ ]
+ },
+ {
+ "t": 55.697265625,
+ "s": [
+ 0
+ ]
+ }
+ ],
+ "ix": 11
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 10
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 207.641,
+ 154.48,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ -180.5,
+ -165.5,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 1,
+ "k": [
+ {
+ "i": {
+ "x": [
+ 0,
+ 0,
+ 0
+ ],
+ "y": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "o": {
+ "x": [
+ 0.45,
+ 0.45,
+ 0.45
+ ],
+ "y": [
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "t": 37.791,
+ "s": [
+ 27.252,
+ 27.252,
+ 100
+ ]
+ },
+ {
+ "t": 59,
+ "s": [
+ 56.661,
+ 56.661,
+ 100
+ ]
+ }
+ ],
+ "ix": 6
+ }
+ },
+ "ao": 0,
+ "shapes": [
+ {
+ "ty": "gr",
+ "it": [
+ {
+ "d": 1,
+ "ty": "el",
+ "s": {
+ "a": 0,
+ "k": [
+ 63.109,
+ 63.109
+ ],
+ "ix": 2
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 3
+ },
+ "nm": "Ellipse Path 1",
+ "mn": "ADBE Vector Shape - Ellipse",
+ "hd": false
+ },
+ {
+ "ty": "st",
+ "c": {
+ "a": 0,
+ "k": [
+ 1,
+ 0.182245725744,
+ 0.894323072246,
+ 1
+ ],
+ "ix": 3
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 4
+ },
+ "w": {
+ "a": 0,
+ "k": 3,
+ "ix": 5
+ },
+ "lc": 1,
+ "lj": 1,
+ "ml": 4,
+ "bm": 0,
+ "nm": "Stroke 1",
+ "mn": "ADBE Vector Graphic - Stroke",
+ "hd": false
+ },
+ {
+ "ty": "fl",
+ "c": {
+ "a": 0,
+ "k": [
+ 1,
+ 0.522196631338,
+ 0.9762855081,
+ 1
+ ],
+ "ix": 4
+ },
+ "o": {
+ "a": 0,
+ "k": 50,
+ "ix": 5
+ },
+ "r": 1,
+ "bm": 0,
+ "nm": "Fill 1",
+ "mn": "ADBE Vector Graphic - Fill",
+ "hd": false
+ },
+ {
+ "ty": "tr",
+ "p": {
+ "a": 0,
+ "k": [
+ -180.5,
+ -165.5
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100
+ ],
+ "ix": 3
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 6
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 7
+ },
+ "sk": {
+ "a": 0,
+ "k": 0,
+ "ix": 4
+ },
+ "sa": {
+ "a": 0,
+ "k": 0,
+ "ix": 5
+ },
+ "nm": "Transform"
+ }
+ ],
+ "nm": "Ellipse 1",
+ "np": 3,
+ "cix": 2,
+ "bm": 0,
+ "ix": 1,
+ "mn": "ADBE Vector Group",
+ "hd": false
+ }
+ ],
+ "ip": 36,
+ "op": 59,
+ "st": -1,
+ "bm": 0
+ },
+ {
+ "ddd": 0,
+ "ind": 4,
+ "ty": 4,
+ "nm": "cursor 4",
+ "sr": 1,
+ "ks": {
+ "o": {
+ "a": 1,
+ "k": [
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 22,
+ "s": [
+ 0
+ ]
+ },
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 25.58,
+ "s": [
+ 100
+ ]
+ },
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 30.953,
+ "s": [
+ 100
+ ]
+ },
+ {
+ "t": 41.697265625,
+ "s": [
+ 0
+ ]
+ }
+ ],
+ "ix": 11
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 10
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 207.641,
+ 154.48,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ -180.5,
+ -165.5,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 1,
+ "k": [
+ {
+ "i": {
+ "x": [
+ 0,
+ 0,
+ 0
+ ],
+ "y": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "o": {
+ "x": [
+ 0.45,
+ 0.45,
+ 0.45
+ ],
+ "y": [
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "t": 23.789,
+ "s": [
+ 27.252,
+ 27.252,
+ 100
+ ]
+ },
+ {
+ "t": 45,
+ "s": [
+ 56.661,
+ 56.661,
+ 100
+ ]
+ }
+ ],
+ "ix": 6
+ }
+ },
+ "ao": 0,
+ "shapes": [
+ {
+ "ty": "gr",
+ "it": [
+ {
+ "d": 1,
+ "ty": "el",
+ "s": {
+ "a": 0,
+ "k": [
+ 63.109,
+ 63.109
+ ],
+ "ix": 2
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 3
+ },
+ "nm": "Ellipse Path 1",
+ "mn": "ADBE Vector Shape - Ellipse",
+ "hd": false
+ },
+ {
+ "ty": "st",
+ "c": {
+ "a": 0,
+ "k": [
+ 1,
+ 0.182245725744,
+ 0.894323072246,
+ 1
+ ],
+ "ix": 3
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 4
+ },
+ "w": {
+ "a": 0,
+ "k": 3,
+ "ix": 5
+ },
+ "lc": 1,
+ "lj": 1,
+ "ml": 4,
+ "bm": 0,
+ "nm": "Stroke 1",
+ "mn": "ADBE Vector Graphic - Stroke",
+ "hd": false
+ },
+ {
+ "ty": "fl",
+ "c": {
+ "a": 0,
+ "k": [
+ 1,
+ 0.522196631338,
+ 0.9762855081,
+ 1
+ ],
+ "ix": 4
+ },
+ "o": {
+ "a": 0,
+ "k": 50,
+ "ix": 5
+ },
+ "r": 1,
+ "bm": 0,
+ "nm": "Fill 1",
+ "mn": "ADBE Vector Graphic - Fill",
+ "hd": false
+ },
+ {
+ "ty": "tr",
+ "p": {
+ "a": 0,
+ "k": [
+ -180.5,
+ -165.5
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100
+ ],
+ "ix": 3
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 6
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 7
+ },
+ "sk": {
+ "a": 0,
+ "k": 0,
+ "ix": 4
+ },
+ "sa": {
+ "a": 0,
+ "k": 0,
+ "ix": 5
+ },
+ "nm": "Transform"
+ }
+ ],
+ "nm": "Ellipse 1",
+ "np": 3,
+ "cix": 2,
+ "bm": 0,
+ "ix": 1,
+ "mn": "ADBE Vector Group",
+ "hd": false
+ }
+ ],
+ "ip": 22,
+ "op": 45,
+ "st": -3,
+ "bm": 0
+ },
+ {
+ "ddd": 0,
+ "ind": 5,
+ "ty": 4,
+ "nm": "cursor",
+ "sr": 1,
+ "ks": {
+ "o": {
+ "a": 1,
+ "k": [
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 8,
+ "s": [
+ 0
+ ]
+ },
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 11.582,
+ "s": [
+ 100
+ ]
+ },
+ {
+ "i": {
+ "x": [
+ 0.833
+ ],
+ "y": [
+ 0.833
+ ]
+ },
+ "o": {
+ "x": [
+ 0.167
+ ],
+ "y": [
+ 0.167
+ ]
+ },
+ "t": 16.953,
+ "s": [
+ 100
+ ]
+ },
+ {
+ "t": 27.697265625,
+ "s": [
+ 0
+ ]
+ }
+ ],
+ "ix": 11
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 10
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 207.641,
+ 154.48,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ -180.5,
+ -165.5,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 1,
+ "k": [
+ {
+ "i": {
+ "x": [
+ 0,
+ 0,
+ 0
+ ],
+ "y": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ "o": {
+ "x": [
+ 0.45,
+ 0.45,
+ 0.45
+ ],
+ "y": [
+ 0,
+ 0,
+ 0
+ ]
+ },
+ "t": 9.791,
+ "s": [
+ 27.252,
+ 27.252,
+ 100
+ ]
+ },
+ {
+ "t": 31,
+ "s": [
+ 56.661,
+ 56.661,
+ 100
+ ]
+ }
+ ],
+ "ix": 6
+ }
+ },
+ "ao": 0,
+ "shapes": [
+ {
+ "ty": "gr",
+ "it": [
+ {
+ "d": 1,
+ "ty": "el",
+ "s": {
+ "a": 0,
+ "k": [
+ 63.109,
+ 63.109
+ ],
+ "ix": 2
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 3
+ },
+ "nm": "Ellipse Path 1",
+ "mn": "ADBE Vector Shape - Ellipse",
+ "hd": false
+ },
+ {
+ "ty": "st",
+ "c": {
+ "a": 0,
+ "k": [
+ 1,
+ 0.182245725744,
+ 0.894323072246,
+ 1
+ ],
+ "ix": 3
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 4
+ },
+ "w": {
+ "a": 0,
+ "k": 3,
+ "ix": 5
+ },
+ "lc": 1,
+ "lj": 1,
+ "ml": 4,
+ "bm": 0,
+ "nm": "Stroke 1",
+ "mn": "ADBE Vector Graphic - Stroke",
+ "hd": false
+ },
+ {
+ "ty": "fl",
+ "c": {
+ "a": 0,
+ "k": [
+ 1,
+ 0.522196631338,
+ 0.9762855081,
+ 1
+ ],
+ "ix": 4
+ },
+ "o": {
+ "a": 0,
+ "k": 50,
+ "ix": 5
+ },
+ "r": 1,
+ "bm": 0,
+ "nm": "Fill 1",
+ "mn": "ADBE Vector Graphic - Fill",
+ "hd": false
+ },
+ {
+ "ty": "tr",
+ "p": {
+ "a": 0,
+ "k": [
+ -180.5,
+ -165.5
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 0,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100
+ ],
+ "ix": 3
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 6
+ },
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 7
+ },
+ "sk": {
+ "a": 0,
+ "k": 0,
+ "ix": 4
+ },
+ "sa": {
+ "a": 0,
+ "k": 0,
+ "ix": 5
+ },
+ "nm": "Transform"
+ }
+ ],
+ "nm": "Ellipse 1",
+ "np": 3,
+ "cix": 2,
+ "bm": 0,
+ "ix": 1,
+ "mn": "ADBE Vector Group",
+ "hd": false
+ }
+ ],
+ "ip": 8,
+ "op": 31,
+ "st": -5,
+ "bm": 0
+ },
+ {
+ "ddd": 0,
+ "ind": 6,
+ "ty": 0,
+ "nm": "BG_White",
+ "refId": "comp_0",
+ "sr": 1,
+ "ks": {
+ "o": {
+ "a": 0,
+ "k": 100,
+ "ix": 11
+ },
+ "r": {
+ "a": 0,
+ "k": 0,
+ "ix": 10
+ },
+ "p": {
+ "a": 0,
+ "k": [
+ 206,
+ 150,
+ 0
+ ],
+ "ix": 2
+ },
+ "a": {
+ "a": 0,
+ "k": [
+ 206,
+ 150,
+ 0
+ ],
+ "ix": 1
+ },
+ "s": {
+ "a": 0,
+ "k": [
+ 100,
+ 100,
+ 100
+ ],
+ "ix": 6
+ }
+ },
+ "ao": 0,
+ "w": 412,
+ "h": 300,
+ "ip": 0,
+ "op": 1800,
+ "st": 0,
+ "bm": 0
+ }
+ ],
+ "markers": []
+}
\ No newline at end of file
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 241471c..45c28dd 100755
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -66,4 +66,6 @@
<!-- Padding for screen pinning -->
<dimen name="screen_pinning_padding_start">40dp</dimen>
<dimen name="screen_pinning_padding_end">40dp</dimen>
+
+ <dimen name="settings_panel_width">560dp</dimen>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 1b8179a..2cd944a 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -426,6 +426,7 @@
<!-- Settings panel related dimensions -->
<dimen name="settings_panel_corner_radius">28dp</dimen>
<dimen name="settings_panel_title_margin">24dp</dimen>
+ <dimen name="settings_panel_width">@dimen/match_parent</dimen>
<!-- Text padding for EmptyTextSettings -->
<dimen name="empty_text_padding">24dp</dimen>
@@ -437,7 +438,7 @@
<dimen name="chartview_text_padding">6dp</dimen>
<dimen name="chartview_divider_width">1dp</dimen>
<dimen name="chartview_divider_height">4dp</dimen>
- <dimen name="chartview_trapezoid_radius">3dp</dimen>
+ <dimen name="chartview_trapezoid_radius">5dp</dimen>
<dimen name="chartview_trapezoid_margin_start">1dp</dimen>
<dimen name="chartview_trapezoid_margin_bottom">2dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0a9a70a..f50f5a2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5259,8 +5259,18 @@
<string name="select_to_speak_summary">Tap items on your screen to hear them read aloud</string>
<!-- Title for the accessibility preference screen to enable video captioning. [CHAR LIMIT=35] -->
<string name="accessibility_captioning_title">Caption preferences</string>
+ <!-- Title for accessibility captioning footer. [CHAR LIMIT=60] -->
+ <string name="accessibility_captioning_about_title">About caption preferences</string>
+ <!-- Accessibility captioning footer link content description [CHAR LIMIT=NONE] -->
+ <string name="accessibility_captioning_footer_learn_more_content_description">Learn more about caption preferences</string>
<!-- Title for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
<string name="accessibility_screen_magnification_title">Magnification</string>
+ <!-- Title for accessibility shortcut preference for magnification. [CHAR LIMIT=60] -->
+ <string name="accessibility_screen_magnification_shortcut_title">Magnification shortcut</string>
+ <!-- Title for screen magnification footer. [CHAR LIMIT=60] -->
+ <string name="accessibility_screen_magnification_about_title">About magnification</string>
+ <!-- Screen magnification footer link content description [CHAR LIMIT=NONE] -->
+ <string name="accessibility_screen_magnification_footer_learn_more_content_description">Learn more about magnification</string>
<!-- Title for the accessibility preference screen to edit magnification area. [CHAR LIMIT=35] -->
<string name="accessibility_magnification_mode_title">Magnification type</string>
<!-- Message for the accessibility preference screen to edit magnification area dialog. [CHAR LIMIT=none] -->
@@ -5411,14 +5421,20 @@
<string name="accessibility_button_title">Accessibility button</string>
<!-- Title for the accessibility button & gesture page. [CHAR LIMIT=35] -->
<string name="accessibility_button_gesture_title">Accessibility button & gesture</string>
+ <!-- Title for the accessibility button footer. [CHAR LIMIT=35] -->
+ <string name="accessibility_button_about_title">About accessibility button</string>
+ <!-- Title for the accessibility button & gesture footer. [CHAR LIMIT=55] -->
+ <string name="accessibility_button_gesture_about_title">About accessibility button & gesture</string>
+ <!-- Accessibility button & gestures footer link content description [CHAR LIMIT=NONE] -->
+ <string name="accessibility_button_gesture_footer_learn_more_content_description">Learn more about accessibility button & gesture</string>
<!-- Intro for the accessibility button page. [CHAR LIMIT=100] -->
<string name="accessibility_button_intro">Using the accessibility button. The gesture isn\u2019t available with 3-button navigation.</string>
<!-- Summary text for the accessibility button preference. [CHAR LIMIT=50] -->
<string name="accessibility_button_summary">Quickly access accessibility features</string>
<!-- Description for the accessibility button in gesture navigation. Explain how this page works. [CHAR LIMIT=NONE] -->
- <string name="accessibility_button_gesture_description">Quickly access accessibility features from any screen.\n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button.\n\nTo use the accessibility button in the navigation bar instead, switch to 2-button navigation or 3-button navigation.</string>
+ <string name="accessibility_button_gesture_description">Quickly access accessibility features from any screen.\n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button or gesture.</string>
<!-- Description for the accessibility button page. Explain how this page works. [CHAR LIMIT=NONE] -->
- <string name="accessibility_button_description">Quickly access accessibility features from any screen. \n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button.</string>
+ <string name="accessibility_button_description">Quickly access accessibility features from any screen.\n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button.</string>
<!-- Title for the button or gesture of the accessibility button. [CHAR LIMIT=35] -->
<string name="accessibility_button_or_gesture_title">Use button or gesture</string>
<!-- Title for the location of the accessibility button. [CHAR LIMIT=35] -->
@@ -5472,6 +5488,10 @@
<string name="accessibility_timeout_2mins">2 minutes</string>
<!-- Title for accessibility settings timeout item. [CHAR LIMIT=43] -->
<string name="accessibility_setting_item_control_timeout_title">Time to take action (Accessibility timeout)</string>
+ <!-- Title for accessibility timeout footer. [CHAR LIMIT=65] -->
+ <string name="accessibility_control_timeout_about_title">About time to take action (Accessibility timeout)</string>
+ <!-- Accessibility timeout footer link content description [CHAR LIMIT=NONE] -->
+ <string name="accessibility_control_timeout_footer_learn_more_content_description">Learn more about time to take action (Accessibility timeout)</string>
<!-- Title for accessibility preference to accessibility timeout. [CHAR LIMIT=35] -->
<string name="accessibility_control_timeout_preference_title">Time to take action</string>
<!-- Descriptive text for accessibility preference to accessibility control timeout. [CHAR LIMIT=NONE] -->
@@ -5483,6 +5503,8 @@
<string name="accessibility_display_inversion_preference_title">Color inversion</string>
<!-- Used in the accessibility service settings to control turning display color inversion on/off entirely. [CHAR LIMIT=NONE] -->
<string name="accessibility_display_inversion_switch_title">Use color inversion</string>
+ <!-- Title for accessibility shortcut preference for color inversion. [CHAR LIMIT=60] -->
+ <string name="accessibility_display_inversion_shortcut_title">Color inversion shortcut</string>
<!-- Subtitle for the accessibility preference to configure display color inversion. [CHAR LIMIT=NONE] -->
<string name="accessibility_display_inversion_preference_subtitle">
<![CDATA[Color inversion turns light screens dark.<br/><br/>
@@ -5496,6 +5518,10 @@
</string>
<!-- Title for accessibility preference for configuring feature that performs click action soon after mouse/trackpad pointer stops moving. [CHAR LIMIT=NONE] -->
<string name="accessibility_autoclick_preference_title">Autoclick (dwell timing)</string>
+ <!-- Title for accessibility dwell timing footer. [CHAR LIMIT=NONE] -->
+ <string name="accessibility_autoclick_about_title">About autoclick (dwell timing)</string>
+ <!-- Accessibility dwell timing footer link content description [CHAR LIMIT=NONE] -->
+ <string name="accessibility_autoclick_footer_learn_more_content_description">Learn more about autoclick (dwell timing)</string>
<!-- Footer text to explain what autoclick does -->
<string name="accessibility_autoclick_description">Autoclick works with a connected mouse. You can set the mouse cursor to click automatically when the cursor stops moving for a certain amount of time.</string>
<!-- Option heading to leave the auto click requirement for accessibility users at its default level. [CHAR LIMIT=50] -->
@@ -5534,6 +5560,16 @@
<string name="accessibility_service_primary_open_title">Open <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
<!-- Used in the Color correction settings screen to control turning on/off the feature entirely [CHAR LIMIT=60] -->
<string name="accessibility_daltonizer_primary_switch_title">Use color correction</string>
+ <!-- Title for accessibility shortcut preference for color correction. [CHAR LIMIT=60] -->
+ <string name="accessibility_daltonizer_shortcut_title">Color correction shortcut</string>
+ <!-- Title for Color correction footer. [CHAR LIMIT=35] -->
+ <string name="accessibility_daltonizer_about_title">About color correction</string>
+ <!-- Color inversion footer link content description [CHAR LIMIT=NONE] -->
+ <string name="accessibility_daltonizer_footer_learn_more_content_description">Learn more about color correction</string>
+ <!-- Title for Color inversion footer. [CHAR LIMIT=35] -->
+ <string name="accessibility_color_inversion_about_title">About color inversion</string>
+ <!-- Color correction footer link content description [CHAR LIMIT=NONE] -->
+ <string name="accessibility_color_inversion_footer_learn_more_content_description">Learn more about color inversion</string>
<!-- Title for Captions settings screen to control turning on/off the feature entirely [CHAR LIMIT=60] -->
<string name="accessibility_caption_primary_switch_title">Show captions</string>
<!-- Summary for Captions settings screen to control turning on/off the feature entirely [CHAR LIMIT=NONE] -->
@@ -5613,6 +5649,10 @@
<string name="reduce_bright_colors_preference_title">Extra dim</string>
<!-- Title for the activation switch of the Reduce Brightness feature. [CHAR LIMIT=NONE] -->
<string name="reduce_bright_colors_switch_title">Make screen extra dim</string>
+ <!-- Title for accessibility shortcut preference for Reduce Brightness. [CHAR LIMIT=60] -->
+ <string name="reduce_bright_colors_shortcut_title">Extra dim shortcut</string>
+ <!-- Title for Reduce Brightness feature footer. [CHAR LIMIT=35] -->
+ <string name="reduce_bright_colors_about_title">About extra dim</string>
<!-- Summary for the accessibility preference to configure Reduce Brightness feature. [CHAR LIMIT=NONE] -->
<string name="reduce_bright_colors_preference_summary" product="default">Dim screen beyond your phone\u2019s minimum brightness</string>
<!-- Summary for the accessibility preference to configure Reduce Brightness feature. [CHAR LIMIT=NONE] -->
@@ -6619,10 +6659,6 @@
<string name="battery_system_usage_for">System usage for <xliff:g id="slot">%s</xliff:g></string>
<!-- [CHAR_LIMIT=NONE] Battery app usage section header -->
<string name="battery_app_usage_for">App usage for <xliff:g id="slot">%s</xliff:g></string>
- <!-- [CHAR_LIMIT=NONE] Battery usage section header for a specific time slot -->
- <string name="battery_usage_time_am">am</string>
- <!-- [CHAR_LIMIT=NONE] Battery usage section header for a specific time slot -->
- <string name="battery_usage_time_pm">pm</string>
<!-- [CHAR_LIMIT=NONE] Battery usage item for total usage time less than a minute -->
<string name="battery_usage_total_less_than_one_minute">Total: less than a min</string>
<!-- [CHAR_LIMIT=NONE] Battery usage item for total background time less than a minute -->
@@ -11759,6 +11795,8 @@
<string name="one_handed_title">One-handed mode</string>
<!-- Preference Switch for enabling one handed [CHAR LIMIT=60] -->
<string name="one_handed_mode_enabled">Use one-handed mode</string>
+ <!-- Title for accessibility shortcut preference for enabling one handed. [CHAR LIMIT=60] -->
+ <string name="one_handed_mode_shortcut_title">One-handed mode shortcut</string>
<!-- Search keywords for "One-Handed" settings [CHAR_LIMIT=NONE] -->
<string name="keywords_one_handed">reachability</string>
<!-- Category title for one handed swipe down [CHAR_LIMIT=60] -->
diff --git a/res/xml/accessibility_button_settings.xml b/res/xml/accessibility_button_settings.xml
index 02b1c7d..86dd087 100644
--- a/res/xml/accessibility_button_settings.xml
+++ b/res/xml/accessibility_button_settings.xml
@@ -16,13 +16,10 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:settings="http://schemas.android.com/apk/res-auto"
- android:title="@string/accessibility_button_title">
+ xmlns:settings="http://schemas.android.com/apk/res-auto">
- <com.android.settingslib.widget.LayoutPreference
- android:key="caption_preview"
- android:title="@string/summary_placeholder"
- android:layout="@layout/accessibility_button_preview"
+ <com.android.settingslib.widget.IllustrationPreference
+ android:key="accessibility_button_preview"
android:selectable="false"
settings:searchable="false"
android:persistent="false"
@@ -38,6 +35,15 @@
settings:controller="com.android.settings.accessibility.AccessibilityButtonLocationPreferenceController"/>
<ListPreference
+ android:entries="@array/accessibility_button_gesture_selector_titles"
+ android:entryValues="@array/accessibility_button_gesture_selector_values"
+ android:key="accessibility_button_or_gesture"
+ android:title="@string/accessibility_button_or_gesture_title"
+ android:summary="%s"
+ android:persistent="false"
+ settings:controller="com.android.settings.accessibility.AccessibilityButtonGesturePreferenceController"/>
+
+ <ListPreference
android:entries="@array/accessibility_button_size_selector_titles"
android:entryValues="@array/accessibility_button_size_selector_values"
android:key="accessibility_button_size"
@@ -61,7 +67,6 @@
<com.android.settings.accessibility.AccessibilityFooterPreference
android:key="accessibility_button_footer"
- android:title="@string/accessibility_button_description"
android:persistent="false"
android:selectable="false"
settings:searchable="false"
diff --git a/res/xml/accessibility_shortcuts_settings.xml b/res/xml/accessibility_shortcuts_settings.xml
index 465f96d..2863335 100644
--- a/res/xml/accessibility_shortcuts_settings.xml
+++ b/res/xml/accessibility_shortcuts_settings.xml
@@ -25,8 +25,8 @@
android:fragment="com.android.settings.accessibility.AccessibilityButtonFragment"
android:key="accessibility_button_preference"
android:persistent="false"
- android:title="@string/accessibility_button_title"
- android:summary="@string/accessibility_button_summary"/>
+ android:summary="@string/accessibility_button_summary"
+ settings:controller="com.android.settings.accessibility.AccessibilityButtonPreferenceController"/>
<SwitchPreference
android:key="accessibility_shortcut_preference"
diff --git a/res/xml/captioning_settings.xml b/res/xml/captioning_settings.xml
index b397146..f5059e5 100644
--- a/res/xml/captioning_settings.xml
+++ b/res/xml/captioning_settings.xml
@@ -21,12 +21,11 @@
android:persistent="false"
android:title="@string/accessibility_captioning_title">
- <com.android.settingslib.widget.LayoutPreference
+ <com.android.settingslib.widget.IllustrationPreference
android:key="captions_preview"
- android:layout="@layout/accessibility_captions_preview"
android:persistent="false"
android:selectable="false"
- android:title="@string/summary_placeholder"
+ settings:lottie_rawRes="@drawable/accessibility_captions_banner"
settings:searchable="false" />
<com.android.settings.widget.SettingsMainSwitchPreference
diff --git a/res/xml/smart_battery_detail.xml b/res/xml/smart_battery_detail.xml
index 9c0aac5..9795125 100644
--- a/res/xml/smart_battery_detail.xml
+++ b/res/xml/smart_battery_detail.xml
@@ -22,7 +22,7 @@
android:title="@string/smart_battery_manager_title"
settings:keywords="@string/keywords_battery_adaptive_preferences">
- <com.android.settingslib.widget.IllustrationPreferencee
+ <com.android.settingslib.widget.IllustrationPreference
android:key="auto_awesome_battery"
settings:lottie_rawRes="@raw/auto_awesome_battery_lottie" />
diff --git a/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceController.java b/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceController.java
index de90374..55b8019 100644
--- a/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceController.java
+++ b/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceController.java
@@ -33,21 +33,26 @@
}
@Override
- protected String getLabelName() {
- return mContext.getString(R.string.accessibility_button_title);
+ protected String getLearnMoreContentDescription() {
+ return mContext.getString(
+ R.string.accessibility_button_gesture_footer_learn_more_content_description);
+ }
+
+ @Override
+ protected String getIntroductionTitle() {
+ return mContext.getString(R.string.accessibility_button_about_title);
}
@Override
public void displayPreference(PreferenceScreen screen) {
// Need to update footerPreference's data before super.displayPreference(), then it will use
// data to update related property of footerPreference.
- if (AccessibilityUtil.isGestureNavigateEnabled(mContext)) {
- final AccessibilityFooterPreference footerPreference =
- screen.findPreference(getPreferenceKey());
- footerPreference.setTitle(
- mContext.getString(R.string.accessibility_button_gesture_description));
- }
-
+ final int titleResource = AccessibilityUtil.isGestureNavigateEnabled(mContext)
+ ? R.string.accessibility_button_gesture_description
+ : R.string.accessibility_button_description;
+ final AccessibilityFooterPreference footerPreference =
+ screen.findPreference(getPreferenceKey());
+ footerPreference.setTitle(titleResource);
super.displayPreference(screen);
}
}
diff --git a/src/com/android/settings/accessibility/AccessibilityButtonFragment.java b/src/com/android/settings/accessibility/AccessibilityButtonFragment.java
index 4e067d8..2df11a9 100644
--- a/src/com/android/settings/accessibility/AccessibilityButtonFragment.java
+++ b/src/com/android/settings/accessibility/AccessibilityButtonFragment.java
@@ -17,6 +17,7 @@
package com.android.settings.accessibility;
import android.app.settings.SettingsEnums;
+import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
@@ -30,6 +31,14 @@
private static final String TAG = "AccessibilityButtonFragment";
@Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ final int titleResource = AccessibilityUtil.isGestureNavigateEnabled(getPrefContext())
+ ? R.string.accessibility_button_gesture_title : R.string.accessibility_button_title;
+ getActivity().setTitle(titleResource);
+ }
+
+ @Override
protected int getPreferenceScreenResId() {
return R.xml.accessibility_button_settings;
}
diff --git a/src/com/android/settings/accessibility/AccessibilityButtonGesturePreferenceController.java b/src/com/android/settings/accessibility/AccessibilityButtonGesturePreferenceController.java
new file mode 100644
index 0000000..e6b49d0
--- /dev/null
+++ b/src/com/android/settings/accessibility/AccessibilityButtonGesturePreferenceController.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+package com.android.settings.accessibility;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+
+import com.android.settings.R;
+import com.android.settings.core.BasePreferenceController;
+
+import com.google.common.primitives.Ints;
+
+import java.util.Optional;
+
+/** Preference controller that controls the button or gesture in accessibility button page. */
+public class AccessibilityButtonGesturePreferenceController extends BasePreferenceController
+ implements Preference.OnPreferenceChangeListener {
+
+ private Optional<Integer> mDefaultGesture = Optional.empty();
+
+ public AccessibilityButtonGesturePreferenceController(Context context, String preferenceKey) {
+ super(context, preferenceKey);
+ }
+
+ @Override
+ public int getAvailabilityStatus() {
+ return AccessibilityUtil.isGestureNavigateEnabled(mContext)
+ ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ final ListPreference listPreference = (ListPreference) preference;
+ final Integer value = Ints.tryParse((String) newValue);
+ if (value != null) {
+ Settings.Secure.putInt(mContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_BUTTON_MODE, value);
+ updateState(listPreference);
+ }
+ return true;
+ }
+
+ @Override
+ public void updateState(Preference preference) {
+ super.updateState(preference);
+ final ListPreference listPreference = (ListPreference) preference;
+
+ listPreference.setValue(getCurrentAccessibilityButtonMode());
+ }
+
+ private String getCurrentAccessibilityButtonMode() {
+ final int mode = Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_BUTTON_MODE, getDefaultGestureValue());
+ return String.valueOf(mode);
+ }
+
+ private int getDefaultGestureValue() {
+ if (!mDefaultGesture.isPresent()) {
+ final String[] valuesList = mContext.getResources().getStringArray(
+ R.array.accessibility_button_gesture_selector_values);
+ mDefaultGesture = Optional.of(Integer.parseInt(valuesList[0]));
+ }
+ return mDefaultGesture.get();
+ }
+}
diff --git a/src/com/android/settings/accessibility/AccessibilityButtonLocationPreferenceController.java b/src/com/android/settings/accessibility/AccessibilityButtonLocationPreferenceController.java
index ed7cb27..167e08f 100644
--- a/src/com/android/settings/accessibility/AccessibilityButtonLocationPreferenceController.java
+++ b/src/com/android/settings/accessibility/AccessibilityButtonLocationPreferenceController.java
@@ -18,7 +18,6 @@
import android.content.Context;
import android.provider.Settings;
-import android.util.ArrayMap;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
@@ -28,16 +27,16 @@
import com.google.common.primitives.Ints;
+import java.util.Optional;
+
/** Preference controller that controls the preferred location in accessibility button page. */
public class AccessibilityButtonLocationPreferenceController extends BasePreferenceController
implements Preference.OnPreferenceChangeListener {
- private final ArrayMap<String, String> mValueTitleMap = new ArrayMap<>();
- private int mDefaultLocation;
+ private Optional<Integer> mDefaultLocation = Optional.empty();
public AccessibilityButtonLocationPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
- initValueTitleMap();
}
@Override
@@ -68,22 +67,16 @@
private String getCurrentAccessibilityButtonMode() {
final int mode = Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.ACCESSIBILITY_BUTTON_MODE, mDefaultLocation);
+ Settings.Secure.ACCESSIBILITY_BUTTON_MODE, getDefaultLocationValue());
return String.valueOf(mode);
}
- private void initValueTitleMap() {
- if (mValueTitleMap.size() == 0) {
- final String[] values = mContext.getResources().getStringArray(
+ private int getDefaultLocationValue() {
+ if (!mDefaultLocation.isPresent()) {
+ final String[] valuesList = mContext.getResources().getStringArray(
R.array.accessibility_button_location_selector_values);
- final String[] titles = mContext.getResources().getStringArray(
- R.array.accessibility_button_location_selector_titles);
- final int mapSize = values.length;
-
- mDefaultLocation = Integer.parseInt(values[0]);
- for (int i = 0; i < mapSize; i++) {
- mValueTitleMap.put(values[i], titles[i]);
- }
+ mDefaultLocation = Optional.of(Integer.parseInt(valuesList[0]));
}
+ return mDefaultLocation.get();
}
}
diff --git a/src/com/android/settings/accessibility/AccessibilityButtonPreferenceController.java b/src/com/android/settings/accessibility/AccessibilityButtonPreferenceController.java
new file mode 100644
index 0000000..f076472
--- /dev/null
+++ b/src/com/android/settings/accessibility/AccessibilityButtonPreferenceController.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+package com.android.settings.accessibility;
+
+import android.content.Context;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.core.BasePreferenceController;
+
+/**
+ * Preference controller for accessibility button preference.
+ */
+public class AccessibilityButtonPreferenceController extends BasePreferenceController {
+
+ public AccessibilityButtonPreferenceController(Context context, String key) {
+ super(context, key);
+ }
+
+ @Override
+ public int getAvailabilityStatus() {
+ return AVAILABLE;
+ }
+
+ @Override
+ public void displayPreference(PreferenceScreen screen) {
+ super.displayPreference(screen);
+ final int titleResource = AccessibilityUtil.isGestureNavigateEnabled(mContext)
+ ? R.string.accessibility_button_gesture_title : R.string.accessibility_button_title;
+ final Preference preference = screen.findPreference(getPreferenceKey());
+ preference.setTitle(titleResource);
+
+ }
+}
diff --git a/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceController.java b/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceController.java
index 69a7a46..c9f3c43 100644
--- a/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceController.java
+++ b/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceController.java
@@ -23,7 +23,7 @@
import android.os.Handler;
import android.os.Looper;
import android.provider.Settings;
-import android.widget.ImageView;
+import android.view.accessibility.AccessibilityManager;
import androidx.annotation.VisibleForTesting;
import androidx.preference.PreferenceScreen;
@@ -33,7 +33,7 @@
import com.android.settingslib.core.lifecycle.LifecycleObserver;
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
-import com.android.settingslib.widget.LayoutPreference;
+import com.android.settingslib.widget.IllustrationPreference;
/** Preference controller that controls the preview effect in accessibility button page. */
public class AccessibilityButtonPreviewPreferenceController extends BasePreferenceController
@@ -46,10 +46,12 @@
private final ContentResolver mContentResolver;
@VisibleForTesting
final ContentObserver mContentObserver;
- private FloatingMenuLayerDrawable mFloatingMenuPreviewDrawable;
-
+ private AccessibilityLayerDrawable mAccessibilityPreviewDrawable;
@VisibleForTesting
- ImageView mPreview;
+ IllustrationPreference mIllustrationPreference;
+
+ private AccessibilityManager.TouchExplorationStateChangeListener
+ mTouchExplorationStateChangeListener;
public AccessibilityButtonPreviewPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
@@ -60,6 +62,9 @@
updatePreviewPreference();
}
};
+ mTouchExplorationStateChangeListener = isTouchExplorationEnabled -> {
+ updatePreviewPreference();
+ };
}
@Override
@@ -70,14 +75,16 @@
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
- final LayoutPreference preference = screen.findPreference(getPreferenceKey());
- mPreview = preference.findViewById(R.id.preview_image);
+ mIllustrationPreference = screen.findPreference(getPreferenceKey());
updatePreviewPreference();
}
@Override
public void onResume() {
+ final AccessibilityManager am = mContext.getSystemService(AccessibilityManager.class);
+ am.addTouchExplorationStateChangeListener(mTouchExplorationStateChangeListener);
+
mContentResolver.registerContentObserver(
Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_MODE),
/* notifyForDescendants= */ false, mContentObserver);
@@ -91,6 +98,9 @@
@Override
public void onPause() {
+ final AccessibilityManager am = mContext.getSystemService(AccessibilityManager.class);
+ am.removeTouchExplorationStateChangeListener(mTouchExplorationStateChangeListener);
+
mContentResolver.unregisterContentObserver(mContentObserver);
}
@@ -103,24 +113,29 @@
final int floatingMenuIconId = (size == SMALL_SIZE)
? R.drawable.accessibility_button_preview_small_floating_menu
: R.drawable.accessibility_button_preview_large_floating_menu;
-
- mPreview.setImageDrawable(getFloatingMenuPreviewDrawable(floatingMenuIconId, opacity));
- // Only change opacity(alpha) would not invoke redraw view, need to invalidate manually.
- mPreview.invalidate();
+ mIllustrationPreference.setImageDrawable(
+ getAccessibilityPreviewDrawable(floatingMenuIconId, opacity));
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(mContext)) {
+ mIllustrationPreference.setImageDrawable(mContext.getDrawable(
+ AccessibilityUtil.isTouchExploreEnabled(mContext)
+ ? R.drawable.accessibility_button_preview_three_finger
+ : R.drawable.accessibility_button_preview_two_finger));
} else {
- mPreview.setImageDrawable(
+ mIllustrationPreference.setImageDrawable(
mContext.getDrawable(R.drawable.accessibility_button_navigation));
}
}
- private Drawable getFloatingMenuPreviewDrawable(int resId, int opacity) {
- if (mFloatingMenuPreviewDrawable == null) {
- mFloatingMenuPreviewDrawable = FloatingMenuLayerDrawable.createLayerDrawable(
+ private Drawable getAccessibilityPreviewDrawable(int resId, int opacity) {
+ if (mAccessibilityPreviewDrawable == null) {
+ mAccessibilityPreviewDrawable = AccessibilityLayerDrawable.createLayerDrawable(
mContext, resId, opacity);
} else {
- mFloatingMenuPreviewDrawable.updateLayerDrawable(mContext, resId, opacity);
+ mAccessibilityPreviewDrawable.updateLayerDrawable(mContext, resId, opacity);
+ // Only change alpha (opacity) value did not change drawable id. It needs to force to
+ // redraw.
+ mAccessibilityPreviewDrawable.invalidateSelf();
}
-
- return mFloatingMenuPreviewDrawable;
+ return mAccessibilityPreviewDrawable;
}
}
diff --git a/src/com/android/settings/accessibility/AccessibilityControlTimeoutFooterPreferenceController.java b/src/com/android/settings/accessibility/AccessibilityControlTimeoutFooterPreferenceController.java
index 0e65ac5..498b767 100644
--- a/src/com/android/settings/accessibility/AccessibilityControlTimeoutFooterPreferenceController.java
+++ b/src/com/android/settings/accessibility/AccessibilityControlTimeoutFooterPreferenceController.java
@@ -31,8 +31,14 @@
}
@Override
- protected String getLabelName() {
- return mContext.getString(R.string.accessibility_setting_item_control_timeout_title);
+ protected String getLearnMoreContentDescription() {
+ return mContext.getString(
+ R.string.accessibility_control_timeout_footer_learn_more_content_description);
+ }
+
+ @Override
+ protected String getIntroductionTitle() {
+ return mContext.getString(R.string.accessibility_control_timeout_about_title);
}
@Override
diff --git a/src/com/android/settings/accessibility/AccessibilityDialogUtils.java b/src/com/android/settings/accessibility/AccessibilityDialogUtils.java
index ffe5d6d..b353805 100644
--- a/src/com/android/settings/accessibility/AccessibilityDialogUtils.java
+++ b/src/com/android/settings/accessibility/AccessibilityDialogUtils.java
@@ -31,6 +31,7 @@
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ImageSpan;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AbsListView;
@@ -44,9 +45,11 @@
import android.widget.TextView;
import androidx.annotation.ColorInt;
+import androidx.annotation.DrawableRes;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.RawRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
@@ -54,6 +57,9 @@
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.utils.AnnotationSpan;
+import com.airbnb.lottie.LottieAnimationView;
+import com.airbnb.lottie.LottieDrawable;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;
@@ -63,6 +69,7 @@
* Utility class for creating the edit dialog.
*/
public class AccessibilityDialogUtils {
+ private static final String TAG = "AccessibilityDialogUtils";
/** Denotes the dialog emuns for show dialog. */
@Retention(RetentionPolicy.SOURCE)
@@ -315,9 +322,22 @@
}
private static void setupShortcutWidget(View view, CharSequence titleText,
- CharSequence summaryText, int imageResId) {
+ CharSequence summaryText, @DrawableRes int imageResId) {
+ setupShortcutWidgetWithTitleAndSummary(view, titleText, summaryText);
+ setupShortcutWidgetWithImageResource(view, imageResId);
+ }
+
+ private static void setupShortcutWidgetWithImageRawResource(View view, CharSequence titleText,
+ CharSequence summaryText, @RawRes int imageRawResId) {
+ setupShortcutWidgetWithTitleAndSummary(view, titleText, summaryText);
+ setupShortcutWidgetWithImageRawResource(view, imageRawResId);
+ }
+
+ private static void setupShortcutWidgetWithTitleAndSummary(View view, CharSequence titleText,
+ CharSequence summaryText) {
final CheckBox checkBox = view.findViewById(R.id.checkbox);
checkBox.setText(titleText);
+
final TextView summary = view.findViewById(R.id.summary);
if (TextUtils.isEmpty(summaryText)) {
summary.setVisibility(View.GONE);
@@ -326,8 +346,23 @@
summary.setMovementMethod(LinkMovementMethod.getInstance());
summary.setFocusable(false);
}
- final ImageView image = view.findViewById(R.id.image);
- image.setImageResource(imageResId);
+ }
+
+ private static void setupShortcutWidgetWithImageResource(View view,
+ @DrawableRes int imageResId) {
+ final ImageView imageView = view.findViewById(R.id.image);
+ imageView.setImageResource(imageResId);
+ }
+
+ private static void setupShortcutWidgetWithImageRawResource(View view,
+ @RawRes int imageRawResId) {
+ final LottieAnimationView lottieView = view.findViewById(R.id.image);
+ lottieView.setFailureListener(
+ result -> Log.w(TAG, "Invalid image raw resource id: " + imageRawResId,
+ result));
+ lottieView.setAnimation(imageRawResId);
+ lottieView.setRepeatCount(LottieDrawable.INFINITE);
+ lottieView.playAnimation();
}
private static void initSoftwareShortcutForSUW(Context context, View view) {
@@ -344,12 +379,11 @@
private static void initSoftwareShortcut(Context context, View view) {
final View dialogView = view.findViewById(R.id.software_shortcut);
- final CharSequence title = context.getText(
- R.string.accessibility_shortcut_edit_dialog_title_software);
final TextView summary = dialogView.findViewById(R.id.summary);
final int lineHeight = summary.getLineHeight();
- setupShortcutWidget(dialogView, title,
+ setupShortcutWidget(dialogView,
+ retrieveTitle(context),
retrieveSoftwareShortcutSummary(context, lineHeight),
retrieveSoftwareShortcutImageResId(context));
}
@@ -362,7 +396,6 @@
R.string.accessibility_shortcut_edit_dialog_summary_hardware);
setupShortcutWidget(dialogView, title, summary,
R.drawable.accessibility_shortcut_type_hardware);
- // TODO(b/142531156): Use vector drawable instead of temporal png file to avoid distorted.
}
private static void initMagnifyShortcut(Context context, View view) {
@@ -375,9 +408,8 @@
final Object[] arguments = {3};
summary = MessageFormat.format(summary, arguments);
- setupShortcutWidget(dialogView, title, summary,
- R.drawable.accessibility_shortcut_type_triple_tap);
- // TODO(b/142531156): Use vector drawable instead of temporal png file to avoid distorted.
+ setupShortcutWidgetWithImageRawResource(dialogView, title, summary,
+ R.raw.accessibility_shortcut_type_triple_tap);
}
private static void initAdvancedWidget(View view) {
@@ -398,20 +430,49 @@
return sb;
}
+ private static CharSequence retrieveTitle(Context context) {
+ int resId;
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ resId = R.string.accessibility_shortcut_edit_dialog_title_software;
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ resId = R.string.accessibility_shortcut_edit_dialog_title_software_by_gesture;
+ } else {
+ resId = R.string.accessibility_shortcut_edit_dialog_title_software;
+ }
+ return context.getText(resId);
+ }
+
private static CharSequence retrieveSoftwareShortcutSummary(Context context, int lineHeight) {
final SpannableStringBuilder sb = new SpannableStringBuilder();
- if (!AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ sb.append(getCustomizeAccessibilityButtonLink(context));
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ final int resId = AccessibilityUtil.isTouchExploreEnabled(context)
+ ? R.string.accessibility_shortcut_edit_dialog_summary_software_gesture_talkback
+ : R.string.accessibility_shortcut_edit_dialog_summary_software_gesture;
+ sb.append(context.getText(resId));
+ sb.append("\n\n");
+ sb.append(getCustomizeAccessibilityButtonLink(context));
+ } else {
sb.append(getSummaryStringWithIcon(context, lineHeight));
sb.append("\n\n");
+ sb.append(getCustomizeAccessibilityButtonLink(context));
}
- sb.append(getCustomizeAccessibilityButtonLink(context));
return sb;
}
private static int retrieveSoftwareShortcutImageResId(Context context) {
- return AccessibilityUtil.isFloatingMenuEnabled(context)
- ? R.drawable.accessibility_shortcut_type_software_floating
- : R.drawable.accessibility_shortcut_type_software;
+ int resId;
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ resId = R.drawable.accessibility_shortcut_type_software_floating;
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ resId = AccessibilityUtil.isTouchExploreEnabled(context)
+ ? R.drawable.accessibility_shortcut_type_software_gesture_talkback
+ : R.drawable.accessibility_shortcut_type_software_gesture;
+ } else {
+ resId = R.drawable.accessibility_shortcut_type_software;
+ }
+ return resId;
}
private static CharSequence getCustomizeAccessibilityButtonLink(Context context) {
@@ -422,7 +483,6 @@
.launch();
final AnnotationSpan.LinkInfo linkInfo = new AnnotationSpan.LinkInfo(
AnnotationSpan.LinkInfo.DEFAULT_ANNOTATION, linkListener);
-
return AnnotationSpan.linkify(context.getText(
R.string.accessibility_shortcut_edit_dialog_summary_software_floating), linkInfo);
}
diff --git a/src/com/android/settings/accessibility/AccessibilityFooterPreferenceController.java b/src/com/android/settings/accessibility/AccessibilityFooterPreferenceController.java
index e3422e4..08e5906 100644
--- a/src/com/android/settings/accessibility/AccessibilityFooterPreferenceController.java
+++ b/src/com/android/settings/accessibility/AccessibilityFooterPreferenceController.java
@@ -21,14 +21,18 @@
import androidx.preference.PreferenceScreen;
-import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
import com.android.settingslib.HelpUtils;
/**
- * Base class for accessibility preference footer.
+ * Preference controller that controls the help link and customizes the preference title in {@link
+ * AccessibilityFooterPreference}.
*/
-public abstract class AccessibilityFooterPreferenceController extends BasePreferenceController {
+public class AccessibilityFooterPreferenceController extends BasePreferenceController {
+
+ private int mHelpResource;
+ private String mLearnMoreContentDescription;
+ private String mIntroductionTitle;
public AccessibilityFooterPreferenceController(Context context, String key) {
super(context, key);
@@ -49,23 +53,55 @@
}
/**
- * Override this if showing a help item in the footer bar, by returning the resource id.
+ * Setups a help item in the {@link AccessibilityFooterPreference} with specific content
+ * description.
+ */
+ public void setupHelpLink(int helpResource, String learnMoreContentDescription) {
+ mHelpResource = helpResource;
+ mLearnMoreContentDescription = learnMoreContentDescription;
+ }
+
+ /**
+ * Overrides this if showing a help item in the {@link AccessibilityFooterPreference}, by
+ * returning the resource id.
*
* @return the resource id for the help url
*/
protected int getHelpResource() {
- return 0;
+ return mHelpResource;
}
- /** Returns the accessibility feature name. */
- protected abstract String getLabelName();
+ /**
+ * Overrides this if showing a help item in the {@link AccessibilityFooterPreference} with
+ * specific content description.
+ *
+ * @return the content description for the help url
+ */
+ protected String getLearnMoreContentDescription() {
+ return mLearnMoreContentDescription;
+ }
+
+ /**
+ * Sets the announcement the specific features introduction in the {@link
+ * AccessibilityFooterPreference}.
+ */
+ public void setIntroductionTitle(String introductionTitle) {
+ mIntroductionTitle = introductionTitle;
+ }
+
+ /**
+ * Overrides this if announcement the specific features introduction in the {@link
+ * AccessibilityFooterPreference}.
+ *
+ * @return the extended content description for specific features introduction
+ */
+ protected String getIntroductionTitle() {
+ return mIntroductionTitle;
+ }
private void updateFooterPreferences(AccessibilityFooterPreference footerPreference) {
final StringBuffer sb = new StringBuffer();
- sb.append(mContext.getString(
- R.string.accessibility_introduction_title, getLabelName()))
- .append("\n\n")
- .append(footerPreference.getTitle());
+ sb.append(getIntroductionTitle()).append("\n\n").append(footerPreference.getTitle());
footerPreference.setContentDescription(sb);
if (getHelpResource() != 0) {
@@ -75,10 +111,10 @@
mContext.getClass().getName());
view.startActivityForResult(helpIntent, 0);
});
-
- final String learnMoreContentDescription = mContext.getString(
- R.string.footer_learn_more_content_description, getLabelName());
- footerPreference.setLearnMoreContentDescription(learnMoreContentDescription);
+ footerPreference.setLearnMoreContentDescription(getLearnMoreContentDescription());
+ footerPreference.setLinkEnabled(true);
+ } else {
+ footerPreference.setLinkEnabled(false);
}
}
}
diff --git a/src/com/android/settings/accessibility/AccessibilityGestureNavigationTutorial.java b/src/com/android/settings/accessibility/AccessibilityGestureNavigationTutorial.java
index f8cdcb3..09f28d7 100644
--- a/src/com/android/settings/accessibility/AccessibilityGestureNavigationTutorial.java
+++ b/src/com/android/settings/accessibility/AccessibilityGestureNavigationTutorial.java
@@ -27,13 +27,16 @@
import android.graphics.drawable.Drawable;
import android.text.Spannable;
import android.text.SpannableString;
+import android.text.SpannableStringBuilder;
import android.text.style.ImageSpan;
+import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
+import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextSwitcher;
@@ -41,8 +44,10 @@
import androidx.annotation.AnimRes;
import androidx.annotation.ColorInt;
+import androidx.annotation.DrawableRes;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
+import androidx.annotation.RawRes;
import androidx.annotation.VisibleForTesting;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
@@ -53,6 +58,9 @@
import com.android.settings.R;
+import com.airbnb.lottie.LottieAnimationView;
+import com.airbnb.lottie.LottieDrawable;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
@@ -63,6 +71,8 @@
* accessibility services.
*/
public final class AccessibilityGestureNavigationTutorial {
+ private static final String TAG = "AccessibilityGestureNavigationTutorial";
+
/** IntDef enum for dialog type. */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
@@ -238,7 +248,7 @@
@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
- final View itemView = mTutorialPages.get(position).getImageView();
+ final View itemView = mTutorialPages.get(position).getIllustrationView();
container.addView(itemView);
return itemView;
}
@@ -256,7 +266,7 @@
@Override
public void destroyItem(@NonNull ViewGroup container, int position,
@NonNull Object object) {
- final View itemView = mTutorialPages.get(position).getImageView();
+ final View itemView = mTutorialPages.get(position).getIllustrationView();
container.removeView(itemView);
}
}
@@ -269,6 +279,34 @@
return imageView;
}
+ private static View createIllustrationView(Context context, @DrawableRes int imageRes) {
+ final View illustrationFrame = inflateAndInitIllustrationFrame(context);
+ final LottieAnimationView lottieView = illustrationFrame.findViewById(R.id.image);
+ lottieView.setImageResource(imageRes);
+
+ return illustrationFrame;
+ }
+
+ private static View createIllustrationViewWithImageRawResource(Context context,
+ @RawRes int imageRawRes) {
+ final View illustrationFrame = inflateAndInitIllustrationFrame(context);
+ final LottieAnimationView lottieView = illustrationFrame.findViewById(R.id.image);
+ lottieView.setFailureListener(
+ result -> Log.w(TAG, "Invalid image raw resource id: " + imageRawRes,
+ result));
+ lottieView.setAnimation(imageRawRes);
+ lottieView.setRepeatCount(LottieDrawable.INFINITE);
+ lottieView.playAnimation();
+
+ return illustrationFrame;
+ }
+
+ private static View inflateAndInitIllustrationFrame(Context context) {
+ final LayoutInflater inflater = context.getSystemService(LayoutInflater.class);
+
+ return inflater.inflate(R.layout.accessibility_lottie_animation_view, /* root= */ null);
+ }
+
private static View createShortcutNavigationContentView(Context context, int shortcutTypes) {
final LayoutInflater inflater = context.getSystemService(LayoutInflater.class);
final View contentView = inflater.inflate(
@@ -323,9 +361,8 @@
}
private static TutorialPage createSoftwareTutorialPage(@NonNull Context context) {
- final CharSequence title = context.getText(
- R.string.accessibility_tutorial_dialog_title_button);
- final ImageView image = createSoftwareImage(context);
+ final CharSequence title = getSoftwareTitle(context);
+ final View image = createSoftwareImage(context);
final CharSequence instruction = getSoftwareInstruction(context);
final ImageView indicatorIcon =
createImageView(context, R.drawable.ic_accessibility_page_indicator);
@@ -337,8 +374,8 @@
private static TutorialPage createHardwareTutorialPage(@NonNull Context context) {
final CharSequence title =
context.getText(R.string.accessibility_tutorial_dialog_title_volume);
- final ImageView image =
- createImageView(context, R.drawable.accessibility_shortcut_type_hardware);
+ final View image =
+ createIllustrationView(context, R.drawable.accessibility_shortcut_type_hardware);
final ImageView indicatorIcon =
createImageView(context, R.drawable.ic_accessibility_page_indicator);
final CharSequence instruction =
@@ -351,8 +388,9 @@
private static TutorialPage createTripleTapTutorialPage(@NonNull Context context) {
final CharSequence title =
context.getText(R.string.accessibility_tutorial_dialog_title_triple);
- final ImageView image =
- createImageView(context, R.drawable.accessibility_shortcut_type_triple_tap);
+ final View image =
+ createIllustrationViewWithImageRawResource(context,
+ R.raw.accessibility_shortcut_type_triple_tap);
final CharSequence instruction =
context.getText(R.string.accessibility_tutorial_dialog_message_triple);
final ImageView indicatorIcon =
@@ -381,19 +419,47 @@
return tutorialPages;
}
- private static ImageView createSoftwareImage(Context context) {
- final int resId = AccessibilityUtil.isFloatingMenuEnabled(context)
- ? R.drawable.accessibility_shortcut_type_software_floating
- : R.drawable.accessibility_shortcut_type_software;
+ private static View createSoftwareImage(Context context) {
+ int resId;
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ resId = R.drawable.accessibility_shortcut_type_software_floating;
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ resId = AccessibilityUtil.isTouchExploreEnabled(context)
+ ? R.drawable.accessibility_shortcut_type_software_gesture_talkback
+ : R.drawable.accessibility_shortcut_type_software_gesture;
+ } else {
+ resId = R.drawable.accessibility_shortcut_type_software;
+ }
+ return createIllustrationView(context, resId);
+ }
- return createImageView(context, resId);
+ private static CharSequence getSoftwareTitle(Context context) {
+ int resId;
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ resId = R.string.accessibility_tutorial_dialog_title_button;
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ resId = R.string.accessibility_tutorial_dialog_title_gesture;
+ } else {
+ resId = R.string.accessibility_tutorial_dialog_title_button;
+ }
+ return context.getText(resId);
}
private static CharSequence getSoftwareInstruction(Context context) {
- return AccessibilityUtil.isFloatingMenuEnabled(context)
- ? context.getText(R.string.accessibility_tutorial_dialog_message_floating_button)
- : getSoftwareInstructionWithIcon(context,
- context.getText(R.string.accessibility_tutorial_dialog_message_button));
+ final SpannableStringBuilder sb = new SpannableStringBuilder();
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ final int resId = R.string.accessibility_tutorial_dialog_message_floating_button;
+ sb.append(context.getText(resId));
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ final int resId = AccessibilityUtil.isTouchExploreEnabled(context)
+ ? R.string.accessibility_tutorial_dialog_message_gesture_talkback
+ : R.string.accessibility_tutorial_dialog_message_gesture;
+ sb.append(context.getText(resId));
+ } else {
+ final int resId = R.string.accessibility_tutorial_dialog_message_button;
+ sb.append(getSoftwareInstructionWithIcon(context, context.getText(resId)));
+ }
+ return sb;
}
private static CharSequence getSoftwareInstructionWithIcon(Context context, CharSequence text) {
@@ -416,24 +482,26 @@
private static class TutorialPage {
private final CharSequence mTitle;
- private final ImageView mImageView;
+ private final View mIllustrationView;
private final ImageView mIndicatorIcon;
private final CharSequence mInstruction;
- TutorialPage(CharSequence title, ImageView imageView, ImageView indicatorIcon,
+ TutorialPage(CharSequence title, View illustrationView, ImageView indicatorIcon,
CharSequence instruction) {
this.mTitle = title;
- this.mImageView = imageView;
+ this.mIllustrationView = illustrationView;
this.mIndicatorIcon = indicatorIcon;
this.mInstruction = instruction;
+
+ setupIllustrationChildViewsGravity();
}
public CharSequence getTitle() {
return mTitle;
}
- public ImageView getImageView() {
- return mImageView;
+ public View getIllustrationView() {
+ return mIllustrationView;
}
public ImageView getIndicatorIcon() {
@@ -443,6 +511,23 @@
public CharSequence getInstruction() {
return mInstruction;
}
+
+ private void setupIllustrationChildViewsGravity() {
+ final View backgroundView = mIllustrationView.findViewById(R.id.image_background);
+ initViewGravity(backgroundView);
+
+ final View lottieView = mIllustrationView.findViewById(R.id.image);
+ initViewGravity(lottieView);
+ }
+
+ private void initViewGravity(@NonNull View view) {
+ final FrameLayout.LayoutParams layoutParams =
+ new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,
+ FrameLayout.LayoutParams.WRAP_CONTENT);
+ layoutParams.gravity = Gravity.CENTER;
+
+ view.setLayoutParams(layoutParams);
+ }
}
private static class TutorialPageChangeListener implements ViewPager.OnPageChangeListener {
diff --git a/src/com/android/settings/accessibility/FloatingMenuLayerDrawable.java b/src/com/android/settings/accessibility/AccessibilityLayerDrawable.java
similarity index 76%
rename from src/com/android/settings/accessibility/FloatingMenuLayerDrawable.java
rename to src/com/android/settings/accessibility/AccessibilityLayerDrawable.java
index bfce114..b04a969 100644
--- a/src/com/android/settings/accessibility/FloatingMenuLayerDrawable.java
+++ b/src/com/android/settings/accessibility/AccessibilityLayerDrawable.java
@@ -27,10 +27,10 @@
import java.util.Objects;
-/** LayerDrawable that contains device icon as background and floating menu icon as foreground. */
-public class FloatingMenuLayerDrawable extends LayerDrawable {
+/** LayerDrawable that contains device icon as background and given icon as foreground. */
+public class AccessibilityLayerDrawable extends LayerDrawable {
- private FloatingMenuLayerDrawableState mState;
+ private AccessibilityLayerDrawableState mState;
/**
* Creates a new layer drawable with the list of specified layers.
@@ -38,23 +38,23 @@
* @param layers a list of drawables to use as layers in this new drawable,
* must be non-null
*/
- private FloatingMenuLayerDrawable(@NonNull Drawable[] layers) {
+ private AccessibilityLayerDrawable(@NonNull Drawable[] layers) {
super(layers);
}
/**
- * Create the {@link LayerDrawable} that contains device icon as background and floating menu
- * icon with given {@code opacity} value as foreground.
+ * Create the {@link LayerDrawable} that contains device icon as background and given menu icon
+ * with given {@code opacity} value as foreground.
*
* @param context the valid context used to get the icon
- * @param resId the resource ID of the floating menu icon
+ * @param resId the resource ID of the given icon
* @param opacity the opacity to apply to the given icon
- * @return the drawable that combines the device icon and the floating menu icon
+ * @return the drawable that combines the device icon and the given icon
*/
- public static FloatingMenuLayerDrawable createLayerDrawable(Context context, int resId,
+ public static AccessibilityLayerDrawable createLayerDrawable(Context context, int resId,
int opacity) {
final Drawable bg = context.getDrawable(R.drawable.accessibility_button_preview_base);
- final FloatingMenuLayerDrawable basicDrawable = new FloatingMenuLayerDrawable(
+ final AccessibilityLayerDrawable basicDrawable = new AccessibilityLayerDrawable(
new Drawable[]{bg, null});
basicDrawable.updateLayerDrawable(context, resId, opacity);
@@ -66,7 +66,7 @@
* value at index 1 layer.
*
* @param context the valid context used to get the icon
- * @param resId the resource ID of the floating menu icon
+ * @param resId the resource ID of the given icon
* @param opacity the opacity to apply to the given icon
*/
public void updateLayerDrawable(Context context, int resId, int opacity) {
@@ -83,18 +83,18 @@
/** Stores the constant state and data to the given drawable. */
private void setConstantState(Context context, int resId, int opacity) {
- mState = new FloatingMenuLayerDrawableState(context, resId, opacity);
+ mState = new AccessibilityLayerDrawableState(context, resId, opacity);
}
- /** {@link ConstantState} to store the data of {@link FloatingMenuLayerDrawable}. */
+ /** {@link ConstantState} to store the data of {@link AccessibilityLayerDrawable}. */
@VisibleForTesting
- static class FloatingMenuLayerDrawableState extends ConstantState {
+ static class AccessibilityLayerDrawableState extends ConstantState {
private final Context mContext;
private final int mResId;
private final int mOpacity;
- FloatingMenuLayerDrawableState(Context context, int resId, int opacity) {
+ AccessibilityLayerDrawableState(Context context, int resId, int opacity) {
mContext = context;
mResId = resId;
mOpacity = opacity;
@@ -119,7 +119,7 @@
if (o == null || getClass() != o.getClass()) {
return false;
}
- final FloatingMenuLayerDrawableState that = (FloatingMenuLayerDrawableState) o;
+ final AccessibilityLayerDrawableState that = (AccessibilityLayerDrawableState) o;
return mResId == that.mResId
&& mOpacity == that.mOpacity
&& Objects.equals(mContext, that.mContext);
diff --git a/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java b/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java
index 127c7c6..22f037b 100644
--- a/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java
@@ -115,8 +115,7 @@
mShortcutPreference.setKey(getShortcutPreferenceKey());
mShortcutPreference.setOnClickCallback(this);
- final CharSequence title = getString(R.string.accessibility_shortcut_title, getLabelName());
- mShortcutPreference.setTitle(title);
+ updateShortcutTitle(mShortcutPreference);
getPreferenceScreen().addPreference(mShortcutPreference);
mTouchExplorationStateChangeListener = isTouchExplorationEnabled -> {
@@ -182,6 +181,11 @@
}
}
+ protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
+ final CharSequence title = getString(R.string.accessibility_shortcut_title, getLabelName());
+ shortcutPreference.setTitle(title);
+ }
+
@Override
public int getDialogMetricsCategory(int dialogId) {
switch (dialogId) {
diff --git a/src/com/android/settings/accessibility/CaptionFooterPreferenceController.java b/src/com/android/settings/accessibility/CaptionFooterPreferenceController.java
index 4e50b89..495d395 100644
--- a/src/com/android/settings/accessibility/CaptionFooterPreferenceController.java
+++ b/src/com/android/settings/accessibility/CaptionFooterPreferenceController.java
@@ -30,12 +30,18 @@
}
@Override
- protected String getLabelName() {
- return mContext.getString(R.string.accessibility_captioning_title);
+ protected String getLearnMoreContentDescription() {
+ return mContext.getString(
+ R.string.accessibility_captioning_footer_learn_more_content_description);
}
@Override
- protected int getHelpResource() {
+ protected String getIntroductionTitle() {
+ return mContext.getString(R.string.accessibility_captioning_about_title);
+ }
+
+ @Override
+ protected int getHelpResource() {
return R.string.help_url_caption;
}
}
diff --git a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
index 9349071..0e209aa 100644
--- a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
@@ -55,7 +55,6 @@
import com.android.settings.R;
import com.android.settings.accessibility.AccessibilityUtil.UserShortcutType;
import com.android.settings.password.ConfirmDeviceCredentialActivity;
-import com.android.settings.widget.SettingsMainSwitchPreference;
import com.android.settingslib.accessibility.AccessibilityUtils;
import java.util.List;
@@ -222,15 +221,6 @@
}
@Override
- protected void updateToggleServiceTitle(SettingsMainSwitchPreference switchPreference) {
- final AccessibilityServiceInfo info = getAccessibilityServiceInfo();
- final String switchBarText = (info == null) ? "" :
- getString(R.string.accessibility_service_primary_switch_title,
- info.getResolveInfo().loadLabel(getPackageManager()));
- switchPreference.setTitle(switchBarText);
- }
-
- @Override
protected void updateSwitchBarToggleSwitch() {
final boolean checked = isAccessibilityServiceEnabled();
if (mToggleServiceSwitchPreference.isChecked() == checked) {
diff --git a/src/com/android/settings/accessibility/ToggleAutoclickFooterPreferenceController.java b/src/com/android/settings/accessibility/ToggleAutoclickFooterPreferenceController.java
index 053fa9d..962ffec 100644
--- a/src/com/android/settings/accessibility/ToggleAutoclickFooterPreferenceController.java
+++ b/src/com/android/settings/accessibility/ToggleAutoclickFooterPreferenceController.java
@@ -31,8 +31,14 @@
}
@Override
- protected String getLabelName() {
- return mContext.getString(R.string.accessibility_autoclick_preference_title);
+ protected String getLearnMoreContentDescription() {
+ return mContext.getString(
+ R.string.accessibility_autoclick_footer_learn_more_content_description);
+ }
+
+ @Override
+ protected String getIntroductionTitle() {
+ return mContext.getString(R.string.accessibility_autoclick_about_title);
}
@Override
diff --git a/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
index b41bafd..419514f 100644
--- a/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
@@ -38,8 +38,7 @@
import java.util.List;
/** Settings page for color inversion. */
-public class ToggleColorInversionPreferenceFragment extends
- ToggleFeaturePreferenceFragment {
+public class ToggleColorInversionPreferenceFragment extends ToggleFeaturePreferenceFragment {
private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED;
private final Handler mHandler = new Handler();
@@ -73,6 +72,11 @@
}
@Override
+ protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
+ shortcutPreference.setTitle(R.string.accessibility_display_inversion_shortcut_title);
+ }
+
+ @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mComponentName = COLOR_INVERSION_COMPONENT_NAME;
@@ -90,7 +94,20 @@
updateSwitchBarToggleSwitch();
}
};
- return super.onCreateView(inflater, container, savedInstanceState);
+
+ final View view = super.onCreateView(inflater, container, savedInstanceState);
+ updateFooterPreference();
+ return view;
+ }
+
+ private void updateFooterPreference() {
+ final String title = getPrefContext().getString(
+ R.string.accessibility_color_inversion_about_title);
+ final String learnMoreContentDescription = getPrefContext().getString(
+ R.string.accessibility_color_inversion_footer_learn_more_content_description);
+ mFooterPreferenceController.setIntroductionTitle(title);
+ mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreContentDescription);
+ mFooterPreferenceController.displayPreference(getPreferenceScreen());
}
@Override
diff --git a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
index 4bcf478..c9449d24 100644
--- a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
@@ -92,12 +92,20 @@
updateSwitchBarToggleSwitch();
}
};
- return super.onCreateView(inflater, container, savedInstanceState);
+
+ final View view = super.onCreateView(inflater, container, savedInstanceState);
+ updateFooterPreference();
+ return view;
}
- @Override
- public void onViewCreated(View view, Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
+ private void updateFooterPreference() {
+ final String title = getPrefContext()
+ .getString(R.string.accessibility_daltonizer_about_title);
+ final String learnMoreContentDescription = getPrefContext()
+ .getString(R.string.accessibility_daltonizer_footer_learn_more_content_description);
+ mFooterPreferenceController.setIntroductionTitle(title);
+ mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreContentDescription);
+ mFooterPreferenceController.displayPreference(getPreferenceScreen());
}
/** Customizes the order by preference key. */
@@ -168,6 +176,11 @@
}
@Override
+ protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
+ shortcutPreference.setTitle(R.string.accessibility_daltonizer_shortcut_title);
+ }
+
+ @Override
int getUserShortcutTypes() {
return AccessibilityUtil.getUserShortcutTypesFromSettings(getPrefContext(),
mComponentName);
diff --git a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
index 510f8d3..245f362 100644
--- a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
@@ -57,7 +57,6 @@
import com.android.settings.utils.LocaleUtils;
import com.android.settings.widget.SettingsMainSwitchBar;
import com.android.settings.widget.SettingsMainSwitchPreference;
-import com.android.settingslib.HelpUtils;
import com.android.settingslib.accessibility.AccessibilityUtils;
import com.android.settingslib.widget.IllustrationPreference;
import com.android.settingslib.widget.OnMainSwitchChangeListener;
@@ -78,6 +77,7 @@
protected SettingsMainSwitchPreference mToggleServiceSwitchPreference;
protected ShortcutPreference mShortcutPreference;
protected Preference mSettingsPreference;
+ protected AccessibilityFooterPreferenceController mFooterPreferenceController;
protected String mPreferenceKey;
protected CharSequence mSettingsTitle;
@@ -284,7 +284,14 @@
abstract int getUserShortcutTypes();
protected void updateToggleServiceTitle(SettingsMainSwitchPreference switchPreference) {
- switchPreference.setTitle(R.string.accessibility_service_primary_switch_title);
+ final CharSequence title =
+ getString(R.string.accessibility_service_primary_switch_title, mPackageName);
+ switchPreference.setTitle(title);
+ }
+
+ protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
+ final CharSequence title = getString(R.string.accessibility_shortcut_title, mPackageName);
+ shortcutPreference.setTitle(title);
}
protected abstract void onPreferenceToggled(String preferenceKey, boolean enabled);
@@ -434,8 +441,7 @@
mShortcutPreference.setKey(getShortcutPreferenceKey());
mShortcutPreference.setOnClickCallback(this);
- final CharSequence title = getString(R.string.accessibility_shortcut_title, mPackageName);
- mShortcutPreference.setTitle(title);
+ updateShortcutTitle(mShortcutPreference);
final PreferenceCategory generalCategory = findPreference(KEY_GENERAL_CATEGORY);
generalCategory.addPreference(mShortcutPreference);
@@ -463,33 +469,19 @@
final PreferenceScreen screen = getPreferenceScreen();
final CharSequence htmlDescription = Html.fromHtml(mHtmlDescription.toString(),
Html.FROM_HTML_MODE_COMPACT, mImageGetter, /* tagHandler= */ null);
- final String iconContentDescription =
- getString(R.string.accessibility_introduction_title, mPackageName);
final AccessibilityFooterPreference htmlFooterPreference =
new AccessibilityFooterPreference(screen.getContext());
htmlFooterPreference.setKey(KEY_HTML_DESCRIPTION_PREFERENCE);
htmlFooterPreference.setSummary(htmlDescription);
- htmlFooterPreference.setContentDescription(
- generateFooterContentDescription(htmlDescription));
-
- // Only framework tools support help link
- if (getHelpResource() != 0) {
- htmlFooterPreference.setLearnMoreAction(view -> {
- final Intent helpIntent = HelpUtils.getHelpIntent(
- getContext(), getContext().getString(getHelpResource()),
- getContext().getClass().getName());
- view.startActivityForResult(helpIntent, 0);
- });
-
- final String learnMoreContentDescription = getPrefContext().getString(
- R.string.footer_learn_more_content_description, mPackageName);
- htmlFooterPreference.setLearnMoreContentDescription(learnMoreContentDescription);
- htmlFooterPreference.setLinkEnabled(true);
- } else {
- htmlFooterPreference.setLinkEnabled(false);
- }
screen.addPreference(htmlFooterPreference);
+
+ // TODO(b/171272809): Migrate to DashboardFragment.
+ final String title = getString(R.string.accessibility_introduction_title, mPackageName);
+ mFooterPreferenceController = new AccessibilityFooterPreferenceController(
+ screen.getContext(), htmlFooterPreference.getKey());
+ mFooterPreferenceController.setIntroductionTitle(title);
+ mFooterPreferenceController.displayPreference(screen);
}
private void initFooterPreference() {
@@ -512,41 +504,22 @@
*
* @param screen The preference screen to add the footer preference
* @param summary The summary of the preference summary.
- * @param iconContentDescription The content description of icon in the footer.
+ * @param introductionTitle The title of introduction in the footer.
*/
@VisibleForTesting
void createFooterPreference(PreferenceScreen screen, CharSequence summary,
- String iconContentDescription) {
+ String introductionTitle) {
final AccessibilityFooterPreference footerPreference =
new AccessibilityFooterPreference(screen.getContext());
footerPreference.setSummary(summary);
- footerPreference.setContentDescription(
- generateFooterContentDescription(summary));
-
- // Only framework tools support help link
- if (getHelpResource() != 0) {
- footerPreference.setLearnMoreAction(view -> {
- final Intent helpIntent = HelpUtils.getHelpIntent(
- getContext(), getContext().getString(getHelpResource()),
- getContext().getClass().getName());
- view.startActivityForResult(helpIntent, 0);
- });
-
- final String learnMoreContentDescription = getPrefContext().getString(
- R.string.footer_learn_more_content_description, mPackageName);
- footerPreference.setLearnMoreContentDescription(learnMoreContentDescription);
- }
screen.addPreference(footerPreference);
+
+ mFooterPreferenceController = new AccessibilityFooterPreferenceController(
+ screen.getContext(), footerPreference.getKey());
+ mFooterPreferenceController.setIntroductionTitle(introductionTitle);
+ mFooterPreferenceController.displayPreference(screen);
}
- private CharSequence generateFooterContentDescription(CharSequence footerContent) {
- final StringBuffer sb = new StringBuffer();
- sb.append(getPrefContext().getString(
- R.string.accessibility_introduction_title, mPackageName))
- .append("\n\n")
- .append(footerContent);
- return sb;
- }
@VisibleForTesting
void setupEditShortcutDialog(Dialog dialog) {
final View dialogSoftwareView = dialog.findViewById(R.id.software_shortcut);
@@ -611,6 +584,18 @@
return value;
}
+ private static CharSequence getSoftwareShortcutTypeSummary(Context context) {
+ int resId;
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ resId = R.string.accessibility_shortcut_edit_summary_software;
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ resId = R.string.accessibility_shortcut_edit_summary_software_gesture;
+ } else {
+ resId = R.string.accessibility_shortcut_edit_summary_software;
+ }
+ return context.getText(resId);
+ }
+
protected CharSequence getShortcutTypeSummary(Context context) {
if (!mShortcutPreference.isSettingsEditable()) {
return context.getText(R.string.accessibility_shortcut_edit_dialog_title_hardware);
@@ -624,11 +609,8 @@
mComponentName.flattenToString(), UserShortcutType.SOFTWARE);
final List<CharSequence> list = new ArrayList<>();
- final CharSequence softwareTitle = context.getText(
- R.string.accessibility_shortcut_edit_summary_software);
-
if (hasShortcutType(shortcutTypes, UserShortcutType.SOFTWARE)) {
- list.add(softwareTitle);
+ list.add(getSoftwareShortcutTypeSummary(context));
}
if (hasShortcutType(shortcutTypes, UserShortcutType.HARDWARE)) {
final CharSequence hardwareTitle = context.getText(
@@ -638,7 +620,7 @@
// Show software shortcut if first time to use.
if (list.isEmpty()) {
- list.add(softwareTitle);
+ list.add(getSoftwareShortcutTypeSummary(context));
}
return CaseMap.toTitle().wholeString().noLowercase().apply(Locale.getDefault(), /* iter= */
diff --git a/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java
index e60751e..81bd45a 100644
--- a/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java
@@ -86,6 +86,7 @@
// Parent sets the title when creating the view, so set it after calling super
mToggleServiceSwitchPreference.setTitle(R.string.reduce_bright_colors_switch_title);
updateGeneralCategoryOrder();
+ updateFooterPreference();
return view;
}
@@ -101,6 +102,12 @@
generalCategory.addPreference(persist);
}
+ private void updateFooterPreference() {
+ final String title = getPrefContext().getString(R.string.reduce_bright_colors_about_title);
+ mFooterPreferenceController.setIntroductionTitle(title);
+ mFooterPreferenceController.displayPreference(getPreferenceScreen());
+ }
+
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
@@ -135,7 +142,6 @@
return R.xml.reduce_bright_colors_settings;
}
-
@Override
protected void onPreferenceToggled(String preferenceKey, boolean enabled) {
AccessibilityStatsLogUtils.logAccessibilityServiceEnabled(mComponentName, enabled);
@@ -155,6 +161,11 @@
}
@Override
+ protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
+ shortcutPreference.setTitle(R.string.reduce_bright_colors_shortcut_title);
+ }
+
+ @Override
int getUserShortcutTypes() {
return AccessibilityUtil.getUserShortcutTypesFromSettings(getPrefContext(),
mComponentName);
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 9266f72..1c7ce39 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -95,7 +95,20 @@
removeDialog(DialogEnums.EDIT_SHORTCUT);
mShortcutPreference.setSummary(getShortcutTypeSummary(getPrefContext()));
};
- return super.onCreateView(inflater, container, savedInstanceState);
+
+ final View view = super.onCreateView(inflater, container, savedInstanceState);
+ updateFooterPreference();
+ return view;
+ }
+
+ private void updateFooterPreference() {
+ final String title = getPrefContext().getString(
+ R.string.accessibility_screen_magnification_about_title);
+ final String learnMoreContentDescription = getPrefContext().getString(
+ R.string.accessibility_screen_magnification_footer_learn_more_content_description);
+ mFooterPreferenceController.setIntroductionTitle(title);
+ mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreContentDescription);
+ mFooterPreferenceController.displayPreference(getPreferenceScreen());
}
@Override
@@ -252,6 +265,18 @@
return (value & type) == type;
}
+ private static CharSequence getSoftwareShortcutTypeSummary(Context context) {
+ int resId;
+ if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
+ resId = R.string.accessibility_shortcut_edit_summary_software;
+ } else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
+ resId = R.string.accessibility_shortcut_edit_summary_software_gesture;
+ } else {
+ resId = R.string.accessibility_shortcut_edit_summary_software;
+ }
+ return context.getText(resId);
+ }
+
@Override
protected CharSequence getShortcutTypeSummary(Context context) {
if (!mShortcutPreference.isChecked()) {
@@ -262,18 +287,14 @@
MAGNIFICATION_CONTROLLER_NAME, UserShortcutType.SOFTWARE);
final List<CharSequence> list = new ArrayList<>();
- final CharSequence softwareTitle = context.getText(
- R.string.accessibility_shortcut_edit_summary_software);
-
if (hasShortcutType(shortcutTypes, UserShortcutType.SOFTWARE)) {
- list.add(softwareTitle);
+ list.add(getSoftwareShortcutTypeSummary(context));
}
if (hasShortcutType(shortcutTypes, UserShortcutType.HARDWARE)) {
final CharSequence hardwareTitle = context.getText(
R.string.accessibility_shortcut_hardware_keyword);
list.add(hardwareTitle);
}
-
if (hasShortcutType(shortcutTypes, UserShortcutType.TRIPLETAP)) {
final CharSequence tripleTapTitle = context.getText(
R.string.accessibility_shortcut_triple_tap_keyword);
@@ -282,7 +303,7 @@
// Show software shortcut if first time to use.
if (list.isEmpty()) {
- list.add(softwareTitle);
+ list.add(getSoftwareShortcutTypeSummary(context));
}
return CaseMap.toTitle().wholeString().noLowercase().apply(Locale.getDefault(), /* iter= */
@@ -397,6 +418,11 @@
}
@Override
+ protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
+ shortcutPreference.setTitle(R.string.accessibility_screen_magnification_shortcut_title);
+ }
+
+ @Override
protected void updateShortcutPreference() {
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(getPrefContext(),
MAGNIFICATION_CONTROLLER_NAME, UserShortcutType.SOFTWARE);
diff --git a/src/com/android/settings/backup/SettingsBackupHelper.java b/src/com/android/settings/backup/SettingsBackupHelper.java
index 6437b78..a682df8 100644
--- a/src/com/android/settings/backup/SettingsBackupHelper.java
+++ b/src/com/android/settings/backup/SettingsBackupHelper.java
@@ -22,6 +22,7 @@
import android.app.backup.BackupHelper;
import android.os.ParcelFileDescriptor;
+import com.android.settings.fuelgauge.BatteryBackupHelper;
import com.android.settings.shortcut.CreateShortcutPreferenceController;
import java.io.FileInputStream;
@@ -37,6 +38,7 @@
public void onCreate() {
super.onCreate();
addHelper("no-op", new NoOpHelper());
+ addHelper(BatteryBackupHelper.TAG, new BatteryBackupHelper(this));
}
@Override
diff --git a/src/com/android/settings/core/InstrumentedPreferenceFragment.java b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
index f6115fc..48e5176 100644
--- a/src/com/android/settings/core/InstrumentedPreferenceFragment.java
+++ b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
@@ -158,8 +158,7 @@
switch (newState) {
case RecyclerView.SCROLL_STATE_DRAGGING:
final Configuration.Builder builder =
- new Configuration.Builder(CUJ_SETTINGS_PAGE_SCROLL)
- .setView(recyclerView)
+ Configuration.Builder.withView(CUJ_SETTINGS_PAGE_SCROLL, recyclerView)
.setTag(mClassName);
mMonitor.begin(builder);
break;
diff --git a/src/com/android/settings/emergency/MoreSettingsPreferenceController.java b/src/com/android/settings/emergency/MoreSettingsPreferenceController.java
index cbb95a6..d945b21 100644
--- a/src/com/android/settings/emergency/MoreSettingsPreferenceController.java
+++ b/src/com/android/settings/emergency/MoreSettingsPreferenceController.java
@@ -115,7 +115,7 @@
.logClickedPreference(mPreference, getMetricsCategory());
final Intent intent = new Intent(mIntent)
.addCategory(Intent.CATEGORY_LAUNCHER)
- .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
Bundle bundle = new Bundle();
bundle.putString(EXTRA_KEY_ATTRIBUTION, mContext.getPackageName());
mContext.startActivity(intent, bundle);
diff --git a/src/com/android/settings/fuelgauge/BatteryBackupHelper.java b/src/com/android/settings/fuelgauge/BatteryBackupHelper.java
new file mode 100644
index 0000000..2b5576d
--- /dev/null
+++ b/src/com/android/settings/fuelgauge/BatteryBackupHelper.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2021 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.
+ *
+ */
+
+package com.android.settings.fuelgauge;
+
+import android.app.backup.BackupDataInputStream;
+import android.app.backup.BackupDataOutput;
+import android.app.backup.BackupHelper;
+import android.content.Context;
+import android.os.ParcelFileDescriptor;
+import android.util.Log;
+
+/** An implementation to backup and restore battery configurations. */
+public final class BatteryBackupHelper implements BackupHelper {
+ /** An inditifier for {@link BackupHelper}. */
+ public static final String TAG = "BatteryBackupHelper";
+
+ private final Context mContext;
+
+ public BatteryBackupHelper(Context context) {
+ mContext = context;
+ }
+
+ @Override
+ public void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data,
+ ParcelFileDescriptor newState) {
+ Log.d(TAG, "performBackup()");
+ }
+
+ @Override
+ public void restoreEntity(BackupDataInputStream data) {
+ Log.d(TAG, "restoreEntity()");
+ }
+
+ @Override
+ public void writeNewStateDescription(ParcelFileDescriptor newState) {
+ }
+}
diff --git a/src/com/android/settings/fuelgauge/BatteryChartView.java b/src/com/android/settings/fuelgauge/BatteryChartView.java
index a98c644..7bc60b2 100644
--- a/src/com/android/settings/fuelgauge/BatteryChartView.java
+++ b/src/com/android/settings/fuelgauge/BatteryChartView.java
@@ -57,7 +57,8 @@
Arrays.asList("SwitchAccessService", "TalkBackService", "JustSpeakService");
private static final int DEFAULT_TRAPEZOID_COUNT = 12;
- private static final int DEFAULT_TIMESTAMP_COUNT = 5;
+ private static final int DEFAULT_TIMESTAMP_COUNT = 4;
+ private static final int TIMESTAMP_GAPS_COUNT = DEFAULT_TIMESTAMP_COUNT - 1;
private static final int DIVIDER_COLOR = Color.parseColor("#CDCCC5");
private static final long UPDATE_STATE_DELAYED_TIME = 500L;
@@ -91,7 +92,7 @@
new Rect[] {new Rect(), new Rect(), new Rect()};
// For drawing the timestamp information.
private final Rect[] mTimestampsBounds =
- new Rect[] {new Rect(), new Rect(), new Rect(), new Rect(), new Rect()};
+ new Rect[] {new Rect(), new Rect(), new Rect(), new Rect()};
@VisibleForTesting
Handler mHandler = new Handler();
@@ -198,13 +199,14 @@
if (mTimestamps == null) {
mTimestamps = new String[DEFAULT_TIMESTAMP_COUNT];
}
- final long timeSlotOffset = DateUtils.HOUR_IN_MILLIS * 6;
+ final long timeSlotOffset =
+ DateUtils.HOUR_IN_MILLIS * (/*total 24 hours*/ 24 / TIMESTAMP_GAPS_COUNT);
final boolean is24HourFormat = DateFormat.is24HourFormat(getContext());
for (int index = 0; index < DEFAULT_TIMESTAMP_COUNT; index++) {
mTimestamps[index] =
ConvertUtils.utcToLocalTimeHour(
getContext(),
- latestTimestamp - (4 - index) * timeSlotOffset,
+ latestTimestamp - (TIMESTAMP_GAPS_COUNT - index) * timeSlotOffset,
is24HourFormat);
}
requestLayout();
@@ -426,8 +428,9 @@
final float[] xOffsets = new float[DEFAULT_TIMESTAMP_COUNT];
final float baselineX = mDividerWidth * .5f;
final float offsetX = mDividerWidth + unitWidth;
+ final int slotBarOffset = (/*total 12 bars*/ 12) / TIMESTAMP_GAPS_COUNT;
for (int index = 0; index < DEFAULT_TIMESTAMP_COUNT; index++) {
- xOffsets[index] = baselineX + index * offsetX * 3;
+ xOffsets[index] = baselineX + index * offsetX * slotBarOffset;
}
drawTimestamp(canvas, xOffsets);
}
@@ -439,13 +442,15 @@
mTimestamps[0],
xOffsets[0] - mTimestampsBounds[0].left,
getTimestampY(0), mTextPaint);
+ final int latestIndex = DEFAULT_TIMESTAMP_COUNT - 1;
// Draws the last timestamp info.
canvas.drawText(
- mTimestamps[4],
- xOffsets[4] - mTimestampsBounds[4].width() - mTimestampsBounds[4].left,
- getTimestampY(4), mTextPaint);
+ mTimestamps[latestIndex],
+ xOffsets[latestIndex] - mTimestampsBounds[latestIndex].width()
+ - mTimestampsBounds[latestIndex].left,
+ getTimestampY(latestIndex), mTextPaint);
// Draws the rest of timestamp info since it is located in the center.
- for (int index = 1; index <= 3; index++) {
+ for (int index = 1; index <= DEFAULT_TIMESTAMP_COUNT - 2; index++) {
canvas.drawText(
mTimestamps[index],
xOffsets[index] -
diff --git a/src/com/android/settings/fuelgauge/BatteryDiffEntry.java b/src/com/android/settings/fuelgauge/BatteryDiffEntry.java
index 3ad768a..0074f93 100644
--- a/src/com/android/settings/fuelgauge/BatteryDiffEntry.java
+++ b/src/com/android/settings/fuelgauge/BatteryDiffEntry.java
@@ -40,7 +40,8 @@
// Caches app label and icon to improve loading performance.
static final Map<String, BatteryEntry.NameAndIcon> sResourceCache = new HashMap<>();
// Whether a specific item is valid to launch restriction page?
- static final Map<String, Boolean> sValidForRestriction = new HashMap<>();
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ public static final Map<String, Boolean> sValidForRestriction = new HashMap<>();
/** A comparator for {@link BatteryDiffEntry} based on consumed percentage. */
public static final Comparator<BatteryDiffEntry> COMPARATOR =
@@ -339,7 +340,8 @@
return builder.toString();
}
- static void clearCache() {
+ /** Clears app icon and label cache data. */
+ public static void clearCache() {
sResourceCache.clear();
sValidForRestriction.clear();
}
diff --git a/src/com/android/settings/fuelgauge/BatteryInfo.java b/src/com/android/settings/fuelgauge/BatteryInfo.java
index 92151c0..4433da2 100644
--- a/src/com/android/settings/fuelgauge/BatteryInfo.java
+++ b/src/com/android/settings/fuelgauge/BatteryInfo.java
@@ -25,6 +25,7 @@
import android.os.BatteryUsageStats;
import android.os.SystemClock;
import android.text.format.Formatter;
+import android.util.Log;
import android.util.SparseIntArray;
import androidx.annotation.NonNull;
@@ -42,6 +43,7 @@
import com.android.settingslib.utils.StringUtil;
public class BatteryInfo {
+ private static final String TAG = "BatteryInfo";
public CharSequence chargeLabel;
public CharSequence remainingLabel;
@@ -155,8 +157,13 @@
if (batteryUsageStats != null) {
stats = batteryUsageStats;
} else {
- stats = context.getSystemService(BatteryStatsManager.class)
- .getBatteryUsageStats();
+ try {
+ stats = context.getSystemService(BatteryStatsManager.class)
+ .getBatteryUsageStats();
+ } catch (RuntimeException e) {
+ Log.e(TAG, "getBatteryInfo() from getBatteryUsageStats()", e);
+ return null;
+ }
}
return getBatteryInfo(context, stats, shortString);
}
diff --git a/src/com/android/settings/fuelgauge/BatteryUsageStatsLoader.java b/src/com/android/settings/fuelgauge/BatteryUsageStatsLoader.java
index d35ef82..0acc54e 100644
--- a/src/com/android/settings/fuelgauge/BatteryUsageStatsLoader.java
+++ b/src/com/android/settings/fuelgauge/BatteryUsageStatsLoader.java
@@ -20,6 +20,7 @@
import android.os.BatteryStatsManager;
import android.os.BatteryUsageStats;
import android.os.BatteryUsageStatsQuery;
+import android.util.Log;
import com.android.settingslib.utils.AsyncLoaderCompat;
@@ -27,6 +28,7 @@
* Loader to get new {@link BatteryUsageStats} in the background
*/
public class BatteryUsageStatsLoader extends AsyncLoaderCompat<BatteryUsageStats> {
+ private static final String TAG = "BatteryUsageStatsLoader";
private final BatteryStatsManager mBatteryStatsManager;
private final boolean mIncludeBatteryHistory;
@@ -42,7 +44,12 @@
if (mIncludeBatteryHistory) {
builder.includeBatteryHistory();
}
- return mBatteryStatsManager.getBatteryUsageStats(builder.build());
+ try {
+ return mBatteryStatsManager.getBatteryUsageStats(builder.build());
+ } catch (RuntimeException e) {
+ Log.e(TAG, "loadInBackground() for getBatteryUsageStats()", e);
+ return null;
+ }
}
@Override
diff --git a/src/com/android/settings/fuelgauge/BatteryUtils.java b/src/com/android/settings/fuelgauge/BatteryUtils.java
index d521ed1..f8f01b9 100644
--- a/src/com/android/settings/fuelgauge/BatteryUtils.java
+++ b/src/com/android/settings/fuelgauge/BatteryUtils.java
@@ -368,8 +368,14 @@
public BatteryInfo getBatteryInfo(final String tag) {
final BatteryStatsManager systemService = mContext.getSystemService(
BatteryStatsManager.class);
- final BatteryUsageStats batteryUsageStats = systemService.getBatteryUsageStats(
- new BatteryUsageStatsQuery.Builder().includeBatteryHistory().build());
+ BatteryUsageStats batteryUsageStats;
+ try {
+ batteryUsageStats = systemService.getBatteryUsageStats(
+ new BatteryUsageStatsQuery.Builder().includeBatteryHistory().build());
+ } catch (RuntimeException e) {
+ Log.e(TAG, "getBatteryInfo() from getBatteryUsageStats()", e);
+ return null;
+ }
final long startTime = System.currentTimeMillis();
diff --git a/src/com/android/settings/fuelgauge/ConvertUtils.java b/src/com/android/settings/fuelgauge/ConvertUtils.java
index 001e9e9..827ac92 100644
--- a/src/com/android/settings/fuelgauge/ConvertUtils.java
+++ b/src/com/android/settings/fuelgauge/ConvertUtils.java
@@ -19,6 +19,7 @@
import android.os.BatteryUsageStats;
import android.os.LocaleList;
import android.os.UserHandle;
+import android.text.format.DateFormat;
import android.text.format.DateUtils;
import android.util.Log;
@@ -26,10 +27,8 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.text.SimpleDateFormat;
import java.time.Duration;
import java.util.ArrayList;
-import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -76,19 +75,6 @@
public static final int CONSUMER_TYPE_USER_BATTERY = 2;
public static final int CONSUMER_TYPE_SYSTEM_BATTERY = 3;
- // For language is changed.
- @VisibleForTesting static Locale sLocale;
- @VisibleForTesting static Locale sLocaleForHour;
- // For time zone is changed.
- @VisibleForTesting static String sZoneId;
- @VisibleForTesting static String sZoneIdForHour;
- private static boolean sIs24HourFormat;
-
- @VisibleForTesting
- static SimpleDateFormat sSimpleDateFormat;
- @VisibleForTesting
- static SimpleDateFormat sSimpleDateFormatForHour;
-
private ConvertUtils() {}
public static ContentValues convert(
@@ -136,36 +122,21 @@
/** Converts UTC timestamp to human readable local time string. */
public static String utcToLocalTime(Context context, long timestamp) {
- final Locale currentLocale = getLocale(context);
- final String currentZoneId = TimeZone.getDefault().getID();
- if (!currentZoneId.equals(sZoneId)
- || !currentLocale.equals(sLocale)
- || sSimpleDateFormat == null) {
- sLocale = currentLocale;
- sZoneId = currentZoneId;
- sSimpleDateFormat =
- new SimpleDateFormat("MMM dd,yyyy HH:mm:ss", currentLocale);
- }
- return sSimpleDateFormat.format(new Date(timestamp));
+ final Locale locale = getLocale(context);
+ final String pattern =
+ DateFormat.getBestDateTimePattern(locale, "MMM dd,yyyy HH:mm:ss");
+ return DateFormat.format(pattern, timestamp).toString();
}
/** Converts UTC timestamp to local time hour data. */
public static String utcToLocalTimeHour(
Context context, long timestamp, boolean is24HourFormat) {
- final Locale currentLocale = getLocale(context);
- final String currentZoneId = TimeZone.getDefault().getID();
- if (!currentZoneId.equals(sZoneIdForHour)
- || !currentLocale.equals(sLocaleForHour)
- || sIs24HourFormat != is24HourFormat
- || sSimpleDateFormatForHour == null) {
- sLocaleForHour = currentLocale;
- sZoneIdForHour = currentZoneId;
- sIs24HourFormat = is24HourFormat;
- sSimpleDateFormatForHour = new SimpleDateFormat(
- sIs24HourFormat ? "HH" : "h", currentLocale);
- }
- return sSimpleDateFormatForHour.format(new Date(timestamp))
- .toLowerCase(currentLocale);
+ final Locale locale = getLocale(context);
+ // e.g. for 12-hour format: 9 pm
+ // e.g. for 24-hour format: 09:00
+ final String skeleton = is24HourFormat ? "HHm" : "ha";
+ final String pattern = DateFormat.getBestDateTimePattern(locale, skeleton);
+ return DateFormat.format(pattern, timestamp).toString().toLowerCase(locale);
}
/** Gets indexed battery usage data for each corresponding time slot. */
diff --git a/src/com/android/settings/fuelgauge/PowerUsageAdvanced.java b/src/com/android/settings/fuelgauge/PowerUsageAdvanced.java
index 7c69618..afbb71f 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageAdvanced.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageAdvanced.java
@@ -19,8 +19,11 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.database.ContentObserver;
+import android.net.Uri;
import android.os.BatteryManager;
import android.os.Bundle;
+import android.os.Handler;
import android.provider.SearchIndexableResource;
import android.util.Log;
@@ -31,6 +34,7 @@
import com.android.settings.R;
import com.android.settings.SettingsActivity;
+import com.android.settings.fuelgauge.BatteryBroadcastReceiver;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.core.AbstractPreferenceController;
@@ -63,6 +67,17 @@
private BatteryChartPreferenceController mBatteryChartPreferenceController;
private BatteryAppListPreferenceController mBatteryAppListPreferenceController;
+ private final ContentObserver mBatteryObserver =
+ new ContentObserver(new Handler()) {
+ @Override
+ public void onChange(boolean selfChange) {
+ Log.d(TAG, "onBatteryContentChange: " + selfChange);
+ mIsChartDataLoaded = false;
+ restartBatteryStatsLoader(
+ BatteryBroadcastReceiver.BatteryUpdateType.MANUAL);
+ }
+ };
+
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
@@ -104,6 +119,20 @@
super.onPause();
// Resets the flag to reload usage data in onResume() callback.
mIsChartDataLoaded = false;
+ final Uri uri = mPowerUsageFeatureProvider.getBatteryHistoryUri();
+ if (uri != null) {
+ getContext().getContentResolver().unregisterContentObserver(mBatteryObserver);
+ }
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ final Uri uri = mPowerUsageFeatureProvider.getBatteryHistoryUri();
+ if (uri != null) {
+ getContext().getContentResolver().registerContentObserver(
+ uri, /*notifyForDescendants*/ true, mBatteryObserver);
+ }
}
@Override
diff --git a/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java b/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java
index 61abe6b..d914825 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java
@@ -18,6 +18,7 @@
import android.content.Context;
import android.content.Intent;
+import android.net.Uri;
import android.util.SparseIntArray;
import com.android.internal.os.BatterySipper;
@@ -141,4 +142,9 @@
* Returns battery history data with corresponding timestamp key.
*/
Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context);
+
+ /**
+ * Returns {@link Uri} to monitor battery history data is update.
+ */
+ Uri getBatteryHistoryUri();
}
diff --git a/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java b/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java
index 1dcdab0..895bbb2 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java
@@ -19,6 +19,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.net.Uri;
import android.os.Process;
import android.util.SparseIntArray;
@@ -167,4 +168,9 @@
public Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context) {
return null;
}
+
+ @Override
+ public Uri getBatteryHistoryUri() {
+ return null;
+ }
}
diff --git a/src/com/android/settings/fuelgauge/PowerUsageSummary.java b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
index 19a8011..638aaa5 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageSummary.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
@@ -25,6 +25,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings.Global;
+import android.util.Log;
import androidx.annotation.VisibleForTesting;
import androidx.loader.app.LoaderManager;
@@ -103,6 +104,10 @@
@Override
public void onLoadFinished(Loader<BatteryInfo> loader, BatteryInfo batteryInfo) {
+ if (batteryInfo == null) {
+ Log.w(TAG, "mBatteryInfoLoaderCallbacks: batteryInfo = null");
+ return;
+ }
mBatteryHeaderPreferenceController.updateHeaderPreference(batteryInfo);
mBatteryHeaderPreferenceController.updateHeaderByBatteryTips(
mBatteryTipPreferenceController.getCurrentBatteryTip(), batteryInfo);
@@ -126,6 +131,10 @@
@Override
public void onLoadFinished(Loader<List<BatteryTip>> loader,
List<BatteryTip> data) {
+ if (mBatteryInfo == null) {
+ Log.w(TAG, "mBatteryTipsCallbacks: batteryInfo = null");
+ return;
+ }
mBatteryTipPreferenceController.updateBatteryTips(data);
mBatteryHeaderPreferenceController.updateHeaderByBatteryTips(
mBatteryTipPreferenceController.getCurrentBatteryTip(), mBatteryInfo);
diff --git a/src/com/android/settings/fuelgauge/RequestIgnoreBatteryOptimizations.java b/src/com/android/settings/fuelgauge/RequestIgnoreBatteryOptimizations.java
index f75fccc..7caad60 100644
--- a/src/com/android/settings/fuelgauge/RequestIgnoreBatteryOptimizations.java
+++ b/src/com/android/settings/fuelgauge/RequestIgnoreBatteryOptimizations.java
@@ -32,10 +32,11 @@
public class RequestIgnoreBatteryOptimizations extends AlertActivity implements
DialogInterface.OnClickListener {
- static final String TAG = "RequestIgnoreBatteryOptimizations";
+ private static final String TAG = "RequestIgnoreBatteryOptimizations";
+ private static final boolean DEBUG = false;
private PowerWhitelistManager mPowerWhitelistManager;
- String mPackageName;
+ private String mPackageName;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -45,14 +46,14 @@
Uri data = getIntent().getData();
if (data == null) {
- Log.w(TAG, "No data supplied for IGNORE_BATTERY_OPTIMIZATION_SETTINGS in: "
+ debugLog("No data supplied for IGNORE_BATTERY_OPTIMIZATION_SETTINGS in: "
+ getIntent());
finish();
return;
}
mPackageName = data.getSchemeSpecificPart();
if (mPackageName == null) {
- Log.w(TAG, "No data supplied for IGNORE_BATTERY_OPTIMIZATION_SETTINGS in: "
+ debugLog("No data supplied for IGNORE_BATTERY_OPTIMIZATION_SETTINGS in: "
+ getIntent());
finish();
return;
@@ -60,7 +61,7 @@
PowerManager power = getSystemService(PowerManager.class);
if (power.isIgnoringBatteryOptimizations(mPackageName)) {
- Log.i(TAG, "Not should prompt, already ignoring optimizations: " + mPackageName);
+ debugLog("Not should prompt, already ignoring optimizations: " + mPackageName);
finish();
return;
}
@@ -69,7 +70,7 @@
try {
ai = getPackageManager().getApplicationInfo(mPackageName, 0);
} catch (PackageManager.NameNotFoundException e) {
- Log.w(TAG, "Requested package doesn't exist: " + mPackageName);
+ debugLog("Requested package doesn't exist: " + mPackageName);
finish();
return;
}
@@ -77,7 +78,7 @@
if (getPackageManager().checkPermission(
Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, mPackageName)
!= PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Requested package " + mPackageName + " does not hold permission "
+ debugLog("Requested package " + mPackageName + " does not hold permission "
+ Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
finish();
return;
@@ -105,10 +106,13 @@
switch (which) {
case BUTTON_POSITIVE:
mPowerWhitelistManager.addToWhitelist(mPackageName);
- setResult(RESULT_OK);
break;
case BUTTON_NEGATIVE:
break;
}
}
+
+ private static void debugLog(String debugContent) {
+ if (DEBUG) Log.w(TAG, debugContent);
+ }
}
diff --git a/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java b/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java
index 7d11ba5..b6806e8 100644
--- a/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java
+++ b/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java
@@ -18,6 +18,7 @@
import android.content.Context;
import android.os.BatteryUsageStats;
+import android.util.Log;
import androidx.annotation.VisibleForTesting;
@@ -67,16 +68,17 @@
final BatteryInfo batteryInfo = mBatteryUtils.getBatteryInfo(TAG);
final Context context = getContext();
+ tips.add(new EarlyWarningDetector(policy, context).detect());
+ if (batteryInfo == null) {
+ Log.w(TAG, "loadInBackground() batteryInfo = null");
+ return tips;
+ }
+
tips.add(new LowBatteryDetector(context, policy, batteryInfo).detect());
tips.add(new HighUsageDetector(context, policy, mBatteryUsageStats, batteryInfo).detect());
tips.add(new SmartBatteryDetector(
context, policy, batteryInfo, context.getContentResolver()).detect());
- tips.add(new EarlyWarningDetector(policy, context).detect());
tips.add(new BatteryDefenderDetector(batteryInfo).detect());
- // Disable this feature now since it introduces false positive cases. We will try to improve
- // it in the future.
- // tips.add(new RestrictAppDetector(context, policy).detect());
-
Collections.sort(tips);
return tips;
}
diff --git a/src/com/android/settings/gestures/OneHandedActionPullDownPrefController.java b/src/com/android/settings/gestures/OneHandedActionPullDownPrefController.java
index e17165b..26b3763 100644
--- a/src/com/android/settings/gestures/OneHandedActionPullDownPrefController.java
+++ b/src/com/android/settings/gestures/OneHandedActionPullDownPrefController.java
@@ -93,7 +93,8 @@
return;
}
if (uri.equals(OneHandedSettingsUtils.ONE_HANDED_MODE_ENABLED_URI)
- || uri.equals(OneHandedSettingsUtils.SHORTCUT_ENABLED_URI)) {
+ || uri.equals(OneHandedSettingsUtils.SOFTWARE_SHORTCUT_ENABLED_URI)
+ || uri.equals(OneHandedSettingsUtils.HARDWARE_SHORTCUT_ENABLED_URI)) {
mPreference.setEnabled(OneHandedSettingsUtils.canEnableController(mContext));
} else if (uri.equals(OneHandedSettingsUtils.SHOW_NOTIFICATION_ENABLED_URI)) {
updateState(mPreference);
diff --git a/src/com/android/settings/gestures/OneHandedActionShowNotificationPrefController.java b/src/com/android/settings/gestures/OneHandedActionShowNotificationPrefController.java
index 9f56a14..524c135 100644
--- a/src/com/android/settings/gestures/OneHandedActionShowNotificationPrefController.java
+++ b/src/com/android/settings/gestures/OneHandedActionShowNotificationPrefController.java
@@ -93,7 +93,8 @@
return;
}
if (uri.equals(OneHandedSettingsUtils.ONE_HANDED_MODE_ENABLED_URI)
- || uri.equals(OneHandedSettingsUtils.SHORTCUT_ENABLED_URI)) {
+ || uri.equals(OneHandedSettingsUtils.SOFTWARE_SHORTCUT_ENABLED_URI)
+ || uri.equals(OneHandedSettingsUtils.HARDWARE_SHORTCUT_ENABLED_URI)) {
mPreference.setEnabled(OneHandedSettingsUtils.canEnableController(mContext));
} else if (uri.equals(OneHandedSettingsUtils.SHOW_NOTIFICATION_ENABLED_URI)) {
updateState(mPreference);
diff --git a/src/com/android/settings/gestures/OneHandedSettings.java b/src/com/android/settings/gestures/OneHandedSettings.java
index 51c6b66..1310789 100644
--- a/src/com/android/settings/gestures/OneHandedSettings.java
+++ b/src/com/android/settings/gestures/OneHandedSettings.java
@@ -26,6 +26,7 @@
import com.android.internal.accessibility.AccessibilityShortcutController;
import com.android.settings.R;
import com.android.settings.accessibility.AccessibilityShortcutPreferenceFragment;
+import com.android.settings.accessibility.ShortcutPreference;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.widget.IllustrationPreference;
@@ -77,6 +78,11 @@
}
@Override
+ protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
+ shortcutPreference.setTitle(R.string.one_handed_mode_shortcut_title);
+ }
+
+ @Override
protected boolean showGeneralCategory() {
return true;
}
diff --git a/src/com/android/settings/gestures/OneHandedSettingsUtils.java b/src/com/android/settings/gestures/OneHandedSettingsUtils.java
index f058689..04898dc 100644
--- a/src/com/android/settings/gestures/OneHandedSettingsUtils.java
+++ b/src/com/android/settings/gestures/OneHandedSettingsUtils.java
@@ -27,6 +27,7 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
+import android.text.TextUtils;
import androidx.annotation.VisibleForTesting;
@@ -45,8 +46,10 @@
Settings.Secure.getUriFor(Settings.Secure.ONE_HANDED_MODE_ENABLED);
static final Uri SHOW_NOTIFICATION_ENABLED_URI =
Settings.Secure.getUriFor(Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED);
- static final Uri SHORTCUT_ENABLED_URI =
+ static final Uri SOFTWARE_SHORTCUT_ENABLED_URI =
Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS);
+ static final Uri HARDWARE_SHORTCUT_ENABLED_URI =
+ Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE);
public enum OneHandedTimeout {
NEVER(0), SHORT(4), MEDIUM(8), LONG(12);
@@ -238,9 +241,20 @@
* @return true if user enabled one-handed shortcut in settings, false otherwise.
*/
public static boolean getShortcutEnabled(Context context) {
- final String targets = Settings.Secure.getStringForUser(context.getContentResolver(),
+ // Checks SOFTWARE_SHORTCUT_KEY
+ final String targetsSW = Settings.Secure.getStringForUser(context.getContentResolver(),
Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS, sCurrentUserId);
- return targets != null ? targets.contains(ONE_HANDED_MODE_TARGET_NAME) : false;
+ if (!TextUtils.isEmpty(targetsSW) && targetsSW.contains(ONE_HANDED_MODE_TARGET_NAME)) {
+ return true;
+ }
+
+ // Checks HARDWARE_SHORTCUT_KEY
+ final String targetsHW = Settings.Secure.getStringForUser(context.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE, sCurrentUserId);
+ if (!TextUtils.isEmpty(targetsHW) && targetsHW.contains(ONE_HANDED_MODE_TARGET_NAME)) {
+ return true;
+ }
+ return false;
}
/**
@@ -285,7 +299,8 @@
final ContentResolver resolver = mContext.getContentResolver();
resolver.registerContentObserver(ONE_HANDED_MODE_ENABLED_URI, true, this);
resolver.registerContentObserver(SHOW_NOTIFICATION_ENABLED_URI, true, this);
- resolver.registerContentObserver(SHORTCUT_ENABLED_URI, true, this);
+ resolver.registerContentObserver(SOFTWARE_SHORTCUT_ENABLED_URI, true, this);
+ resolver.registerContentObserver(HARDWARE_SHORTCUT_ENABLED_URI, true, this);
}
@Override
diff --git a/src/com/android/settings/gestures/SystemNavigationGestureSettings.java b/src/com/android/settings/gestures/SystemNavigationGestureSettings.java
index 4e783c9..4b9cfa3 100644
--- a/src/com/android/settings/gestures/SystemNavigationGestureSettings.java
+++ b/src/com/android/settings/gestures/SystemNavigationGestureSettings.java
@@ -17,6 +17,7 @@
package com.android.settings.gestures;
import static android.os.UserHandle.USER_CURRENT;
+import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_2BUTTON_OVERLAY;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON_OVERLAY;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL_OVERLAY;
@@ -30,11 +31,14 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.accessibility.AccessibilityManager;
import androidx.annotation.VisibleForTesting;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
+import com.android.settings.SettingsTutorialDialogWrapperActivity;
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.search.BaseSearchIndexProvider;
@@ -173,7 +177,14 @@
protected boolean setDefaultKey(String key) {
setCurrentSystemNavigationMode(mOverlayManager, key);
setIllustrationVideo(mVideoPreference, key);
-
+ if (TextUtils.equals(KEY_SYSTEM_NAV_GESTURAL, key)
+ && !isAccessibilityFloatingMenuEnabled()
+ && (isAnyServiceSupportAccessibilityButton() || isNavBarMagnificationEnabled())) {
+ final Intent intent = new Intent(getActivity(),
+ SettingsTutorialDialogWrapperActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
return true;
}
@@ -246,6 +257,24 @@
}
}
+ private boolean isAnyServiceSupportAccessibilityButton() {
+ final AccessibilityManager ams = getContext().getSystemService(AccessibilityManager.class);
+ final List<String> targets = ams.getAccessibilityShortcutTargets(
+ AccessibilityManager.ACCESSIBILITY_BUTTON);
+ return !targets.isEmpty();
+ }
+
+ private boolean isNavBarMagnificationEnabled() {
+ return Settings.Secure.getInt(getContext().getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, 0) == 1;
+ }
+
+ private boolean isAccessibilityFloatingMenuEnabled() {
+ return Settings.Secure.getInt(getContext().getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_BUTTON_MODE, /* def= */ -1)
+ == ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
+ }
+
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
new BaseSearchIndexProvider(R.xml.system_navigation_gesture_settings) {
diff --git a/src/com/android/settings/location/RecentLocationAccessPreferenceController.java b/src/com/android/settings/location/RecentLocationAccessPreferenceController.java
index 97de4a7..a8a30b4 100644
--- a/src/com/android/settings/location/RecentLocationAccessPreferenceController.java
+++ b/src/com/android/settings/location/RecentLocationAccessPreferenceController.java
@@ -29,7 +29,7 @@
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
-import com.android.settingslib.location.RecentLocationAccesses;
+import com.android.settingslib.applications.RecentAppOpsAccess;
import com.android.settingslib.utils.StringUtil;
import com.android.settingslib.widget.AppPreference;
@@ -42,7 +42,7 @@
public class RecentLocationAccessPreferenceController extends LocationBasePreferenceController {
public static final int MAX_APPS = 3;
@VisibleForTesting
- RecentLocationAccesses mRecentLocationApps;
+ RecentAppOpsAccess mRecentLocationApps;
private PreferenceCategory mCategoryRecentLocationRequests;
private int mType = ProfileSelectFragment.ProfileType.ALL;
@@ -71,12 +71,12 @@
}
public RecentLocationAccessPreferenceController(Context context, String key) {
- this(context, key, new RecentLocationAccesses(context));
+ this(context, key, RecentAppOpsAccess.createForLocation(context));
}
@VisibleForTesting
public RecentLocationAccessPreferenceController(Context context, String key,
- RecentLocationAccesses recentLocationApps) {
+ RecentAppOpsAccess recentLocationApps) {
super(context, key);
mRecentLocationApps = recentLocationApps;
}
@@ -86,9 +86,9 @@
super.displayPreference(screen);
mCategoryRecentLocationRequests = screen.findPreference(getPreferenceKey());
final Context prefContext = mCategoryRecentLocationRequests.getContext();
- final List<RecentLocationAccesses.Access> recentLocationAccesses = new ArrayList<>();
+ final List<RecentAppOpsAccess.Access> recentLocationAccesses = new ArrayList<>();
final UserManager userManager = UserManager.get(mContext);
- for (RecentLocationAccesses.Access access : mRecentLocationApps.getAppListSorted(
+ for (RecentAppOpsAccess.Access access : mRecentLocationApps.getAppListSorted(
/* showSystemApps= */ false)) {
if (isRequestMatchesProfileType(userManager, access, mType)) {
recentLocationAccesses.add(access);
@@ -100,7 +100,7 @@
if (recentLocationAccesses.size() > 0) {
// Add preferences to container in original order (already sorted by recency).
- for (RecentLocationAccesses.Access access : recentLocationAccesses) {
+ for (RecentAppOpsAccess.Access access : recentLocationAccesses) {
mCategoryRecentLocationRequests.addPreference(
createAppPreference(prefContext, access, mFragment));
}
@@ -132,7 +132,7 @@
* Create a {@link AppPreference}
*/
public static AppPreference createAppPreference(Context prefContext,
- RecentLocationAccesses.Access access, DashboardFragment fragment) {
+ RecentAppOpsAccess.Access access, DashboardFragment fragment) {
final AppPreference pref = new AppPreference(prefContext);
pref.setIcon(access.icon);
pref.setTitle(access.label);
@@ -145,11 +145,11 @@
}
/**
- * Return if the {@link RecentLocationAccesses.Access} matches current UI
- * {@ProfileSelectFragment.ProfileType}
+ * Return if the {@link RecentAppOpsAccess.Access} matches current UI
+ * {@link ProfileSelectFragment.ProfileType}
*/
public static boolean isRequestMatchesProfileType(UserManager userManager,
- RecentLocationAccesses.Access access, @ProfileSelectFragment.ProfileType int type) {
+ RecentAppOpsAccess.Access access, @ProfileSelectFragment.ProfileType int type) {
final boolean isWorkProfile = userManager.isManagedProfile(
access.userHandle.getIdentifier());
diff --git a/src/com/android/settings/location/RecentLocationAccessSeeAllPreferenceController.java b/src/com/android/settings/location/RecentLocationAccessSeeAllPreferenceController.java
index a05092d..eba6271 100644
--- a/src/com/android/settings/location/RecentLocationAccessSeeAllPreferenceController.java
+++ b/src/com/android/settings/location/RecentLocationAccessSeeAllPreferenceController.java
@@ -26,7 +26,7 @@
import com.android.settings.R;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
-import com.android.settingslib.location.RecentLocationAccesses;
+import com.android.settingslib.applications.RecentAppOpsAccess;
import com.android.settingslib.widget.AppPreference;
import java.util.ArrayList;
@@ -37,14 +37,14 @@
extends LocationBasePreferenceController {
private PreferenceScreen mCategoryAllRecentLocationAccess;
- private final RecentLocationAccesses mRecentLocationAccesses;
+ private final RecentAppOpsAccess mRecentLocationAccesses;
private boolean mShowSystem = false;
private Preference mPreference;
private int mType = ProfileSelectFragment.ProfileType.ALL;
public RecentLocationAccessSeeAllPreferenceController(Context context, String key) {
super(context, key);
- mRecentLocationAccesses = new RecentLocationAccesses(context);
+ mRecentLocationAccesses = RecentAppOpsAccess.createForLocation(context);
}
@Override
@@ -65,8 +65,8 @@
final UserManager userManager = UserManager.get(mContext);
- final List<RecentLocationAccesses.Access> recentLocationAccesses = new ArrayList<>();
- for (RecentLocationAccesses.Access access : mRecentLocationAccesses.getAppListSorted(
+ final List<RecentAppOpsAccess.Access> recentLocationAccesses = new ArrayList<>();
+ for (RecentAppOpsAccess.Access access : mRecentLocationAccesses.getAppListSorted(
mShowSystem)) {
if (isRequestMatchesProfileType(userManager, access, mType)) {
recentLocationAccesses.add(access);
@@ -80,7 +80,7 @@
banner.setSelectable(false);
mCategoryAllRecentLocationAccess.addPreference(banner);
} else {
- for (RecentLocationAccesses.Access request : recentLocationAccesses) {
+ for (RecentAppOpsAccess.Access request : recentLocationAccesses) {
final Preference appPreference = createAppPreference(
preference.getContext(),
request, mFragment);
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceControllerTest.java
index 010b444..7354555 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonFooterPreferenceControllerTest.java
@@ -16,6 +16,7 @@
package com.android.settings.accessibility;
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_2BUTTON;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;
import static com.google.common.truth.Truth.assertThat;
@@ -46,7 +47,6 @@
@Rule
public final MockitoRule mockito = MockitoJUnit.rule();
-
@Spy
private final Context mContext = ApplicationProvider.getApplicationContext();
@Spy
@@ -76,4 +76,15 @@
assertThat(mPreference.getTitle()).isEqualTo(
mContext.getText(R.string.accessibility_button_gesture_description));
}
+
+ @Test
+ public void displayPreference_navigationGestureDisabled_setCorrectTitle() {
+ when(mResources.getInteger(com.android.internal.R.integer.config_navBarInteractionMode))
+ .thenReturn(NAV_BAR_MODE_2BUTTON);
+
+ mController.displayPreference(mScreen);
+
+ assertThat(mPreference.getTitle()).isEqualTo(
+ mContext.getText(R.string.accessibility_button_description));
+ }
}
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonGesturePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonGesturePreferenceControllerTest.java
new file mode 100644
index 0000000..da44228
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonGesturePreferenceControllerTest.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+package com.android.settings.accessibility;
+
+import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
+import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_GESTURE;
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_2BUTTON;
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;
+
+import static com.android.settings.core.BasePreferenceController.AVAILABLE;
+import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.when;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.res.Resources;
+import android.provider.Settings;
+
+import androidx.preference.ListPreference;
+import androidx.test.core.app.ApplicationProvider;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+import org.robolectric.RobolectricTestRunner;
+
+/** Tests for {@link AccessibilityButtonGesturePreferenceController}. */
+@RunWith(RobolectricTestRunner.class)
+public class AccessibilityButtonGesturePreferenceControllerTest {
+
+ @Rule
+ public final MockitoRule mockito = MockitoJUnit.rule();
+
+ @Spy
+ private final Context mContext = ApplicationProvider.getApplicationContext();
+ @Spy
+ private final Resources mResources = mContext.getResources();
+ private final ContentResolver mContentResolver = mContext.getContentResolver();
+ private final ListPreference mListPreference = new ListPreference(mContext);
+ private AccessibilityButtonGesturePreferenceController mController;
+
+ @Before
+ public void setUp() {
+ mController = new AccessibilityButtonGesturePreferenceController(mContext,
+ "test_key");
+ when(mContext.getResources()).thenReturn(mResources);
+ }
+
+ @Test
+ public void getAvailabilityStatus_navigationGestureEnabled_returnAvailable() {
+ when(mResources.getInteger(com.android.internal.R.integer.config_navBarInteractionMode))
+ .thenReturn(NAV_BAR_MODE_GESTURAL);
+
+ assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
+ }
+
+ @Test
+ public void getAvailabilityStatus_navigationGestureDisabled_returnConditionallyUnavailable() {
+ when(mResources.getInteger(com.android.internal.R.integer.config_navBarInteractionMode))
+ .thenReturn(NAV_BAR_MODE_2BUTTON);
+
+ assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE);
+ }
+
+ @Test
+ public void updateState_a11yBtnModeGesture_navigationBarValue() {
+ Settings.Secure.putInt(mContentResolver, Settings.Secure.ACCESSIBILITY_BUTTON_MODE,
+ ACCESSIBILITY_BUTTON_MODE_GESTURE);
+
+ mController.updateState(mListPreference);
+
+ final String gestureValue = String.valueOf(ACCESSIBILITY_BUTTON_MODE_GESTURE);
+ assertThat(mListPreference.getValue()).isEqualTo(gestureValue);
+ }
+
+ @Test
+ public void onPreferenceChange_a11yBtnModeFloatingMenu_floatingMenuValue() {
+ final String floatingMenuValue = String.valueOf(ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU);
+
+ mController.onPreferenceChange(mListPreference, floatingMenuValue);
+
+ assertThat(mListPreference.getValue()).isEqualTo(floatingMenuValue);
+ }
+}
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreferenceControllerTest.java
new file mode 100644
index 0000000..03f7887
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreferenceControllerTest.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+package com.android.settings.accessibility;
+
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_2BUTTON;
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.content.res.Resources;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import androidx.test.core.app.ApplicationProvider;
+
+import com.android.settings.R;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+import org.robolectric.RobolectricTestRunner;
+
+/** Tests for {@link AccessibilityButtonPreferenceController}. */
+@RunWith(RobolectricTestRunner.class)
+public class AccessibilityButtonPreferenceControllerTest {
+
+ @Rule
+ public final MockitoRule mockito = MockitoJUnit.rule();
+ @Spy
+ private final Context mContext = ApplicationProvider.getApplicationContext();
+ @Spy
+ private final Resources mResources = mContext.getResources();
+ @Mock
+ private PreferenceScreen mScreen;
+ private Preference mPreference;
+ private AccessibilityButtonPreferenceController mController;
+
+ @Before
+ public void setUp() {
+ mController = new AccessibilityButtonPreferenceController(mContext, "test_key");
+ mPreference = new Preference(mContext);
+ mPreference.setKey("test_key");
+
+ when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
+ when(mContext.getResources()).thenReturn(mResources);
+ }
+
+ @Test
+ public void displayPreference_navigationGestureEnabled_setCorrectTitle() {
+ when(mResources.getInteger(com.android.internal.R.integer.config_navBarInteractionMode))
+ .thenReturn(NAV_BAR_MODE_GESTURAL);
+
+ mController.displayPreference(mScreen);
+
+ assertThat(mPreference.getTitle()).isEqualTo(
+ mContext.getText(R.string.accessibility_button_gesture_title));
+ }
+
+ @Test
+ public void displayPreference_navigationGestureDisabled_setCorrectTitle() {
+ when(mResources.getInteger(com.android.internal.R.integer.config_navBarInteractionMode))
+ .thenReturn(NAV_BAR_MODE_2BUTTON);
+
+ mController.displayPreference(mScreen);
+
+ assertThat(mPreference.getTitle()).isEqualTo(
+ mContext.getText(R.string.accessibility_button_title));
+ }
+}
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceControllerTest.java
index 3065030..05aba99 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityButtonPreviewPreferenceControllerTest.java
@@ -19,6 +19,8 @@
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR;
+import static com.android.settings.testutils.ImageTestUtils.drawableToBitmap;
+
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.verify;
@@ -28,12 +30,11 @@
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.provider.Settings;
-import android.widget.ImageView;
import androidx.test.core.app.ApplicationProvider;
import com.android.settings.R;
-import com.android.settings.testutils.ImageTestUtils;
+import com.android.settingslib.widget.IllustrationPreference;
import org.junit.Before;
import org.junit.Rule;
@@ -62,7 +63,7 @@
public void setUp() {
when(mContext.getContentResolver()).thenReturn(mContentResolver);
mController = new AccessibilityButtonPreviewPreferenceController(mContext, "test_key");
- mController.mPreview = new ImageView(mContext);
+ mController.mIllustrationPreference = new IllustrationPreference(mContext);
}
@Test
@@ -74,8 +75,8 @@
final Drawable navigationBarDrawable = mContext.getDrawable(
R.drawable.accessibility_button_navigation);
- assertThat(ImageTestUtils.drawableToBitmap(mController.mPreview.getDrawable()).sameAs(
- ImageTestUtils.drawableToBitmap(navigationBarDrawable))).isTrue();
+ assertThat(drawableToBitmap(mController.mIllustrationPreference.getImageDrawable()).sameAs(
+ drawableToBitmap(navigationBarDrawable))).isTrue();
}
@Test
@@ -90,10 +91,11 @@
mController.mContentObserver.onChange(false);
final Drawable smallFloatingMenuWithTenOpacityDrawable =
- FloatingMenuLayerDrawable.createLayerDrawable(mContext,
+ AccessibilityLayerDrawable.createLayerDrawable(mContext,
R.drawable.accessibility_button_preview_small_floating_menu, 10);
- assertThat(mController.mPreview.getDrawable().getConstantState()).isEqualTo(
- smallFloatingMenuWithTenOpacityDrawable.getConstantState());
+ assertThat(
+ mController.mIllustrationPreference.getImageDrawable().getConstantState())
+ .isEqualTo(smallFloatingMenuWithTenOpacityDrawable.getConstantState());
}
@Test
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityFooterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityFooterPreferenceControllerTest.java
new file mode 100644
index 0000000..d6c8d99
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityFooterPreferenceControllerTest.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+package com.android.settings.accessibility;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.TextView;
+
+import androidx.preference.PreferenceScreen;
+import androidx.preference.PreferenceViewHolder;
+import androidx.test.core.app.ApplicationProvider;
+
+import com.android.settings.R;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+import org.robolectric.RobolectricTestRunner;
+
+/**
+ * Tests for {@link AccessibilityFooterPreferenceController}.
+ */
+@RunWith(RobolectricTestRunner.class)
+public class AccessibilityFooterPreferenceControllerTest {
+
+ private static final String TEST_KEY = "test_pref_key";
+ private static final String TEST_TITLE = "test_title";
+ private static final String TEST_INTRODUCTION_TITLE = "test_introduction_title";
+ private static final String TEST_CONTENT_DESCRIPTION = "test_content_description";
+ private static final int TEST_HELP_ID = 12345;
+
+ @Rule
+ public final MockitoRule mockito = MockitoJUnit.rule();
+
+ @Spy
+ private final Context mContext = ApplicationProvider.getApplicationContext();
+ @Mock
+ private PreferenceScreen mScreen;
+ private AccessibilityFooterPreferenceController mController;
+ private AccessibilityFooterPreference mPreference;
+ private PreferenceViewHolder mPreferenceViewHolder;
+
+ @Before
+ public void setUp() {
+ mController = new AccessibilityFooterPreferenceController(mContext, TEST_KEY);
+ mPreference = new AccessibilityFooterPreference(mContext);
+ mPreference.setKey(TEST_KEY);
+ mPreference.setTitle(TEST_TITLE);
+
+ final LayoutInflater inflater = LayoutInflater.from(mContext);
+ final View view = inflater.inflate(R.layout.preference_footer, null);
+ mPreferenceViewHolder = PreferenceViewHolder.createInstanceForTests(view);
+ mPreference.onBindViewHolder(mPreferenceViewHolder);
+
+ when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
+ }
+
+ @Test
+ public void setIntroductionTitle_setCorrectIntroductionTitle() {
+ mController.setIntroductionTitle(TEST_INTRODUCTION_TITLE);
+
+ assertThat(mController.getIntroductionTitle()).isEqualTo(TEST_INTRODUCTION_TITLE);
+ }
+
+ @Test
+ public void onBindViewHolder_setIntroductionTitle_setCorrectIntroductionTitle() {
+ mController.setIntroductionTitle(TEST_INTRODUCTION_TITLE);
+ mController.displayPreference(mScreen);
+
+ mPreference.onBindViewHolder(mPreferenceViewHolder);
+
+ final TextView summaryView = (TextView) mPreferenceViewHolder
+ .findViewById(android.R.id.title);
+ assertThat(summaryView.getContentDescription().toString())
+ .contains(TEST_INTRODUCTION_TITLE);
+ }
+
+ @Test
+ public void setupHelpLink_setCorrectHelpLinkAndContentDescription() {
+ mController.setupHelpLink(TEST_HELP_ID, TEST_CONTENT_DESCRIPTION);
+
+ assertThat(mController.getHelpResource()).isEqualTo(TEST_HELP_ID);
+ assertThat(mController.getLearnMoreContentDescription())
+ .isEqualTo(TEST_CONTENT_DESCRIPTION);
+ }
+
+ @Test
+ public void onBindViewHolder_setupHelpLink_setCorrectHelpLinkAndContentDescription() {
+ mController.setupHelpLink(TEST_HELP_ID, TEST_CONTENT_DESCRIPTION);
+ mController.displayPreference(mScreen);
+
+ mPreference.onBindViewHolder(mPreferenceViewHolder);
+
+ final TextView learnMoreView = (TextView) mPreferenceViewHolder
+ .findViewById(com.android.settingslib.R.id.settingslib_learn_more);
+ assertThat(learnMoreView.getContentDescription().toString())
+ .contains(TEST_CONTENT_DESCRIPTION);
+ assertThat(mPreference.isLinkEnabled()).isTrue();
+ }
+}
diff --git a/tests/robotests/src/com/android/settings/accessibility/FloatingMenuLayerDrawableTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityLayerDrawableTest.java
similarity index 83%
rename from tests/robotests/src/com/android/settings/accessibility/FloatingMenuLayerDrawableTest.java
rename to tests/robotests/src/com/android/settings/accessibility/AccessibilityLayerDrawableTest.java
index 45cefe4..915c788 100644
--- a/tests/robotests/src/com/android/settings/accessibility/FloatingMenuLayerDrawableTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityLayerDrawableTest.java
@@ -30,9 +30,9 @@
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
-/** Tests for {@link FloatingMenuLayerDrawable}. */
+/** Tests for {@link AccessibilityLayerDrawable}. */
@RunWith(RobolectricTestRunner.class)
-public class FloatingMenuLayerDrawableTest {
+public class AccessibilityLayerDrawableTest {
private static final int TEST_RES_ID =
com.android.internal.R.drawable.ic_accessibility_magnification;
@@ -46,8 +46,8 @@
R.drawable.accessibility_button_preview_base);
final Drawable expected2ndDrawable = mContext.getDrawable(TEST_RES_ID);
- final FloatingMenuLayerDrawable actualDrawable =
- FloatingMenuLayerDrawable.createLayerDrawable(mContext, TEST_RES_ID,
+ final AccessibilityLayerDrawable actualDrawable =
+ AccessibilityLayerDrawable.createLayerDrawable(mContext, TEST_RES_ID,
/* opacity= */ 27);
final Drawable actual1stDrawable = actualDrawable.getDrawable(0);
@@ -60,14 +60,14 @@
@Test
public void updateLayerDrawable_expectedFloatingMenuLayerDrawableState() {
- final FloatingMenuLayerDrawable originalDrawable =
- FloatingMenuLayerDrawable.createLayerDrawable(mContext, TEST_RES_ID, /* opacity= */
+ final AccessibilityLayerDrawable originalDrawable =
+ AccessibilityLayerDrawable.createLayerDrawable(mContext, TEST_RES_ID, /* opacity= */
72);
originalDrawable.updateLayerDrawable(mContext, TEST_RES_ID_2, /* opacity= */ 27);
assertThat(originalDrawable.getConstantState()).isEqualTo(
- new FloatingMenuLayerDrawable.FloatingMenuLayerDrawableState(mContext,
+ new AccessibilityLayerDrawable.AccessibilityLayerDrawableState(mContext,
TEST_RES_ID_2, /* opacity= */ 27));
}
}
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartPreferenceControllerTest.java
index fd4e82d..43fbe81 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartPreferenceControllerTest.java
@@ -50,7 +50,6 @@
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -65,7 +64,6 @@
import java.util.Locale;
import java.util.List;
import java.util.Map;
-import java.util.TimeZone;
@RunWith(RobolectricTestRunner.class)
public final class BatteryChartPreferenceControllerTest {
@@ -125,37 +123,6 @@
createBatteryHistoryMap());
}
- @Ignore
- @Test
- public void testOnResume_uiModeIsChanged_clearBatteryDiffEntryCache() {
- doReturn(mResources).when(mContext).getResources();
- doReturn(mConfiguration).when(mResources).getConfiguration();
- mConfiguration.uiMode = Configuration.UI_MODE_NIGHT_UNDEFINED;
- // Ensures the testing environment is correct.
- assertThat(BatteryDiffEntry.sResourceCache).hasSize(1);
- mBatteryChartPreferenceController.onResume();
- // Changes the uiMode in the configuration.
- mConfiguration.uiMode = Configuration.UI_MODE_NIGHT_YES;
-
- mBatteryChartPreferenceController.onResume();
- assertThat(BatteryDiffEntry.sResourceCache).isEmpty();
- }
-
- @Ignore
- @Test
- public void testOnResume_uiModeIsNotChanged_notClearBatteryDiffEntryCache() {
- doReturn(mResources).when(mContext).getResources();
- doReturn(mConfiguration).when(mResources).getConfiguration();
- mConfiguration.uiMode = Configuration.UI_MODE_NIGHT_UNDEFINED;
- // Ensures the testing environment is correct.
- assertThat(BatteryDiffEntry.sResourceCache).hasSize(1);
-
- mBatteryChartPreferenceController.onResume();
- assertThat(BatteryDiffEntry.sResourceCache).isNotEmpty();
- verify(mMetricsFeatureProvider)
- .action(mContext, SettingsEnums.OPEN_BATTERY_USAGE);
- }
-
@Test
public void testOnDestroy_activityIsChanging_clearBatteryEntryCache() {
doReturn(true).when(mSettingsActivity).isChangingConfigurations();
@@ -579,12 +546,12 @@
// Verifies the title in the preference group.
verify(mBatteryChartPreferenceController.mAppListPrefGroup)
.setTitle(captor.capture());
- assertThat(captor.getValue()).isEqualTo("App usage for 4 - 7");
+ assertThat(captor.getValue()).isNotEqualTo("App usage for past 24 hr");
// Verifies the title in the expandable divider.
captor = ArgumentCaptor.forClass(String.class);
verify(mBatteryChartPreferenceController.mExpandDividerPreference)
.setTitle(captor.capture());
- assertThat(captor.getValue()).isEqualTo("System usage for 4 - 7");
+ assertThat(captor.getValue()).isNotEqualTo("System usage for past 24 hr");
}
@Test
@@ -722,9 +689,6 @@
new long[] {1619196786769L, 0L, 1619247636826L};
ConvertUtils.utcToLocalTimeHour(
mContext, /*timestamp=*/ 0, /*is24HourFormat=*/ false);
- // Simulates the locale in GMT.
- ConvertUtils.sSimpleDateFormatForHour
- .setTimeZone(TimeZone.getTimeZone("GMT"));
}
private BatteryChartPreferenceController createController() {
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartViewTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartViewTest.java
index d19a012..0b75e79 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartViewTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/BatteryChartViewTest.java
@@ -33,7 +33,6 @@
import com.android.settings.testutils.FakeFeatureFactory;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -44,7 +43,6 @@
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Locale;
-import java.util.TimeZone;
@RunWith(RobolectricTestRunner.class)
public final class BatteryChartViewTest {
@@ -233,21 +231,4 @@
verify(mBatteryChartView.mHandler)
.postDelayed(mBatteryChartView.mUpdateClickableStateRun, 500L);
}
-
- @Ignore
- @Test
- public void testSetLatestTimestamp_generateExpectedTimestamps() {
- final long timestamp = 1619196786769L;
- ConvertUtils.sSimpleDateFormatForHour = null;
- // Invokes the method first to create the SimpleDateFormat.
- ConvertUtils.utcToLocalTimeHour(
- mContext, /*timestamp=*/ 0, /*is24HourFormat=*/ false);
- ConvertUtils.sSimpleDateFormatForHour
- .setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));
- final String[] expectedTimestamps = new String[] {"00", "06", "12", "18", "00"};
-
- mBatteryChartView.setLatestTimestamp(timestamp);
-
- assertThat(mBatteryChartView.mTimestamps).isEqualTo(expectedTimestamps);
- }
}
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/ConvertUtilsTest.java b/tests/robotests/src/com/android/settings/fuelgauge/ConvertUtilsTest.java
index 0b1a1e3..8ae5048 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/ConvertUtilsTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/ConvertUtilsTest.java
@@ -30,7 +30,6 @@
import com.android.settings.testutils.FakeFeatureFactory;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -317,71 +316,6 @@
.isEqualTo(entry.mConsumePower * ratio);
}
- @Ignore
- @Test
- public void testUtcToLocalTime_returnExpectedResult() {
- ConvertUtils.sZoneId = null;
- ConvertUtils.sLocale = null;
- final long timestamp = 1619196786769L;
- final String expectedZoneId = "America/Los_Angeles";
- ConvertUtils.sSimpleDateFormat = null;
- // Invokes the method first to create the SimpleDateFormat.
- ConvertUtils.utcToLocalTime(mContext, /*timestamp=*/ 0);
- ConvertUtils.sSimpleDateFormat
- .setTimeZone(TimeZone.getTimeZone(expectedZoneId));
- mContext.getResources().getConfiguration().setLocales(
- new LocaleList(new Locale("en_US")));
-
- assertThat(ConvertUtils.utcToLocalTime(mContext, timestamp))
- .isEqualTo("Apr 24,2021 00:53:06");
- assertThat(ConvertUtils.sZoneId).isNotEqualTo(expectedZoneId);
- assertThat(ConvertUtils.sLocale).isEqualTo(new Locale("en_US"));
- }
-
- @Ignore
- @Test
- public void testUtcToLocalTimeHour_12HourFormat_returnExpectedResult() {
- ConvertUtils.sZoneIdForHour = null;
- ConvertUtils.sLocaleForHour = null;
- final long timestamp = 1619000086769L;
- final String expectedZoneId = "America/Los_Angeles";
- ConvertUtils.sSimpleDateFormatForHour = null;
- // Invokes the method first to create the SimpleDateFormat.
- ConvertUtils.utcToLocalTimeHour(
- mContext, /*timestamp=*/ 0, /*is24HourFormat=*/ false);
- ConvertUtils.sSimpleDateFormatForHour
- .setTimeZone(TimeZone.getTimeZone(expectedZoneId));
- mContext.getResources().getConfiguration().setLocales(
- new LocaleList(new Locale("en_US")));
-
- assertThat(ConvertUtils.utcToLocalTimeHour(
- mContext, timestamp, /*is24HourFormat=*/ false)).isEqualTo("6");
- assertThat(ConvertUtils.sZoneIdForHour).isNotEqualTo(expectedZoneId);
- assertThat(ConvertUtils.sLocaleForHour).isEqualTo(new Locale("en_US"));
- }
-
- @Ignore
- @Test
- public void testUtcToLocalTimeHour_24HourFormat_returnExpectedResult() {
- ConvertUtils.sZoneIdForHour = null;
- ConvertUtils.sLocaleForHour = null;
- final long timestamp = 1619000086769L;
- final String expectedZoneId = "America/Los_Angeles";
- ConvertUtils.sSimpleDateFormatForHour = null;
- // Invokes the method first to create the SimpleDateFormat.
- ConvertUtils.utcToLocalTimeHour(
- mContext, /*timestamp=*/ 0, /*is24HourFormat=*/ false);
- ConvertUtils.sSimpleDateFormatForHour
- .setTimeZone(TimeZone.getTimeZone(expectedZoneId));
- mContext.getResources().getConfiguration().setLocales(
- new LocaleList(new Locale("en_US")));
-
- assertThat(ConvertUtils.utcToLocalTimeHour(
- mContext, timestamp, /*is24HourFormat=*/ true)).isEqualTo("18");
- assertThat(ConvertUtils.sZoneIdForHour).isNotEqualTo(expectedZoneId);
- assertThat(ConvertUtils.sLocaleForHour).isEqualTo(new Locale("en_US"));
- }
-
@Test
public void getLocale_nullContext_returnDefaultLocale() {
assertThat(ConvertUtils.getLocale(/*context=*/ null))
diff --git a/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java
index 32c8627..52068c4 100644
--- a/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java
@@ -18,12 +18,10 @@
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
import android.content.Context;
-import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
@@ -34,7 +32,7 @@
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.testutils.shadow.ShadowDeviceConfig;
-import com.android.settingslib.location.RecentLocationAccesses;
+import com.android.settingslib.applications.RecentAppOpsAccess;
import org.junit.After;
import org.junit.Before;
@@ -48,7 +46,6 @@
import org.robolectric.annotation.Config;
import java.util.ArrayList;
-import java.util.List;
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {ShadowDeviceConfig.class})
@@ -61,7 +58,7 @@
@Mock
private DashboardFragment mDashboardFragment;
@Mock
- private RecentLocationAccesses mRecentLocationApps;
+ private RecentAppOpsAccess mRecentLocationApps;
private Context mContext;
private RecentLocationAccessPreferenceController mController;
@@ -110,17 +107,4 @@
mContext.getText(R.string.location_recent_location_access_view_details));
assertThat(details.hasOnClickListeners()).isTrue();
}
-
- private List<RecentLocationAccesses.Access> createMockAccesses(int count) {
- final List<RecentLocationAccesses.Access> accesses = new ArrayList<>();
- for (int i = 0; i < count; i++) {
- final Drawable icon = mock(Drawable.class);
- // Add mock accesses
- final RecentLocationAccesses.Access access = new RecentLocationAccesses.Access(
- "packageName", android.os.Process.myUserHandle(), icon,
- "appTitle" + i, "appSummary" + i, 1000 - i);
- accesses.add(access);
- }
- return accesses;
- }
}