Merge "Fix Guest string was not translated in UMS.userWithName()" into tm-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 78d729a..be4810f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1998,11 +1998,6 @@
</activity-alias>
<activity
- android:name=".accessibility.AccessibilityScreenSizeForSetupWizardActivity"
- android:theme="@android:style/Theme.DeviceDefault.Settings"
- android:exported="false"/>
-
- <activity
android:name="Settings$AccessibilityDaltonizerSettingsActivity"
android:exported="true"
android:label="@string/accessibility_display_daltonizer_preference_title">
diff --git a/res/drawable/accessibility_auto_added_qs_tooltips_illustration.xml b/res/drawable/accessibility_auto_added_qs_tooltips_illustration.xml
index 2583b6f..64245f1 100644
--- a/res/drawable/accessibility_auto_added_qs_tooltips_illustration.xml
+++ b/res/drawable/accessibility_auto_added_qs_tooltips_illustration.xml
@@ -15,48 +15,38 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="178dp"
- android:height="150dp"
- android:viewportWidth="178"
- android:viewportHeight="150">
+ android:width="181dp"
+ android:height="86dp"
+ android:viewportWidth="181"
+ android:viewportHeight="86">
+ <group>
+ <clip-path
+ android:pathData="M0,0h181v86h-181z"/>
+ <path
+ android:pathData="M17.388,4.007L162.381,4.007A13,13 0,0 1,175.381 17.007L175.381,323.989A13,13 0,0 1,162.381 336.989L17.388,336.989A13,13 0,0 1,4.388 323.989L4.388,17.007A13,13 0,0 1,17.388 4.007z"
+ android:strokeWidth="6"
+ android:fillColor="#ffffff"
+ android:strokeColor="#EDEDED"/>
+ </group>
<path
- android:pathData="M161.612,147.208L16.619,147.208A13,13 0,0 1,3.619 134.208L3.619,-442.725A13,13 0,0 1,16.619 -455.725L161.612,-455.725A13,13 0,0 1,174.612 -442.725L174.612,134.208A13,13 0,0 1,161.612 147.208z"
- android:strokeWidth="6"
- android:fillColor="#ffffff"
- android:strokeColor="#EDEDED"/>
+ android:pathData="M21.548,23.014L158.221,23.014A3.078,3.078 0,0 1,161.299 26.092L161.299,26.092A3.078,3.078 0,0 1,158.221 29.17L21.548,29.17A3.078,3.078 0,0 1,18.469 26.092L18.469,26.092A3.078,3.078 0,0 1,21.548 23.014z"
+ android:fillColor="#EDEDED"/>
<path
- android:pathData="M28.47,103.945L48.47,103.945A12,12 0,0 1,60.47 115.945L60.47,115.945A12,12 0,0 1,48.47 127.945L28.47,127.945A12,12 0,0 1,16.47 115.945L16.47,115.945A12,12 0,0 1,28.47 103.945z"
+ android:pathData="M24.469,43.946L78.959,43.946A6,6 0,0 1,84.959 49.946L84.959,68.728A6,6 0,0 1,78.959 74.728L24.469,74.728A6,6 0,0 1,18.469 68.728L18.469,49.946A6,6 0,0 1,24.469 43.946z"
+ android:fillColor="#EDEDED"/>
+ <path
+ android:pathData="M100.81,43.946L155.299,43.946A6,6 0,0 1,161.299 49.946L161.299,68.728A6,6 0,0 1,155.299 74.728L100.81,74.728A6,6 0,0 1,94.81 68.728L94.81,49.946A6,6 0,0 1,100.81 43.946z"
+ android:fillColor="#E0DCDC"/>
+ <path
+ android:pathData="M100.81,43.946L155.299,43.946A6,6 0,0 1,161.299 49.946L161.299,68.728A6,6 0,0 1,155.299 74.728L100.81,74.728A6,6 0,0 1,94.81 68.728L94.81,49.946A6,6 0,0 1,100.81 43.946z"
android:fillColor="#797272"/>
<path
- android:pathData="M38.5,115.5m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
- android:fillColor="#BCEDDF"
- android:fillAlpha="0.5"/>
+ android:pathData="M104.197,55.027L110.047,55.027A2,2 0,0 1,112.047 57.027L112.047,62.878A2,2 0,0 1,110.047 64.878L104.197,64.878A2,2 0,0 1,102.197 62.878L102.197,57.027A2,2 0,0 1,104.197 55.027z"
+ android:fillColor="#ffffff"/>
<path
- android:pathData="M45.279,108.52L46.48,109.72C47.182,110.414 47.182,111.543 46.48,112.237L34.717,124H31V120.283L42.763,108.52C43.457,107.827 44.586,107.827 45.279,108.52ZM32.778,122.222L34.032,122.275L42.763,113.535L41.51,112.281L32.778,121.013V122.222Z"
- android:fillColor="#ffffff"
- android:fillType="evenOdd"/>
+ android:pathData="M117.588,53.796L139.751,53.796A1.847,1.847 0,0 1,141.598 55.643L141.598,55.643A1.847,1.847 0,0 1,139.751 57.49L117.588,57.49A1.847,1.847 0,0 1,115.741 55.643L115.741,55.643A1.847,1.847 0,0 1,117.588 53.796z"
+ android:fillColor="#ffffff"/>
<path
- android:pathData="M79,104L99,104A12,12 0,0 1,111 116L111,116A12,12 0,0 1,99 128L79,128A12,12 0,0 1,67 116L67,116A12,12 0,0 1,79 104z"
- android:fillColor="#E0DCDC"/>
- <path
- android:pathData="M79,104L99,104A12,12 0,0 1,111 116L111,116A12,12 0,0 1,99 128L79,128A12,12 0,0 1,67 116L67,116A12,12 0,0 1,79 104z"
- android:fillColor="#E7E7E7"/>
- <path
- android:pathData="M129,104L149,104A12,12 0,0 1,161 116L161,116A12,12 0,0 1,149 128L129,128A12,12 0,0 1,117 116L117,116A12,12 0,0 1,129 104z"
- android:fillColor="#E0DCDC"/>
- <path
- android:pathData="M129,104L149,104A12,12 0,0 1,161 116L161,116A12,12 0,0 1,149 128L129,128A12,12 0,0 1,117 116L117,116A12,12 0,0 1,129 104z"
- android:fillColor="#E7E7E7"/>
- <path
- android:pathData="M22,14L76.49,14A6,6 0,0 1,82.49 20L82.49,38.782A6,6 0,0 1,76.49 44.782L22,44.782A6,6 0,0 1,16 38.782L16,20A6,6 0,0 1,22 14z"
- android:fillColor="#EDEDED"/>
- <path
- android:pathData="M22,56L76.49,56A6,6 0,0 1,82.49 62L82.49,80.782A6,6 0,0 1,76.49 86.782L22,86.782A6,6 0,0 1,16 80.782L16,62A6,6 0,0 1,22 56z"
- android:fillColor="#EDEDED"/>
- <path
- android:pathData="M101,14L155.49,14A6,6 0,0 1,161.49 20L161.49,38.782A6,6 0,0 1,155.49 44.782L101,44.782A6,6 0,0 1,95 38.782L95,20A6,6 0,0 1,101 14z"
- android:fillColor="#EDEDED"/>
- <path
- android:pathData="M101,56L155.49,56A6,6 0,0 1,161.49 62L161.49,80.782A6,6 0,0 1,155.49 86.782L101,86.782A6,6 0,0 1,95 80.782L95,62A6,6 0,0 1,101 56z"
- android:fillColor="#EDEDED"/>
+ android:pathData="M117.588,62.415L152.064,62.415A1.847,1.847 0,0 1,153.911 64.262L153.911,64.262A1.847,1.847 0,0 1,152.064 66.109L117.588,66.109A1.847,1.847 0,0 1,115.741 64.262L115.741,64.262A1.847,1.847 0,0 1,117.588 62.415z"
+ android:fillColor="#C8C5C5"/>
</vector>
diff --git a/res/drawable/accessibility_qs_tooltips_illustration.xml b/res/drawable/accessibility_qs_tooltips_illustration.xml
index 64245f1..2583b6f 100644
--- a/res/drawable/accessibility_qs_tooltips_illustration.xml
+++ b/res/drawable/accessibility_qs_tooltips_illustration.xml
@@ -15,38 +15,48 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="181dp"
- android:height="86dp"
- android:viewportWidth="181"
- android:viewportHeight="86">
- <group>
- <clip-path
- android:pathData="M0,0h181v86h-181z"/>
- <path
- android:pathData="M17.388,4.007L162.381,4.007A13,13 0,0 1,175.381 17.007L175.381,323.989A13,13 0,0 1,162.381 336.989L17.388,336.989A13,13 0,0 1,4.388 323.989L4.388,17.007A13,13 0,0 1,17.388 4.007z"
- android:strokeWidth="6"
- android:fillColor="#ffffff"
- android:strokeColor="#EDEDED"/>
- </group>
+ android:width="178dp"
+ android:height="150dp"
+ android:viewportWidth="178"
+ android:viewportHeight="150">
<path
- android:pathData="M21.548,23.014L158.221,23.014A3.078,3.078 0,0 1,161.299 26.092L161.299,26.092A3.078,3.078 0,0 1,158.221 29.17L21.548,29.17A3.078,3.078 0,0 1,18.469 26.092L18.469,26.092A3.078,3.078 0,0 1,21.548 23.014z"
- android:fillColor="#EDEDED"/>
+ android:pathData="M161.612,147.208L16.619,147.208A13,13 0,0 1,3.619 134.208L3.619,-442.725A13,13 0,0 1,16.619 -455.725L161.612,-455.725A13,13 0,0 1,174.612 -442.725L174.612,134.208A13,13 0,0 1,161.612 147.208z"
+ android:strokeWidth="6"
+ android:fillColor="#ffffff"
+ android:strokeColor="#EDEDED"/>
<path
- android:pathData="M24.469,43.946L78.959,43.946A6,6 0,0 1,84.959 49.946L84.959,68.728A6,6 0,0 1,78.959 74.728L24.469,74.728A6,6 0,0 1,18.469 68.728L18.469,49.946A6,6 0,0 1,24.469 43.946z"
- android:fillColor="#EDEDED"/>
- <path
- android:pathData="M100.81,43.946L155.299,43.946A6,6 0,0 1,161.299 49.946L161.299,68.728A6,6 0,0 1,155.299 74.728L100.81,74.728A6,6 0,0 1,94.81 68.728L94.81,49.946A6,6 0,0 1,100.81 43.946z"
- android:fillColor="#E0DCDC"/>
- <path
- android:pathData="M100.81,43.946L155.299,43.946A6,6 0,0 1,161.299 49.946L161.299,68.728A6,6 0,0 1,155.299 74.728L100.81,74.728A6,6 0,0 1,94.81 68.728L94.81,49.946A6,6 0,0 1,100.81 43.946z"
+ android:pathData="M28.47,103.945L48.47,103.945A12,12 0,0 1,60.47 115.945L60.47,115.945A12,12 0,0 1,48.47 127.945L28.47,127.945A12,12 0,0 1,16.47 115.945L16.47,115.945A12,12 0,0 1,28.47 103.945z"
android:fillColor="#797272"/>
<path
- android:pathData="M104.197,55.027L110.047,55.027A2,2 0,0 1,112.047 57.027L112.047,62.878A2,2 0,0 1,110.047 64.878L104.197,64.878A2,2 0,0 1,102.197 62.878L102.197,57.027A2,2 0,0 1,104.197 55.027z"
- android:fillColor="#ffffff"/>
+ android:pathData="M38.5,115.5m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
+ android:fillColor="#BCEDDF"
+ android:fillAlpha="0.5"/>
<path
- android:pathData="M117.588,53.796L139.751,53.796A1.847,1.847 0,0 1,141.598 55.643L141.598,55.643A1.847,1.847 0,0 1,139.751 57.49L117.588,57.49A1.847,1.847 0,0 1,115.741 55.643L115.741,55.643A1.847,1.847 0,0 1,117.588 53.796z"
- android:fillColor="#ffffff"/>
+ android:pathData="M45.279,108.52L46.48,109.72C47.182,110.414 47.182,111.543 46.48,112.237L34.717,124H31V120.283L42.763,108.52C43.457,107.827 44.586,107.827 45.279,108.52ZM32.778,122.222L34.032,122.275L42.763,113.535L41.51,112.281L32.778,121.013V122.222Z"
+ android:fillColor="#ffffff"
+ android:fillType="evenOdd"/>
<path
- android:pathData="M117.588,62.415L152.064,62.415A1.847,1.847 0,0 1,153.911 64.262L153.911,64.262A1.847,1.847 0,0 1,152.064 66.109L117.588,66.109A1.847,1.847 0,0 1,115.741 64.262L115.741,64.262A1.847,1.847 0,0 1,117.588 62.415z"
- android:fillColor="#C8C5C5"/>
+ android:pathData="M79,104L99,104A12,12 0,0 1,111 116L111,116A12,12 0,0 1,99 128L79,128A12,12 0,0 1,67 116L67,116A12,12 0,0 1,79 104z"
+ android:fillColor="#E0DCDC"/>
+ <path
+ android:pathData="M79,104L99,104A12,12 0,0 1,111 116L111,116A12,12 0,0 1,99 128L79,128A12,12 0,0 1,67 116L67,116A12,12 0,0 1,79 104z"
+ android:fillColor="#E7E7E7"/>
+ <path
+ android:pathData="M129,104L149,104A12,12 0,0 1,161 116L161,116A12,12 0,0 1,149 128L129,128A12,12 0,0 1,117 116L117,116A12,12 0,0 1,129 104z"
+ android:fillColor="#E0DCDC"/>
+ <path
+ android:pathData="M129,104L149,104A12,12 0,0 1,161 116L161,116A12,12 0,0 1,149 128L129,128A12,12 0,0 1,117 116L117,116A12,12 0,0 1,129 104z"
+ android:fillColor="#E7E7E7"/>
+ <path
+ android:pathData="M22,14L76.49,14A6,6 0,0 1,82.49 20L82.49,38.782A6,6 0,0 1,76.49 44.782L22,44.782A6,6 0,0 1,16 38.782L16,20A6,6 0,0 1,22 14z"
+ android:fillColor="#EDEDED"/>
+ <path
+ android:pathData="M22,56L76.49,56A6,6 0,0 1,82.49 62L82.49,80.782A6,6 0,0 1,76.49 86.782L22,86.782A6,6 0,0 1,16 80.782L16,62A6,6 0,0 1,22 56z"
+ android:fillColor="#EDEDED"/>
+ <path
+ android:pathData="M101,14L155.49,14A6,6 0,0 1,161.49 20L161.49,38.782A6,6 0,0 1,155.49 44.782L101,44.782A6,6 0,0 1,95 38.782L95,20A6,6 0,0 1,101 14z"
+ android:fillColor="#EDEDED"/>
+ <path
+ android:pathData="M101,56L155.49,56A6,6 0,0 1,161.49 62L161.49,80.782A6,6 0,0 1,155.49 86.782L101,86.782A6,6 0,0 1,95 80.782L95,62A6,6 0,0 1,101 56z"
+ android:fillColor="#EDEDED"/>
</vector>
diff --git a/res/layout/accessibility_screen_size_setup_wizard.xml b/res/layout/accessibility_screen_size_setup_wizard.xml
deleted file mode 100644
index e4bc55b..0000000
--- a/res/layout/accessibility_screen_size_setup_wizard.xml
+++ /dev/null
@@ -1,31 +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.
--->
-<com.google.android.setupdesign.GlifLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/setup_wizard_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:icon="@drawable/ic_accessibility_visibility"
- app:sucHeaderText="@string/title_font_size"
- app:sudDescriptionText="@string/short_summary_font_size">
-
- <FrameLayout
- android:id="@+id/content_frame"
- android:layout_marginTop="@dimen/preview_size_top_margin"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
-</com.google.android.setupdesign.GlifLayout>
\ No newline at end of file
diff --git a/res/layout/suw_font_size_fragment.xml b/res/layout/suw_font_size_fragment.xml
deleted file mode 100644
index 898b9eb..0000000
--- a/res/layout/suw_font_size_fragment.xml
+++ /dev/null
@@ -1,80 +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.
--->
-<androidx.core.widget.NestedScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fillViewport="true">
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <include layout="@layout/suw_preview_seek_bar_view_pager"/>
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
-
- <com.android.settings.widget.DotsPageIndicator
- android:id="@+id/page_indicator"
- style="@style/PreviewPagerPageIndicator"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:padding="3dp"/>
-
- <TextView
- android:id="@+id/current_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:padding="6dp"
- android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.TextView"
- android:elevation="2dp"/>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:paddingTop="8dp">
-
- <ImageView
- android:id="@+id/smaller"
- android:src="@drawable/ic_font_size_16dp"
- android:contentDescription="@string/font_size_make_smaller_desc"
- style="@style/screen_size_imageview_style"/>
-
- <com.android.settings.widget.LabeledSeekBar
- android:id="@+id/seek_bar"
- android:layout_width="0dp"
- android:layout_height="48dp"
- android:layout_weight="1"
- style="@android:style/Widget.Material.SeekBar.Discrete"/>
-
- <ImageView
- android:id="@+id/larger"
- android:src="@drawable/ic_font_size_24dp"
- android:contentDescription="@string/font_size_make_larger_desc"
- style="@style/screen_size_imageview_style"/>
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
-</androidx.core.widget.NestedScrollView>
diff --git a/res/layout/suw_preview_seek_bar_view_pager.xml b/res/layout/suw_preview_seek_bar_view_pager.xml
deleted file mode 100644
index 71ec5f0..0000000
--- a/res/layout/suw_preview_seek_bar_view_pager.xml
+++ /dev/null
@@ -1,42 +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.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:orientation="vertical"
- android:paddingStart="@dimen/preview_pager_padding"
- android:paddingEnd="@dimen/preview_pager_padding"
- android:background="@drawable/preview_seek_bar_outline" >
-
- <androidx.viewpager.widget.ViewPager
- android:id="@+id/preview_pager"
- android:layout_width="match_parent"
- android:layout_height="200dp"
- android:layout_weight="1"
- android:background="?android:attr/colorBackground"
- android:contentDescription="@string/preview_pager_content_description" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="36dp"
- android:paddingStart="32dp"
- android:gravity="start|center"
- android:text="@string/screen_zoom_preview_title"
- android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"
- android:importantForAccessibility="no" />
-</LinearLayout>
-
diff --git a/res/layout/suw_screen_zoom_fragment.xml b/res/layout/suw_screen_zoom_fragment.xml
deleted file mode 100644
index 369ff14..0000000
--- a/res/layout/suw_screen_zoom_fragment.xml
+++ /dev/null
@@ -1,79 +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.
--->
-<androidx.core.widget.NestedScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fillViewport="true">
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <include layout="@layout/suw_preview_seek_bar_view_pager"/>
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
-
- <com.android.settings.widget.DotsPageIndicator
- android:id="@+id/page_indicator"
- style="@style/PreviewPagerPageIndicator"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:padding="3dp"/>
-
- <TextView
- android:id="@+id/current_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:padding="6dp"
- android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.TextView"
- android:elevation="2dp"/>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center_vertical">
-
- <ImageView
- android:id="@+id/smaller"
- android:src="@drawable/ic_remove_24dp"
- android:contentDescription="@string/screen_zoom_make_smaller_desc"
- style="@style/screen_size_imageview_style"/>
-
- <com.android.settings.widget.LabeledSeekBar
- android:id="@+id/seek_bar"
- android:layout_width="0dp"
- android:layout_height="48dp"
- android:layout_weight="1"
- style="@android:style/Widget.Material.SeekBar.Discrete"/>
-
- <ImageView
- android:id="@+id/larger"
- android:src="@drawable/ic_add_24dp"
- android:contentDescription="@string/screen_zoom_make_larger_desc"
- style="@style/screen_size_imageview_style"/>
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
-</androidx.core.widget.NestedScrollView>
diff --git a/res/values/config.xml b/res/values/config.xml
index bf78fd7..216d9e0 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -545,9 +545,6 @@
<!-- Whether to show Smart Storage toggle -->
<bool name="config_show_smart_storage_toggle">true</bool>
- <!-- Whether suw to support two panes -->
- <bool name="config_suw_supported_two_panes">false</bool>
-
<!-- Whether to support large screen -->
<bool name="config_supported_large_screen">false</bool>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 5cd1ebb..4f2dd93 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -429,9 +429,6 @@
<!-- Choose SIM Activity dimens -->
<dimen name="subtitle_bottom_padding">24dp</dimen>
- <!-- Top margin for preview view pager -->
- <dimen name="preview_size_top_margin">-12dp</dimen>
-
<!-- Battery usage chart view component -->
<dimen name="chartview_text_padding">6dp</dimen>
<dimen name="chartview_divider_width">1dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9454b5c..dc95d93 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5418,8 +5418,12 @@
<string name="accessibility_power_button_ends_call_prerefence_title">Power button ends call</string>
<!-- Title for the accessibility preference for enabling/disabling large icons for mouse/trackpad pointers. [CHAR LIMIT=35] -->
<string name="accessibility_toggle_large_pointer_icon_title">Large mouse pointer</string>
+ <!-- Summary for the accessibility preference for enabling/disabling large icons for mouse/trackpad pointers. [CHAR LIMIT=60] -->
+ <string name="accessibility_toggle_large_pointer_icon_summary">Make the mouse pointer more noticeable</string>
<!-- Title for the accessibility preference for disabling animations. [CHAR LIMIT=35] -->
<string name="accessibility_disable_animations">Remove animations</string>
+ <!-- Summary for the accessibility preference for disabling animations. [CHAR LIMIT=60] -->
+ <string name="accessibility_disable_animations_summary">Reduce movement on the screen</string>
<!-- Title for the accessibility preference for primary mono. [CHAR LIMIT=35] -->
<string name="accessibility_toggle_primary_mono_title">Mono audio</string>
<!-- Summary for the accessibility preference for primary mono. [CHAR LIMIT=60] -->
@@ -5537,7 +5541,7 @@
<!-- Used in the accessibility service settings to show quick settings tooltips for auto-added feature. [CHAR LIMIT=NONE] -->
<string name="accessibility_service_auto_added_qs_tooltips_content"><xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g> added to Quick Settings. Swipe down to turn it on or off anytime.</string>
<!-- Used in the accessibility service settings to show quick settings tooltips. [CHAR LIMIT=NONE] -->
- <string name="accessibility_service_qs_tooltips_content">You can add a shortcut to <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g> by editing quick settings</string>
+ <string name="accessibility_service_qs_tooltips_content">You can also add <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g> to Quick Settings from the top of your screen</string>
<!-- Used in the accessibility action for accessibility quick settings tooltips to dismiss. [CHAR LIMIT=NONE] -->
<string name="accessibility_quick_settings_tooltips_dismiss">Dismiss</string>
<!-- Intro for color correction settings screen to control turning on/off the feature entirely. [CHAR LIMIT=NONE] -->
@@ -11825,8 +11829,14 @@
<string name="one_handed_mode_swipe_down_category">Swipe down to</string>
<!-- Category title for one handed use the shortcut [CHAR_LIMIT=60] -->
<string name="one_handed_mode_use_shortcut_category">Use the shortcut to</string>
+ <!-- One-handed mode intro Text [CHAR_LIMIT=NONE] -->
+ <string name="one_handed_mode_intro_text">Pull down the top half of your screen so it\u2019s easier to reach with one hand</string>
<!-- One-handed mode Intro Text [CHAR_LIMIT=NONE] -->
- <string name="one_handed_mode_intro_text">To use one handed mode, swipe down from the bottom edge of the screen. To use this feature, make sure gesture navigation is turned on in system navigation settings.</string>
+ <string name="one_handed_mode_footer_text">
+ <b>How to use one-handed mode</b>\n
+ • Make sure gesture navigation is selected in system navigation settings\n
+ • Swipe down near the bottom edge of the screen
+ </string>
<!-- One-handed mode pull down screen into reach action title [CHAR_LIMIT=60] -->
<string name="one_handed_action_pull_down_screen_title">Pull screen into reach</string>
<!-- One-handed mode pull down screen into reach action title [CHAR_LIMIT=NONE] -->
@@ -13356,7 +13366,7 @@
<!-- Device controls toggle name [CHAR LIMIT=60] -->
<string name="lockscreen_privacy_controls_setting_toggle">Show device controls</string>
<!-- Device controls summary [CHAR LIMIT=NONE] -->
- <string name="lockscreen_privacy_controls_summary">Access controls when locked</string>
+ <string name="lockscreen_privacy_controls_summary">Show controls for external devices from the lock screen</string>
<!-- Trivial Device controls toggle name [CHAR LIMIT=60] -->
<string name="lockscreen_trivial_controls_setting_toggle">Control from locked device</string>
<!-- Trivial Device controls summary [CHAR LIMIT=NONE] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 3827767..c3ed5b2 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -243,16 +243,6 @@
<item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
- <style name="screen_size_imageview_style">
- <item name="android:layout_width">48dp</item>
- <item name="android:layout_height">48dp</item>
- <item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
- <item name="android:tint">?android:attr/textColorPrimary</item>
- <item name="android:tintMode">src_in</item>
- <item name="android:scaleType">center</item>
- <item name="android:focusable">true</item>
- </style>
-
<style name="TextAppearance" parent="android:TextAppearance.DeviceDefault"/>
<style name="TextAppearance.info_label">
diff --git a/res/xml/accessibility_color_and_motion.xml b/res/xml/accessibility_color_and_motion.xml
index f251d1e..86b6564 100644
--- a/res/xml/accessibility_color_and_motion.xml
+++ b/res/xml/accessibility_color_and_motion.xml
@@ -42,12 +42,14 @@
<SwitchPreference
android:key="toggle_disable_animations"
android:persistent="false"
+ android:summary="@string/accessibility_disable_animations_summary"
android:title="@string/accessibility_disable_animations"
settings:controller="com.android.settings.accessibility.DisableAnimationsPreferenceController"/>
<SwitchPreference
android:key="toggle_large_pointer_icon"
android:persistent="false"
+ android:summary="@string/accessibility_toggle_large_pointer_icon_summary"
android:title="@string/accessibility_toggle_large_pointer_icon_title"
settings:controller="com.android.settings.accessibility.LargePointerIconPreferenceController"/>
diff --git a/res/xml/one_handed_settings.xml b/res/xml/one_handed_settings.xml
index 523cf4d..7406993 100644
--- a/res/xml/one_handed_settings.xml
+++ b/res/xml/one_handed_settings.xml
@@ -22,6 +22,10 @@
android:persistent="false"
android:title="@string/one_handed_title">
+ <com.android.settingslib.widget.TopIntroPreference
+ android:key="gesture_one_handed_mode_intro"
+ android:title="@string/one_handed_mode_intro_text"/>
+
<com.android.settingslib.widget.IllustrationPreference
android:key="one_handed_header"
settings:searchable="false"
@@ -33,10 +37,6 @@
settings:keywords="@string/keywords_one_handed"
settings:controller="com.android.settings.gestures.OneHandedMainSwitchPreferenceController"/>
- <com.android.settingslib.widget.TopIntroPreference
- android:key="gesture_one_handed_mode_intro_text"
- android:title="@string/one_handed_mode_intro_text"/>
-
<PreferenceCategory
android:key="gesture_one_handed_mode_swipe_down"
android:title="@string/one_handed_mode_swipe_down_category"
@@ -46,13 +46,18 @@
android:key="gesture_one_handed_action_pull_screen_down"
android:title="@string/one_handed_action_pull_down_screen_title"
android:summary="@string/one_handed_action_pull_down_screen_summary"
- settings:controller="com.android.settings.gestures.OneHandedActionPullDownPrefController"/>
+ settings:controller="com.android.settings.gesture_one_handed_mode_footer_textgestures.OneHandedActionPullDownPrefController"/>
<com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="gesture_one_handed_action_show_notification"
android:title="@string/one_handed_action_show_notification_title"
android:summary="@string/one_handed_action_show_notification_summary"
settings:controller="com.android.settings.gestures.OneHandedActionShowNotificationPrefController"/>
-
</PreferenceCategory>
+
+ <com.android.settingslib.widget.FooterPreference
+ android:key="one_handed_mode_footer"
+ android:title="@string/one_handed_mode_footer_text"
+ android:selectable="false"
+ settings:searchable="false"/>
</PreferenceScreen>
diff --git a/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java b/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java
deleted file mode 100644
index 7c8076f..0000000
--- a/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * 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.android.settings.core.SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE;
-
-import android.app.settings.SettingsEnums;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.LinearLayout;
-import android.widget.ScrollView;
-import android.widget.TextView;
-
-import androidx.annotation.IntDef;
-import androidx.annotation.VisibleForTesting;
-import androidx.preference.PreferenceFragmentCompat;
-
-import com.android.settings.R;
-import com.android.settings.core.InstrumentedActivity;
-import com.android.settings.display.FontSizePreferenceFragmentForSetupWizard;
-import com.android.settings.display.ScreenZoomPreferenceFragmentForSetupWizard;
-import com.android.settingslib.transition.SettingsTransitionHelper.TransitionType;
-
-import com.google.android.setupcompat.template.FooterBarMixin;
-import com.google.android.setupcompat.template.FooterButton;
-import com.google.android.setupdesign.GlifLayout;
-import com.google.android.setupdesign.util.ThemeHelper;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/** Settings font/display size activity for SUW. */
-public class AccessibilityScreenSizeForSetupWizardActivity extends InstrumentedActivity {
- private static final String TAG = "ScreenSizeForSetup";
-
- // A parameter decides which fragment ({@link FontSizePreferenceFragmentForSetupWizard} or
- // {@link ScreenZoomPreferenceFragmentForSetupWizard}) will be visioned.
- static final String VISION_FRAGMENT_NO = "vision_fragment_no";
- /**
- * Flags indicating the type of the fragment.
- */
- @IntDef({
- FragmentType.FONT_SIZE,
- FragmentType.SCREEN_SIZE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface FragmentType {
- int FONT_SIZE = 1;
- int SCREEN_SIZE = 2;
- }
-
- // Keep the last height of the scroll view in the {@link GlifLayout}
- private int mLastScrollViewHeight;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- final int appliedTheme = ThemeHelper.trySetDynamicColor(this)
- ? R.style.SudDynamicColorThemeGlifV3_DayNight : R.style.SudThemeGlifV3_DayNight;
- setTheme(appliedTheme);
- setContentView(R.layout.accessibility_screen_size_setup_wizard);
- updateHeaderLayout();
- scrollToBottom();
- initFooterButton();
- if (savedInstanceState == null) {
- final PreferenceFragmentCompat fragment =
- getFragmentType(getIntent()) == FragmentType.FONT_SIZE
- ? new FontSizePreferenceFragmentForSetupWizard()
- : new ScreenZoomPreferenceFragmentForSetupWizard();
- getSupportFragmentManager()
- .beginTransaction()
- .replace(R.id.content_frame, fragment)
- .commit();
- }
- }
-
- @Override
- protected void onPause() {
- // For accessibility activities launched from setup wizard.
- if (getTransitionType(getIntent()) == TransitionType.TRANSITION_FADE) {
- overridePendingTransition(R.anim.sud_stay, android.R.anim.fade_out);
- }
- super.onPause();
- }
-
- @Override
- public int getMetricsCategory() {
- return getFragmentType(getIntent()) == FragmentType.FONT_SIZE
- ? SettingsEnums.SUW_ACCESSIBILITY_FONT_SIZE
- : SettingsEnums.SUW_ACCESSIBILITY_DISPLAY_SIZE;
- }
-
- @VisibleForTesting
- void updateHeaderLayout() {
- if (ThemeHelper.shouldApplyExtendedPartnerConfig(this) && isSuwSupportedTwoPanes()) {
- final GlifLayout layout = findViewById(R.id.setup_wizard_layout);
- final LinearLayout headerLayout = layout.findManagedViewById(R.id.sud_layout_header);
- if (headerLayout != null) {
- headerLayout.setPadding(0, layout.getPaddingTop(), 0,
- layout.getPaddingBottom());
- }
- }
- ((TextView) findViewById(R.id.suc_layout_title)).setText(
- getFragmentType(getIntent()) == FragmentType.FONT_SIZE
- ? R.string.title_font_size
- : R.string.screen_zoom_title);
- ((TextView) findViewById(R.id.sud_layout_subtitle)).setText(
- getFragmentType(getIntent()) == FragmentType.FONT_SIZE
- ? R.string.font_size_summary
- : R.string.screen_zoom_summary);
- }
-
- private boolean isSuwSupportedTwoPanes() {
- return getResources().getBoolean(R.bool.config_suw_supported_two_panes);
- }
-
- private void initFooterButton() {
- final GlifLayout layout = findViewById(R.id.setup_wizard_layout);
- final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class);
- final View.OnClickListener nextButtonListener = v -> onBackPressed();
- final FooterButton primaryButton =
- new FooterButton.Builder(this)
- .setText(R.string.done)
- .setListener(nextButtonListener)
- .setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SudGlifButton_Primary)
- .build();
- mixin.setPrimaryButton(primaryButton);
- }
-
- /**
- * Scrolls to bottom while {@link ScrollView} layout changed.
- */
- private void scrollToBottom() {
- mLastScrollViewHeight = 0;
- final GlifLayout layout = findViewById(R.id.setup_wizard_layout);
- final ScrollView scrollView = layout.getScrollView();
- scrollView.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
- final int scrollViewHeight = scrollView.getHeight();
- if (scrollViewHeight > 0 && scrollViewHeight != mLastScrollViewHeight) {
- mLastScrollViewHeight = scrollViewHeight;
- scrollView.post(() -> {
- // Here is no need to show the scrolling animation. So disabled first and
- // then enabled it after scrolling finished.
- scrollView.setSmoothScrollingEnabled(false);
- scrollView.fullScroll(View.FOCUS_DOWN);
- scrollView.setSmoothScrollingEnabled(true);
- });
- }
- });
- }
-
- private int getTransitionType(Intent intent) {
- return intent.getIntExtra(EXTRA_PAGE_TRANSITION_TYPE, TransitionType.TRANSITION_NONE);
- }
-
- private int getFragmentType(Intent intent) {
- return intent.getIntExtra(VISION_FRAGMENT_NO, FragmentType.FONT_SIZE);
- }
-}
diff --git a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
index 7a28e39..a7466da 100644
--- a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
+++ b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
@@ -16,12 +16,7 @@
package com.android.settings.accessibility;
-import static com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.VISION_FRAGMENT_NO;
-
-import android.content.ComponentName;
-import android.content.Intent;
import android.os.Bundle;
-import android.util.Log;
import android.view.Menu;
import android.view.accessibility.AccessibilityEvent;
@@ -32,19 +27,16 @@
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.SetupWizardUtils;
-import com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.FragmentType;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.search.actionbar.SearchMenuController;
import com.android.settings.support.actionbar.HelpResourceProvider;
import com.android.settingslib.core.instrumentation.Instrumentable;
import com.android.settingslib.transition.SettingsTransitionHelper;
-import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.util.ThemeHelper;
public class AccessibilitySettingsForSetupWizardActivity extends SettingsActivity {
- private static final String LOG_TAG = "A11ySettingsForSUW";
private static final String SAVE_KEY_TITLE = "activity_title";
@VisibleForTesting
@@ -105,33 +97,16 @@
protected void onCreate(Bundle savedState) {
super.onCreate(savedState);
applyTheme();
- tryLaunchFontSizeSettings();
findViewById(R.id.content_parent).setFitsSystemWindows(false);
}
private void applyTheme() {
+ setTheme(SetupWizardUtils.getTheme(this, getIntent()));
if (ThemeHelper.trySetDynamicColor(this)) {
final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
: R.style.SudDynamicColorThemeSettings_SetupWizard;
setTheme(appliedTheme);
- } else {
- setTheme(SetupWizardUtils.getTheme(this, getIntent()));
- }
- }
-
- @VisibleForTesting
- void tryLaunchFontSizeSettings() {
- if (WizardManagerHelper.isAnySetupWizard(getIntent())
- && new ComponentName(getPackageName(),
- CLASS_NAME_FONT_SIZE_SETTINGS_FOR_SUW).equals(
- getIntent().getComponent())) {
- final Intent intent = new Intent(this,
- AccessibilityScreenSizeForSetupWizardActivity.class);
- intent.putExtra(VISION_FRAGMENT_NO, FragmentType.FONT_SIZE);
- startActivity(intent);
- Log.d(LOG_TAG, "Launch font size settings");
- finish();
}
}
}
diff --git a/src/com/android/settings/accessibility/FontSizePreferenceController.java b/src/com/android/settings/accessibility/FontSizePreferenceController.java
deleted file mode 100644
index 35f96d4..0000000
--- a/src/com/android/settings/accessibility/FontSizePreferenceController.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.VISION_FRAGMENT_NO;
-import static com.android.settings.core.SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE;
-
-import android.content.Context;
-import android.content.Intent;
-
-import androidx.preference.Preference;
-
-import com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.FragmentType;
-import com.android.settings.core.BasePreferenceController;
-import com.android.settingslib.transition.SettingsTransitionHelper.TransitionType;
-
-/** PreferenceController for displaying font size page. */
-public class FontSizePreferenceController extends BasePreferenceController {
-
- public FontSizePreferenceController(Context context, String preferenceKey) {
- super(context, preferenceKey);
- }
-
- @Override
- public int getAvailabilityStatus() {
- return AVAILABLE;
- }
-
- @Override
- public boolean handlePreferenceTreeClick(Preference preference) {
- if (!mPreferenceKey.equals(preference.getKey())) {
- return false;
- }
-
- final Intent intent = new Intent(mContext,
- AccessibilityScreenSizeForSetupWizardActivity.class);
- intent.putExtra(VISION_FRAGMENT_NO, FragmentType.FONT_SIZE);
- intent.putExtra(EXTRA_PAGE_TRANSITION_TYPE, TransitionType.TRANSITION_FADE);
- mContext.startActivity(intent);
- return true;
- }
-}
diff --git a/src/com/android/settings/accessibility/ScreenSizePreferenceController.java b/src/com/android/settings/accessibility/ScreenSizePreferenceController.java
deleted file mode 100644
index 9734dc6..0000000
--- a/src/com/android/settings/accessibility/ScreenSizePreferenceController.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.VISION_FRAGMENT_NO;
-import static com.android.settings.core.SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE;
-
-import android.content.Context;
-import android.content.Intent;
-
-import androidx.preference.Preference;
-
-import com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.FragmentType;
-import com.android.settings.core.BasePreferenceController;
-import com.android.settingslib.transition.SettingsTransitionHelper.TransitionType;
-
-/** PreferenceController for displaying screen size page. */
-public class ScreenSizePreferenceController extends BasePreferenceController {
-
- public ScreenSizePreferenceController(Context context, String preferenceKey) {
- super(context, preferenceKey);
- }
-
- @Override
- public int getAvailabilityStatus() {
- return AVAILABLE;
- }
-
- @Override
- public boolean handlePreferenceTreeClick(Preference preference) {
- if (!mPreferenceKey.equals(preference.getKey())) {
- return false;
- }
-
- final Intent intent = new Intent(mContext,
- AccessibilityScreenSizeForSetupWizardActivity.class);
- intent.putExtra(VISION_FRAGMENT_NO, FragmentType.SCREEN_SIZE);
- intent.putExtra(EXTRA_PAGE_TRANSITION_TYPE, TransitionType.TRANSITION_FADE);
- mContext.startActivity(intent);
- return true;
- }
-}
diff --git a/src/com/android/settings/core/SettingsBaseActivity.java b/src/com/android/settings/core/SettingsBaseActivity.java
index 72770be..12bada2 100644
--- a/src/com/android/settings/core/SettingsBaseActivity.java
+++ b/src/com/android/settings/core/SettingsBaseActivity.java
@@ -95,13 +95,12 @@
// Apply SetupWizard light theme during setup flow. This is for SubSettings pages.
final boolean isAnySetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
if (isAnySetupWizard && this instanceof SubSettings) {
+ setTheme(SetupWizardUtils.getTheme(this, getIntent()));
if (ThemeHelper.trySetDynamicColor(this)) {
final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
: R.style.SudDynamicColorThemeSettings_SetupWizard;
setTheme(appliedTheme);
- } else {
- setTheme(SetupWizardUtils.getTheme(this, getIntent()));
}
}
diff --git a/src/com/android/settings/display/FontSizePreferenceFragmentForSetupWizard.java b/src/com/android/settings/display/FontSizePreferenceFragmentForSetupWizard.java
deleted file mode 100644
index 5bfce18..0000000
--- a/src/com/android/settings/display/FontSizePreferenceFragmentForSetupWizard.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.display;
-
-import android.app.settings.SettingsEnums;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.LinearLayout;
-
-import androidx.viewpager.widget.ViewPager;
-
-import com.android.settings.R;
-
-public class FontSizePreferenceFragmentForSetupWizard
- extends ToggleFontSizePreferenceFragment {
-
- @Override
- protected int getActivityLayoutResId() {
- return R.layout.suw_font_size_fragment;
- }
-
- @Override
- public int getMetricsCategory() {
- return SettingsEnums.SUW_ACCESSIBILITY_FONT_SIZE;
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- final View root = super.onCreateView(inflater, container, savedInstanceState);
- if (getResources().getBoolean(R.bool.config_supported_large_screen)) {
- final ViewPager viewPager = root.findViewById(R.id.preview_pager);
- final View view = (View) viewPager.getAdapter().instantiateItem(viewPager,
- viewPager.getCurrentItem());
- final LinearLayout layout = view.findViewById(R.id.font_size_preview_text_group);
- final int paddingStart = getResources().getDimensionPixelSize(
- R.dimen.font_size_preview_padding_start);
- layout.setPaddingRelative(paddingStart, layout.getPaddingTop(),
- layout.getPaddingEnd(), layout.getPaddingBottom());
- }
- return root;
- }
-
- @Override
- public void onStop() {
- // Log the final choice in value if it's different from the previous value.
- if (mCurrentIndex != mInitialIndex) {
- mMetricsFeatureProvider.action(getContext(), SettingsEnums.SUW_ACCESSIBILITY_FONT_SIZE,
- mCurrentIndex);
- }
-
- super.onStop();
- }
-}
diff --git a/src/com/android/settings/display/ScreenZoomPreferenceFragmentForSetupWizard.java b/src/com/android/settings/display/ScreenZoomPreferenceFragmentForSetupWizard.java
deleted file mode 100644
index 7185c63..0000000
--- a/src/com/android/settings/display/ScreenZoomPreferenceFragmentForSetupWizard.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2016 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.display;
-
-import android.app.settings.SettingsEnums;
-
-import com.android.settings.R;
-
-public class ScreenZoomPreferenceFragmentForSetupWizard extends ScreenZoomSettings {
-
- @Override
- protected int getActivityLayoutResId() {
- return R.layout.suw_screen_zoom_fragment;
- }
-
- @Override
- public int getMetricsCategory() {
- return SettingsEnums.SUW_ACCESSIBILITY_DISPLAY_SIZE;
- }
-
- @Override
- public void onStop() {
- // Log the final choice in value if it's different from the previous value.
- if (mCurrentIndex != mInitialIndex) {
- mMetricsFeatureProvider.action(
- getContext(), SettingsEnums.SUW_ACCESSIBILITY_DISPLAY_SIZE, mCurrentIndex);
- }
-
- super.onStop();
- }
-}
-
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivityTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivityTest.java
deleted file mode 100644
index 4f1edba..0000000
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivityTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.VISION_FRAGMENT_NO;
-import static com.android.settings.core.SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.robolectric.Shadows.shadowOf;
-
-import android.content.Context;
-import android.content.Intent;
-
-import androidx.test.core.app.ApplicationProvider;
-
-import com.android.settings.R;
-import com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.FragmentType;
-import com.android.settingslib.transition.SettingsTransitionHelper.TransitionType;
-
-import com.google.android.setupcompat.template.FooterBarMixin;
-import com.google.android.setupdesign.GlifLayout;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.robolectric.Robolectric;
-import org.robolectric.RobolectricTestRunner;
-
-/** Tests for {@link AccessibilityScreenSizeForSetupWizardActivity} */
-@RunWith(RobolectricTestRunner.class)
-public class AccessibilityScreenSizeForSetupWizardActivityTest {
-
- private Context mContext = ApplicationProvider.getApplicationContext();
-
- private AccessibilityScreenSizeForSetupWizardActivity setupActivity(int fragmentType) {
- final Intent intent = new Intent();
- intent.putExtra(VISION_FRAGMENT_NO, fragmentType);
- return Robolectric.buildActivity(AccessibilityScreenSizeForSetupWizardActivity.class,
- intent).create().get();
- }
-
- private AccessibilityScreenSizeForSetupWizardActivity setupActivity(int fragmentType,
- int transitionType) {
- final Intent intent = new Intent();
- intent.putExtra(VISION_FRAGMENT_NO, fragmentType);
- intent.putExtra(EXTRA_PAGE_TRANSITION_TYPE, transitionType);
- return Robolectric.buildActivity(AccessibilityScreenSizeForSetupWizardActivity.class,
- intent).create().get();
- }
-
- @Test
- public void setupActivity_fontSizePage_returnFontSizeTitle() {
- final AccessibilityScreenSizeForSetupWizardActivity activity =
- setupActivity(FragmentType.FONT_SIZE, TransitionType.TRANSITION_FADE);
-
- final GlifLayout layout = activity.findViewById(R.id.setup_wizard_layout);
- assertThat(layout.getHeaderText()).isEqualTo(mContext.getText(R.string.title_font_size));
- }
-
- @Test
- public void setupActivity_generateDoneButton() {
- final AccessibilityScreenSizeForSetupWizardActivity activity =
- setupActivity(FragmentType.FONT_SIZE, TransitionType.TRANSITION_FADE);
-
- final GlifLayout layout = activity.findViewById(R.id.setup_wizard_layout);
- final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class);
- assertThat(mixin.getPrimaryButton().getText()).isEqualTo(mContext.getText(R.string.done));
- }
-
- @Test
- public void onPause_getPendingTransitionEnterAnimationResourceId_transitionFade_should() {
- final AccessibilityScreenSizeForSetupWizardActivity activity =
- setupActivity(FragmentType.FONT_SIZE, TransitionType.TRANSITION_FADE);
-
- activity.onPause();
-
- assertThat(shadowOf(activity).getPendingTransitionEnterAnimationResourceId())
- .isEqualTo(R.anim.sud_stay);
- }
-
- @Test
- public void onPause_getPendingTransitionExitAnimationResourceId_transitionFade_should() {
- final AccessibilityScreenSizeForSetupWizardActivity activity =
- setupActivity(FragmentType.FONT_SIZE, TransitionType.TRANSITION_FADE);
-
- activity.onPause();
-
- assertThat(shadowOf(activity).getPendingTransitionExitAnimationResourceId())
- .isEqualTo(android.R.anim.fade_out);
- }
-
- @Test
- public void onPause_getPendingTransitionEnterAnimationResourceId_transitionNone_should() {
- final AccessibilityScreenSizeForSetupWizardActivity activity =
- setupActivity(FragmentType.FONT_SIZE);
-
- activity.onPause();
-
- assertThat(shadowOf(activity).getPendingTransitionEnterAnimationResourceId())
- .isNotEqualTo(R.anim.sud_stay);
- }
-
- @Test
- public void onPause_getPendingTransitionExitAnimationResourceId_transitionNone_should() {
- final AccessibilityScreenSizeForSetupWizardActivity activity =
- setupActivity(FragmentType.FONT_SIZE);
-
- activity.onPause();
-
- assertThat(shadowOf(activity).getPendingTransitionExitAnimationResourceId())
- .isNotEqualTo(android.R.anim.fade_out);
- }
-
- @Test
- public void updateHeaderLayout_displaySizePage_returnDisplaySizeTitle() {
- final Intent intent = new Intent();
- intent.putExtra(VISION_FRAGMENT_NO, FragmentType.SCREEN_SIZE);
- intent.putExtra(EXTRA_PAGE_TRANSITION_TYPE, TransitionType.TRANSITION_FADE);
- final AccessibilityScreenSizeForSetupWizardActivity activity = Robolectric.buildActivity(
- AccessibilityScreenSizeForSetupWizardActivity.class, intent).get();
- activity.setContentView(R.layout.accessibility_screen_size_setup_wizard);
- activity.updateHeaderLayout();
- final GlifLayout layout = activity.findViewById(R.id.setup_wizard_layout);
- assertThat(layout.getHeaderText()).isEqualTo(mContext.getText(R.string.screen_zoom_title));
- }
-}
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
index 0849eb2..65b0647 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
@@ -16,27 +16,18 @@
package com.android.settings.accessibility;
-import static com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.VISION_FRAGMENT_NO;
-import static com.android.settings.accessibility.AccessibilitySettingsForSetupWizardActivity.CLASS_NAME_FONT_SIZE_SETTINGS_FOR_SUW;
-
import static com.google.common.truth.Truth.assertThat;
-import android.content.ComponentName;
import android.content.Intent;
import androidx.test.filters.SmallTest;
import com.android.settings.R;
-import com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.FragmentType;
-
-import com.google.android.setupcompat.util.WizardManagerHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-import org.robolectric.Shadows;
@RunWith(RobolectricTestRunner.class)
@SmallTest
@@ -51,38 +42,4 @@
assertThat(activity.getThemeResId()).isEqualTo(R.style.GlifV3Theme_Light);
}
-
- @Test
- public void onCreate_hasFontSizeComponent_shouldGoToFontSizePreferenceDirectly() {
- AccessibilitySettingsForSetupWizardActivity activity =
- Robolectric.buildActivity(AccessibilitySettingsForSetupWizardActivity.class,
- new Intent(Intent.ACTION_MAIN).setComponent(new ComponentName(
- RuntimeEnvironment.application,
- CLASS_NAME_FONT_SIZE_SETTINGS_FOR_SUW))
- .putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true)
- .putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true)).get();
-
- activity.tryLaunchFontSizeSettings();
-
- final Intent launchIntent = Shadows.shadowOf(activity).getNextStartedActivity();
- assertThat(launchIntent).isNotNull();
- assertThat(launchIntent.getIntExtra(VISION_FRAGMENT_NO, -1)).isEqualTo(
- FragmentType.FONT_SIZE);
- assertThat(activity.isFinishing()).isTrue();
- }
-
- @Test
- public void onCreate_noFontSizeComponent_shouldNotFinishCurrentActivity() {
- AccessibilitySettingsForSetupWizardActivity activity =
- Robolectric.buildActivity(AccessibilitySettingsForSetupWizardActivity.class,
- new Intent(Intent.ACTION_MAIN)
- .putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true)
- .putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true)).get();
-
- activity.tryLaunchFontSizeSettings();
-
- final Intent launchIntent = Shadows.shadowOf(activity).getNextStartedActivity();
- assertThat(launchIntent).isNull();
- assertThat(activity.isFinishing()).isFalse();
- }
}
diff --git a/tests/robotests/src/com/android/settings/accessibility/FontSizePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/FontSizePreferenceControllerTest.java
deleted file mode 100644
index a52c0fe..0000000
--- a/tests/robotests/src/com/android/settings/accessibility/FontSizePreferenceControllerTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.VISION_FRAGMENT_NO;
-import static com.android.settings.core.BasePreferenceController.AVAILABLE;
-import static com.android.settings.core.SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.robolectric.Shadows.shadowOf;
-
-import android.app.Activity;
-import android.content.Intent;
-
-import androidx.preference.Preference;
-
-import com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.FragmentType;
-import com.android.settingslib.transition.SettingsTransitionHelper.TransitionType;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.Robolectric;
-import org.robolectric.RobolectricTestRunner;
-
-/** Tests for {@link FontSizePreferenceController}. */
-@RunWith(RobolectricTestRunner.class)
-public class FontSizePreferenceControllerTest {
- private static final String TEST_KEY = "test_key";
-
- private Activity mActivity;
- private FontSizePreferenceController mController;
- Preference mPreference;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- mActivity = Robolectric.setupActivity(Activity.class);
- mController = new FontSizePreferenceController(mActivity, TEST_KEY);
- mPreference = new Preference(mActivity);
- mPreference.setKey(TEST_KEY);
- }
-
- @Test
- public void getAvailabilityStatus_returnAvailable() {
- assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
- }
-
- @Test
- public void handlePreferenceTreeClick_launchActivityWithExpectedValues() {
- mController.handlePreferenceTreeClick(mPreference);
-
- final Intent nextActivity = shadowOf(mActivity).getNextStartedActivity();
- assertThat(nextActivity.getIntExtra(VISION_FRAGMENT_NO, /* defaultValue= */-1))
- .isEqualTo(FragmentType.FONT_SIZE);
- assertThat(nextActivity.getIntExtra(EXTRA_PAGE_TRANSITION_TYPE, /* defaultValue= */-1))
- .isEqualTo(TransitionType.TRANSITION_FADE);
- }
-}
diff --git a/tests/robotests/src/com/android/settings/accessibility/ScreenSizePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/ScreenSizePreferenceControllerTest.java
deleted file mode 100644
index 1cbf78e..0000000
--- a/tests/robotests/src/com/android/settings/accessibility/ScreenSizePreferenceControllerTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.VISION_FRAGMENT_NO;
-import static com.android.settings.core.BasePreferenceController.AVAILABLE;
-import static com.android.settings.core.SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.robolectric.Shadows.shadowOf;
-
-import android.app.Activity;
-import android.content.Intent;
-
-import androidx.preference.Preference;
-
-import com.android.settings.accessibility.AccessibilityScreenSizeForSetupWizardActivity.FragmentType;
-import com.android.settingslib.transition.SettingsTransitionHelper.TransitionType;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.Robolectric;
-import org.robolectric.RobolectricTestRunner;
-
-/** Tests for {@link ScreenSizePreferenceController}. */
-@RunWith(RobolectricTestRunner.class)
-public class ScreenSizePreferenceControllerTest {
- private static final String TEST_KEY = "test_key";
-
- private Activity mActivity;
- private ScreenSizePreferenceController mController;
- Preference mPreference;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- mActivity = Robolectric.setupActivity(Activity.class);
- mController = new ScreenSizePreferenceController(mActivity, TEST_KEY);
- mPreference = new Preference(mActivity);
- mPreference.setKey(TEST_KEY);
- }
-
- @Test
- public void getAvailabilityStatus_returnAvailable() {
- assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
- }
-
- @Test
- public void handlePreferenceTreeClick_launchActivityWithExpectedValues() {
- mController.handlePreferenceTreeClick(mPreference);
-
- final Intent nextActivity = shadowOf(mActivity).getNextStartedActivity();
- assertThat(nextActivity.getIntExtra(VISION_FRAGMENT_NO, /* defaultValue= */-1))
- .isEqualTo(FragmentType.SCREEN_SIZE);
- assertThat(nextActivity.getIntExtra(EXTRA_PAGE_TRANSITION_TYPE, /* defaultValue= */-1))
- .isEqualTo(TransitionType.TRANSITION_FADE);
- }
-}
diff --git a/tests/robotests/src/com/android/settings/password/SetupSkipDialogTest.java b/tests/robotests/src/com/android/settings/password/SetupSkipDialogTest.java
index 9119eff..9be0896 100644
--- a/tests/robotests/src/com/android/settings/password/SetupSkipDialogTest.java
+++ b/tests/robotests/src/com/android/settings/password/SetupSkipDialogTest.java
@@ -35,6 +35,7 @@
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {ShadowUtils.class, ShadowAlertDialogCompat.class})
+@Ignore
public class SetupSkipDialogTest {
private FragmentActivity mActivity;