Merge "Add inline toggle for Prevent Ringing gesture."
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index 768929b..eac6d3c 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -2,6 +2,18 @@
<issues format="4">
<issue
+ id="LintError"
+ severity="Error"
+ message="No `.class` files were found in project ".", so none of the classfile based checks could be run. Does the project need to be built first?"
+ category="Lint"
+ priority="10"
+ summary="Lint Failure"
+ explanation="This issue type represents a problem running lint itself. Examples include failure to find bytecode for source files (which means certain detectors could not be run), parsing errors in lint configuration files, etc.
These errors are not errors in your own code, but they are shown to make it clear that some checks were not completed.">
+ <location
+ file="."/>
+ </issue>
+
+ <issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
@@ -2281,6 +2293,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_about_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_about_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_accessibility_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2313,6 +2341,38 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_accessibility_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_accessibility_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_accessibility_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_accessibility_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_accounts_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2329,6 +2389,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_accounts_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_accounts_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_app_and_notification_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2345,6 +2421,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_app_and_notification_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_apps_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_battery_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2361,6 +2453,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_battery_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_battery_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_connected_device_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2377,6 +2485,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_connected_device_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_connected_device_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_display_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2393,6 +2517,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_display_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_display_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_emergency_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2409,6 +2549,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_emergency_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_emergency_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_location_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2425,6 +2581,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_location_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_location_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_network_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2441,6 +2613,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_network_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_network_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_generic_icon_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2473,6 +2661,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_generic_icon_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_notification_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_privacy_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2489,6 +2693,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_privacy_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_privacy_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_security_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2505,6 +2725,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_security_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_security_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_sound_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2521,6 +2757,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_sound_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_sound_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_storage_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2537,6 +2789,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_storage_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_storage_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_support_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2569,6 +2837,38 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_support_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_support_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_support_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_support_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_system_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2585,6 +2885,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_system_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_system_dashboard_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/homepage_wallpaper_background" />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2601,6 +2917,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="@color/homepage_wallpaper_background" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_homepage_wallpaper_v2.xml"
+ line="24"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/notification_block_color"/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2957,7 +3289,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="44"
+ line="45"
column="17"/>
</issue>
@@ -2973,7 +3305,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="45"
+ line="46"
column="17"/>
</issue>
@@ -2989,7 +3321,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="54"
+ line="55"
column="17"/>
</issue>
@@ -3005,7 +3337,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="55"
+ line="56"
column="17"/>
</issue>
@@ -3021,7 +3353,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="64"
+ line="65"
column="17"/>
</issue>
@@ -3037,7 +3369,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="65"
+ line="66"
column="17"/>
</issue>
@@ -3053,7 +3385,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="74"
+ line="75"
column="17"/>
</issue>
@@ -3069,7 +3401,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="75"
+ line="76"
column="17"/>
</issue>
@@ -3129,11 +3461,27 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" <string name="sync_plug" msgid="7956982719077985381">""<font fgcolor="#ffffffff">"Welcome to Google sync!"</font>" \nA Google approach to syncing data to allow access to your contacts, appointments, and more from wherever you are."</string>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/values-en-rXC/strings.xml"
+ line="2815"
+ column="170"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" <string name="sync_plug" msgid="7956982719077985381"><font fgcolor="#ffffffff">"Welcome to Google sync!"</font>" \nA Google approach to syncing data to allow access to your contacts, appointments and more from wherever you are."</string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rAU/strings.xml"
- line="2818"
+ line="2816"
column="64"/>
</issue>
@@ -3149,7 +3497,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rCA/strings.xml"
- line="2818"
+ line="2816"
column="64"/>
</issue>
@@ -3165,7 +3513,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rGB/strings.xml"
- line="2818"
+ line="2816"
column="64"/>
</issue>
@@ -3181,7 +3529,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rIN/strings.xml"
- line="2818"
+ line="2816"
column="64"/>
</issue>
@@ -3193,22 +3541,6 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <string name="sync_plug" msgid="7956982719077985381">""<font fgcolor="#ffffffff">"Welcome to Google sync!"</font>" \nA Google approach to syncing data to allow access to your contacts, appointments, and more from wherever you are."</string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/values-en-rXC/strings.xml"
- line="2818"
- column="170"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" <string name="sync_plug"><font fgcolor="#ffffffff">Welcome to Google sync!</font>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
@@ -3245,7 +3577,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="428"
+ line="434"
column="44"/>
</issue>
@@ -3261,7 +3593,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="434"
+ line="440"
column="44"/>
</issue>
@@ -3277,7 +3609,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="435"
+ line="441"
column="44"/>
</issue>
@@ -3293,7 +3625,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="471"
+ line="477"
column="34"/>
</issue>
diff --git a/res/drawable/ic_homepage_about_v2.xml b/res/drawable/ic_homepage_about_v2.xml
new file mode 100644
index 0000000..c069bfc
--- /dev/null
+++ b/res/drawable/ic_homepage_about_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_about_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_phone_info" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_accessibility_v2.xml b/res/drawable/ic_homepage_accessibility_v2.xml
new file mode 100644
index 0000000..24ca8cf
--- /dev/null
+++ b/res/drawable/ic_homepage_accessibility_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_accessibility_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_accessibility" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_accounts_v2.xml b/res/drawable/ic_homepage_accounts_v2.xml
new file mode 100644
index 0000000..6ea981f
--- /dev/null
+++ b/res/drawable/ic_homepage_accounts_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_accounts_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_accounts" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_apps_v2.xml b/res/drawable/ic_homepage_apps_v2.xml
new file mode 100644
index 0000000..c6ac0c4
--- /dev/null
+++ b/res/drawable/ic_homepage_apps_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_app_and_notification_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_apps" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_battery_v2.xml b/res/drawable/ic_homepage_battery_v2.xml
new file mode 100644
index 0000000..680031f
--- /dev/null
+++ b/res/drawable/ic_homepage_battery_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_battery_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_battery_white" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_connected_device_v2.xml b/res/drawable/ic_homepage_connected_device_v2.xml
new file mode 100644
index 0000000..f3e95d2
--- /dev/null
+++ b/res/drawable/ic_homepage_connected_device_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_connected_device_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_devices_other" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_display_v2.xml b/res/drawable/ic_homepage_display_v2.xml
new file mode 100644
index 0000000..e4014ee
--- /dev/null
+++ b/res/drawable/ic_homepage_display_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_display_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_display_white" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_emergency_v2.xml b/res/drawable/ic_homepage_emergency_v2.xml
new file mode 100644
index 0000000..86d1470
--- /dev/null
+++ b/res/drawable/ic_homepage_emergency_v2.xml
@@ -0,0 +1,33 @@
+<?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.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_emergency_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_emergency" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_location_v2.xml b/res/drawable/ic_homepage_location_v2.xml
new file mode 100644
index 0000000..5dc72eb
--- /dev/null
+++ b/res/drawable/ic_homepage_location_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_location_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_location"/>
+</layer-list>
diff --git a/res/drawable/ic_homepage_network_v2.xml b/res/drawable/ic_homepage_network_v2.xml
new file mode 100644
index 0000000..d3b33e9
--- /dev/null
+++ b/res/drawable/ic_homepage_network_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_network_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_wireless_white" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_notification_v2.xml b/res/drawable/ic_homepage_notification_v2.xml
new file mode 100644
index 0000000..9b57456
--- /dev/null
+++ b/res/drawable/ic_homepage_notification_v2.xml
@@ -0,0 +1,33 @@
+<?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.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_generic_icon_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_notifications_white" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_privacy_v2.xml b/res/drawable/ic_homepage_privacy_v2.xml
new file mode 100644
index 0000000..56e6da8
--- /dev/null
+++ b/res/drawable/ic_homepage_privacy_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_privacy_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_privacy"/>
+</layer-list>
diff --git a/res/drawable/ic_homepage_security_v2.xml b/res/drawable/ic_homepage_security_v2.xml
new file mode 100644
index 0000000..5e33add
--- /dev/null
+++ b/res/drawable/ic_homepage_security_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_security_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_security_white" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_sound_v2.xml b/res/drawable/ic_homepage_sound_v2.xml
new file mode 100644
index 0000000..8561820
--- /dev/null
+++ b/res/drawable/ic_homepage_sound_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_sound_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_volume_up_24dp" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_storage_v2.xml b/res/drawable/ic_homepage_storage_v2.xml
new file mode 100644
index 0000000..1a8b7d2
--- /dev/null
+++ b/res/drawable/ic_homepage_storage_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_storage_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_storage_white" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_support_v2.xml b/res/drawable/ic_homepage_support_v2.xml
new file mode 100644
index 0000000..8139973
--- /dev/null
+++ b/res/drawable/ic_homepage_support_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_support_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_help" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_system_dashboard_v2.xml b/res/drawable/ic_homepage_system_dashboard_v2.xml
new file mode 100644
index 0000000..7c016a2
--- /dev/null
+++ b/res/drawable/ic_homepage_system_dashboard_v2.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_system_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_system_dashboard_white" />
+</layer-list>
diff --git a/res/drawable/ic_homepage_wallpaper_v2.xml b/res/drawable/ic_homepage_wallpaper_v2.xml
new file mode 100644
index 0000000..ee16339
--- /dev/null
+++ b/res/drawable/ic_homepage_wallpaper_v2.xml
@@ -0,0 +1,33 @@
+<?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.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <com.android.settingslib.widget.AdaptiveIconShapeDrawable
+ android:width="@dimen/homepage_image_size"
+ android:height="@dimen/homepage_image_size"
+ android:color="@color/homepage_wallpaper_background" />
+ </item>
+
+ <item
+ android:width="@dimen/dashboard_tile_foreground_image_size"
+ android:height="@dimen/dashboard_tile_foreground_image_size"
+ android:start="@dimen/homepage_foreground_image_inset"
+ android:top="@dimen/homepage_foreground_image_inset"
+ android:drawable="@drawable/ic_settings_wallpaper_white" />
+</layer-list>
diff --git a/res/layout/homepage_preference.xml b/res/layout/homepage_preference.xml
new file mode 100644
index 0000000..c08a74f
--- /dev/null
+++ b/res/layout/homepage_preference.xml
@@ -0,0 +1,65 @@
+<?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"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="72dp"
+ android:gravity="center_vertical"
+ android:paddingStart="24dp"
+ android:paddingEnd="24dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:clipToPadding="false"
+ android:baselineAligned="false">
+
+ <LinearLayout
+ android:id="@+id/icon_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="start|center_vertical"
+ android:orientation="horizontal"
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp"
+ android:layout_marginEnd="16dp">
+
+ <androidx.preference.internal.PreferenceImageView
+ android:id="@android:id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:maxWidth="48dp"
+ app:maxHeight="48dp"/>
+
+ </LinearLayout>
+
+ <RelativeLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp">
+
+ <TextView
+ android:id="@android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="@style/TextAppearance.HomepagePreferenceTitle"
+ android:ellipsize="marquee"/>
+ </RelativeLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/search_bar.xml b/res/layout/search_bar.xml
index d3e98c3..c4dd15d 100644
--- a/res/layout/search_bar.xml
+++ b/res/layout/search_bar.xml
@@ -20,7 +20,10 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_margin="@dimen/search_bar_margin"
+ android:layout_marginTop="@dimen/search_bar_margin"
+ android:layout_marginStart="@dimen/search_bar_margin"
+ android:layout_marginEnd="@dimen/search_bar_margin"
+ android:layout_marginBottom="16dp"
app:layout_scrollFlags="scroll|enterAlways">
<com.google.android.material.card.MaterialCardView
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index bc01d59..7bd5971 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -116,6 +116,12 @@
<!-- Dashboard foreground image inset (from background edge to foreground edge) -->
<dimen name="dashboard_tile_foreground_image_inset">6dp</dimen>
+ <!-- Homepage image tile size -->
+ <dimen name="homepage_image_size">48dp</dimen>
+
+ <!-- Homepage foreground image inset (from background edge to foreground edge) -->
+ <dimen name="homepage_foreground_image_inset">12dp</dimen>
+
<!-- Preference icon foreground image inset (from background edge to foreground edge) -->
<dimen name="preference_icon_foreground_image_inset">12dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a0b2ccc..3a7cf8e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4950,6 +4950,8 @@
<string name="accessibility_text_and_display_title">Text and display</string>
<!-- Title for the accessibility preference category of interaction control services and settings. [CHAR LIMIT=50] -->
<string name="interaction_control_category_title">Interaction controls</string>
+ <!-- Title for the accessibility tap assistance page. [CHAR LIMIT=50] -->
+ <string name="accessibility_tap_assistance_title">Tap assistance</string>
<!-- Title for the accessibility preference category of services downloaded by the user. [CHAR LIMIT=50] -->
<string name="user_installed_services_category_title">Downloaded apps</string>
<!-- Title for the accessibility preference category of settings considered to be experimental, meaning they might be changed or removed in the future. [CHAR LIMIT=50] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 4ab1e6c..e75766d 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -312,6 +312,12 @@
<item name="android:textSize">@dimen/search_bar_text_size</item>
</style>
+ <style name="TextAppearance.HomepagePreferenceTitle"
+ parent="@*android:style/TextAppearance.DeviceDefault">
+ <item name="android:fontFamily">google-sans</item>
+ <item name="android:textSize">20sp</item>
+ </style>
+
<style name="TextAppearance.HomepageCardTitle"
parent="@*android:style/TextAppearance.DeviceDefault.Subhead">
<item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index 6efd884..126865c 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -65,13 +65,6 @@
android:persistent="false"
android:title="@string/interaction_control_category_title">
- <Preference
- android:fragment="com.android.settings.accessibility.ToggleAutoclickPreferenceFragment"
- android:key="autoclick_preference"
- android:persistent="false"
- android:title="@string/accessibility_autoclick_preference_title"
- settings:controller="com.android.settings.accessibility.AutoclickPreferenceController"/>
-
<SwitchPreference
android:key="toggle_power_button_ends_call_preference"
android:persistent="false"
@@ -84,21 +77,6 @@
android:title="@string/accelerometer_title"
settings:controller="com.android.settings.accessibility.LockScreenRotationPreferenceController"/>
- <ListPreference
- android:entries="@array/long_press_timeout_selector_list_titles"
- android:entryValues="@array/long_press_timeout_selector_values"
- android:key="select_long_press_timeout_preference"
- android:persistent="false"
- android:title="@string/accessibility_long_press_timeout_preference_title"
- settings:controller="com.android.settings.accessibility.SelectLongPressTimeoutPreferenceController"/>
-
- <Preference
- android:fragment="com.android.settings.accessibility.AccessibilityControlTimeoutPreferenceFragment"
- android:key="accessibility_control_timeout_preference_fragment"
- android:persistent="false"
- android:title="@string/accessibility_setting_item_control_timeout_title"
- settings:controller="com.android.settings.accessibility.AccessibilityTimeoutPreferenceController"/>
-
<Preference
android:fragment="com.android.settings.accessibility.VibrationSettings"
android:key="vibration_preference_screen"
@@ -107,6 +85,13 @@
settings:controller="com.android.settings.accessibility.VibrationPreferenceController"/>
<Preference
+ android:fragment="com.android.settings.accessibility.TapAssistanceFragment"
+ android:key="tap_assistance_preference_screen"
+ android:persistent="false"
+ android:title="@string/accessibility_tap_assistance_title"
+ settings:searchable="true"/>
+
+ <Preference
android:fragment="com.android.settings.gestures.SystemNavigationGestureSettings"
android:key="gesture_system_navigation_input_summary_accessibility"
android:persistent="false"
diff --git a/res/xml/accessibility_tap_assistance.xml b/res/xml/accessibility_tap_assistance.xml
new file mode 100644
index 0000000..b96dee6
--- /dev/null
+++ b/res/xml/accessibility_tap_assistance.xml
@@ -0,0 +1,44 @@
+<?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.
+-->
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:settings="http://schemas.android.com/apk/res-auto"
+ android:key="accessibility_tap_assistance"
+ android:persistent="false"
+ android:title="@string/accessibility_tap_assistance_title">
+
+ <ListPreference
+ android:entries="@array/long_press_timeout_selector_list_titles"
+ android:entryValues="@array/long_press_timeout_selector_values"
+ android:key="select_long_press_timeout_preference"
+ android:persistent="false"
+ android:title="@string/accessibility_long_press_timeout_preference_title"
+ settings:controller="com.android.settings.accessibility.SelectLongPressTimeoutPreferenceController"/>
+
+ <Preference
+ android:fragment="com.android.settings.accessibility.AccessibilityControlTimeoutPreferenceFragment"
+ android:key="accessibility_control_timeout_preference_fragment"
+ android:persistent="false"
+ android:title="@string/accessibility_setting_item_control_timeout_title"
+ settings:controller="com.android.settings.accessibility.AccessibilityTimeoutPreferenceController"/>
+
+ <Preference
+ android:fragment="com.android.settings.accessibility.ToggleAutoclickPreferenceFragment"
+ android:key="autoclick_preference"
+ android:persistent="false"
+ android:title="@string/accessibility_autoclick_preference_title"
+ settings:controller="com.android.settings.accessibility.AutoclickPreferenceController"/>
+</PreferenceScreen>
\ No newline at end of file
diff --git a/res/xml/top_level_settings_grouped.xml b/res/xml/top_level_settings_grouped.xml
index 1a82e2d..9f87ffc 100644
--- a/res/xml/top_level_settings_grouped.xml
+++ b/res/xml/top_level_settings_grouped.xml
@@ -20,17 +20,17 @@
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="top_level_settings_grouped">
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.network.NetworkDashboardFragment"
- android:icon="@drawable/ic_homepage_network"
+ android:icon="@drawable/ic_homepage_network_v2"
android:key="top_level_network"
android:order="-140"
android:title="@string/network_dashboard_title"
settings:controller="com.android.settings.network.TopLevelNetworkEntryPreferenceController"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment"
- android:icon="@drawable/ic_homepage_connected_device"
+ android:icon="@drawable/ic_homepage_connected_device_v2"
android:key="top_level_connected_devices"
android:order="-130"
android:title="@string/connected_devices_dashboard_title"
@@ -40,16 +40,16 @@
android:key="apps"
android:order="-120"
settings:allowDividerAbove="false">
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.applications.AppAndNotificationDashboardFragment"
- android:icon="@drawable/ic_homepage_apps"
+ android:icon="@drawable/ic_homepage_apps_v2"
android:key="top_level_apps_and_notifs"
android:order="-120"
android:title="@string/apps_dashboard_title"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.notification.ConfigureNotificationSettings"
- android:icon="@drawable/ic_homepage_notification"
+ android:icon="@drawable/ic_homepage_notification_v2"
android:key="top_level_notification"
android:order="-110"
android:title="@string/configure_notification_settings"/>
@@ -61,47 +61,47 @@
android:key="phone_essential"
android:order="-100"
settings:allowDividerAbove="false">
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.fuelgauge.PowerUsageSummary"
- android:icon="@drawable/ic_homepage_battery"
+ android:icon="@drawable/ic_homepage_battery_v2"
android:key="top_level_battery"
android:order="-100"
android:title="@string/power_usage_summary_title"
settings:controller="com.android.settings.fuelgauge.TopLevelBatteryPreferenceController"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.deviceinfo.StorageSettings"
- android:icon="@drawable/ic_homepage_storage"
+ android:icon="@drawable/ic_homepage_storage_v2"
android:key="top_level_storage"
android:order="-90"
android:title="@string/storage_settings"
settings:controller="com.android.settings.deviceinfo.TopLevelStoragePreferenceController"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.notification.SoundSettings"
- android:icon="@drawable/ic_homepage_sound"
+ android:icon="@drawable/ic_homepage_sound_v2"
android:key="top_level_sound"
android:order="-80"
android:title="@string/sound_settings"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.DisplaySettings"
- android:icon="@drawable/ic_homepage_display"
+ android:icon="@drawable/ic_homepage_display_v2"
android:key="top_level_display"
android:order="-70"
android:title="@string/display_settings"
settings:controller="com.android.settings.display.TopLevelDisplayPreferenceController"/>
- <com.android.settingslib.RestrictedTopLevelPreference
- android:icon="@drawable/ic_homepage_wallpaper"
+ <com.android.settings.homepage.RestrictedHomepagePreference
+ android:icon="@drawable/ic_homepage_wallpaper_v2"
android:key="top_level_wallpaper"
android:order="-60"
android:title="@string/wallpaper_settings_title"
settings:controller="com.android.settings.display.TopLevelWallpaperPreferenceController"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.accessibility.AccessibilitySettings"
- android:icon="@drawable/ic_homepage_accessibility"
+ android:icon="@drawable/ic_homepage_accessibility_v2"
android:key="top_level_accessibility"
android:order="-50"
android:title="@string/accessibility_settings"
@@ -112,45 +112,44 @@
android:key="privacy_and_security"
android:order="-40"
settings:allowDividerAbove="false">
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.privacy.PrivacyDashboardFragment"
- android:icon="@drawable/ic_homepage_privacy"
+ android:icon="@drawable/ic_homepage_privacy_v2"
android:key="top_level_privacy"
android:order="-40"
android:title="@string/privacy_dashboard_title"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.location.LocationSettings"
- android:icon="@drawable/ic_homepage_location"
+ android:icon="@drawable/ic_homepage_location_v2"
android:key="top_level_location"
android:order="-30"
android:title="@string/location_settings_title"
settings:controller="com.android.settings.location.TopLevelLocationPreferenceController"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.security.SecuritySettings"
- android:icon="@drawable/ic_homepage_security"
+ android:icon="@drawable/ic_homepage_security_v2"
android:key="top_level_security"
android:order="-20"
android:title="@string/security_settings_title"
settings:controller="com.android.settings.security.TopLevelSecurityEntryPreferenceController"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:key="top_level_emergency"
android:title="@string/emergency_settings_preference_title"
- android:icon="@drawable/ic_homepage_emergency"
+ android:icon="@drawable/ic_homepage_emergency_v2"
android:order="-10"
android:fragment="com.android.settings.emergency.EmergencyDashboardFragment"/>
-
</PreferenceCategory>
<PreferenceCategory
android:key="accounts"
android:order="-10"
settings:allowDividerAbove="false">
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.accounts.AccountDashboardFragment"
- android:icon="@drawable/ic_homepage_accounts"
+ android:icon="@drawable/ic_homepage_accounts_v2"
android:key="top_level_accounts"
android:order="-10"
android:title="@string/account_dashboard_title"
@@ -161,23 +160,23 @@
android:key="system"
android:order="10"
settings:allowDividerAbove="false">
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.system.SystemDashboardFragment"
- android:icon="@drawable/ic_homepage_system_dashboard"
+ android:icon="@drawable/ic_homepage_system_dashboard_v2"
android:key="top_level_system"
android:order="10"
android:title="@string/header_category_system"/>
- <Preference
+ <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.deviceinfo.aboutphone.MyDeviceInfoFragment"
- android:icon="@drawable/ic_homepage_about"
+ android:icon="@drawable/ic_homepage_about_v2"
android:key="top_level_about_device"
android:order="20"
android:title="@string/about_settings"
settings:controller="com.android.settings.deviceinfo.aboutphone.TopLevelAboutDevicePreferenceController"/>
- <Preference
- android:icon="@drawable/ic_homepage_support"
+ <com.android.settings.homepage.HomePagePreference
+ android:icon="@drawable/ic_homepage_support_v2"
android:key="top_level_support"
android:order="100"
android:title="@string/page_tab_title_support"
diff --git a/src/com/android/settings/accessibility/TapAssistanceFragment.java b/src/com/android/settings/accessibility/TapAssistanceFragment.java
new file mode 100644
index 0000000..1a999ea
--- /dev/null
+++ b/src/com/android/settings/accessibility/TapAssistanceFragment.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.app.settings.SettingsEnums;
+
+import com.android.settings.R;
+import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.search.BaseSearchIndexProvider;
+import com.android.settingslib.search.SearchIndexable;
+
+/** Accessibility settings for tap assistance. */
+@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
+public class TapAssistanceFragment extends DashboardFragment {
+
+ private static final String TAG = "TapAssistanceFragment";
+
+ @Override
+ public int getMetricsCategory() {
+ return SettingsEnums.ACCESSIBILITY_TAP_ASSISTANCE;
+ }
+
+ @Override
+ protected int getPreferenceScreenResId() {
+ return R.xml.accessibility_tap_assistance;
+ }
+
+ @Override
+ protected String getLogTag() {
+ return TAG;
+ }
+
+ public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
+ new BaseSearchIndexProvider(R.xml.accessibility_tap_assistance);
+
+}
diff --git a/src/com/android/settings/display/TopLevelWallpaperPreferenceController.java b/src/com/android/settings/display/TopLevelWallpaperPreferenceController.java
index beef4f3..5118b27 100644
--- a/src/com/android/settings/display/TopLevelWallpaperPreferenceController.java
+++ b/src/com/android/settings/display/TopLevelWallpaperPreferenceController.java
@@ -25,6 +25,7 @@
import android.content.pm.ResolveInfo;
import android.os.UserHandle;
import android.text.TextUtils;
+import android.util.FeatureFlagUtils;
import android.util.Log;
import androidx.preference.Preference;
@@ -32,6 +33,8 @@
import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
+import com.android.settings.core.FeatureFlags;
+import com.android.settings.homepage.RestrictedHomepagePreference;
import com.android.settingslib.RestrictedLockUtilsInternal;
import com.android.settingslib.RestrictedTopLevelPreference;
@@ -89,7 +92,11 @@
@Override
public void updateState(Preference preference) {
- disablePreferenceIfManaged((RestrictedTopLevelPreference) preference);
+ if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.SILKY_HOME)) {
+ disablePreferenceIfManaged((RestrictedHomepagePreference) preference);
+ } else {
+ disablePreferenceIfManaged((RestrictedTopLevelPreference) preference);
+ }
}
@Override
@@ -133,4 +140,18 @@
}
}
}
+
+ private void disablePreferenceIfManaged(RestrictedHomepagePreference pref) {
+ final String restriction = DISALLOW_SET_WALLPAPER;
+ if (pref != null) {
+ pref.setDisabledByAdmin(null);
+ if (RestrictedLockUtilsInternal.hasBaseUserRestriction(mContext,
+ restriction, UserHandle.myUserId())) {
+ // Do not show the admin dialog for system restriction.
+ pref.setEnabled(false);
+ } else {
+ pref.checkRestrictionAndSetDisabled(restriction);
+ }
+ }
+ }
}
diff --git a/src/com/android/settings/homepage/HomePagePreference.java b/src/com/android/settings/homepage/HomePagePreference.java
new file mode 100644
index 0000000..41d59b7
--- /dev/null
+++ b/src/com/android/settings/homepage/HomePagePreference.java
@@ -0,0 +1,49 @@
+/*
+ * 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.homepage;
+
+import android.content.Context;
+import android.util.AttributeSet;
+
+import androidx.preference.Preference;
+
+import com.android.settings.R;
+
+/** A customized layout for homepage preference. */
+public class HomePagePreference extends Preference {
+
+ public HomePagePreference(Context context) {
+ super(context);
+ setLayoutResource(R.layout.homepage_preference);
+ }
+
+ public HomePagePreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ setLayoutResource(R.layout.homepage_preference);
+ }
+
+ public HomePagePreference(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, /* defStyleRes= */ 0);
+ setLayoutResource(R.layout.homepage_preference);
+ }
+
+ public HomePagePreference(Context context, AttributeSet attrs,
+ int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ setLayoutResource(R.layout.homepage_preference);
+ }
+}
diff --git a/src/com/android/settings/homepage/RestrictedHomepagePreference.java b/src/com/android/settings/homepage/RestrictedHomepagePreference.java
new file mode 100644
index 0000000..47b552c
--- /dev/null
+++ b/src/com/android/settings/homepage/RestrictedHomepagePreference.java
@@ -0,0 +1,122 @@
+/*
+ * 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.homepage;
+
+import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
+
+import android.content.Context;
+import android.os.UserHandle;
+import android.util.AttributeSet;
+
+import androidx.core.content.res.TypedArrayUtils;
+import androidx.preference.PreferenceManager;
+import androidx.preference.PreferenceViewHolder;
+
+import com.android.settings.R;
+import com.android.settingslib.RestrictedPreferenceHelper;
+
+/** Homepage preference that can be disabled by a device admin using a user restriction. */
+public class RestrictedHomepagePreference extends HomePagePreference {
+ private RestrictedPreferenceHelper mHelper;
+
+ public RestrictedHomepagePreference(Context context, AttributeSet attrs,
+ int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ mHelper = new RestrictedPreferenceHelper(context, /* preference= */ this, attrs);
+ }
+
+ public RestrictedHomepagePreference(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, /* defStyleRes= */ 0);
+ }
+
+ public RestrictedHomepagePreference(Context context, AttributeSet attrs) {
+ this(context, attrs, TypedArrayUtils.getAttr(context, R.attr.preferenceStyle,
+ android.R.attr.preferenceStyle));
+ }
+
+ public RestrictedHomepagePreference(Context context) {
+ this(context, /* attrs= */ null);
+ }
+
+ @Override
+ public void onBindViewHolder(PreferenceViewHolder holder) {
+ super.onBindViewHolder(holder);
+ mHelper.onBindViewHolder(holder);
+ }
+
+ @Override
+ public void performClick() {
+ if (!mHelper.performClick()) {
+ super.performClick();
+ }
+ }
+
+ @Override
+ protected void onAttachedToHierarchy(PreferenceManager preferenceManager) {
+ mHelper.onAttachedToHierarchy();
+ super.onAttachedToHierarchy(preferenceManager);
+ }
+
+ /**
+ * Set the user restriction and disable this preference.
+ *
+ * @param userRestriction constant from {@link android.os.UserManager}
+ */
+ public void checkRestrictionAndSetDisabled(String userRestriction) {
+ mHelper.checkRestrictionAndSetDisabled(userRestriction, UserHandle.myUserId());
+ }
+
+ /**
+ * Set the user restriction and disable this preference for the given user.
+ *
+ * @param userRestriction constant from {@link android.os.UserManager}
+ * @param userId user to check the restriction for.
+ */
+ public void checkRestrictionAndSetDisabled(String userRestriction, int userId) {
+ mHelper.checkRestrictionAndSetDisabled(userRestriction, userId);
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (enabled && isDisabledByAdmin()) {
+ mHelper.setDisabledByAdmin(/* admin= */ null);
+ return;
+ }
+ super.setEnabled(enabled);
+ }
+
+ /**
+ * Check whether this preference is disabled by admin.
+ *
+ * @return true if this preference is disabled by admin.
+ */
+ public boolean isDisabledByAdmin() {
+ return mHelper.isDisabledByAdmin();
+ }
+
+ /**
+ * Disable preference based on the enforce admin.
+ *
+ * @param admin details of the admin who enforced the restriction. If it is {@code null}, then
+ * this preference will be enabled. Otherwise, it will be disabled.
+ */
+ public void setDisabledByAdmin(EnforcedAdmin admin) {
+ if (mHelper.setDisabledByAdmin(admin)) {
+ notifyChanged();
+ }
+ }
+}
diff --git a/src/com/android/settings/network/telephony/EuiccOperationSidecar.java b/src/com/android/settings/network/telephony/EuiccOperationSidecar.java
index a637cc2..0ee6d95 100644
--- a/src/com/android/settings/network/telephony/EuiccOperationSidecar.java
+++ b/src/com/android/settings/network/telephony/EuiccOperationSidecar.java
@@ -99,7 +99,8 @@
Intent intent = new Intent(getReceiverAction());
intent.putExtra(EXTRA_OP_ID, mOpId);
return PendingIntent.getBroadcast(
- getContext(), REQUEST_CODE, intent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
+ getContext(), REQUEST_CODE, intent,
+ PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
}
@Override
diff --git a/src/com/android/settings/network/telephony/MobileDataSlice.java b/src/com/android/settings/network/telephony/MobileDataSlice.java
index 7c9bac0..106f336 100644
--- a/src/com/android/settings/network/telephony/MobileDataSlice.java
+++ b/src/com/android/settings/network/telephony/MobileDataSlice.java
@@ -172,8 +172,8 @@
private PendingIntent getPrimaryAction() {
final Intent intent = getIntent();
- return PendingIntent.getActivity(mContext, 0 /* requestCode */,
- intent, PendingIntent.FLAG_MUTABLE_UNAUDITED /* flags */);
+ return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent,
+ PendingIntent.FLAG_IMMUTABLE);
}
/**
diff --git a/src/com/android/settings/panel/InternetConnectivityPanel.java b/src/com/android/settings/panel/InternetConnectivityPanel.java
index 312bf75..64a4699 100644
--- a/src/com/android/settings/panel/InternetConnectivityPanel.java
+++ b/src/com/android/settings/panel/InternetConnectivityPanel.java
@@ -34,10 +34,6 @@
/**
* Represents the Internet Connectivity Panel.
- *
- * <p>
- * Displays Wifi (full Slice) and Airplane mode.
- * </p>
*/
public class InternetConnectivityPanel implements PanelContent {
@@ -79,6 +75,21 @@
}
@Override
+ public boolean isCustomizedButtonUsed() {
+ return Utils.isProviderModelEnabled(mContext);
+ }
+
+ @Override
+ public CharSequence getCustomizedButtonTitle() {
+ return mContext.getText(R.string.settings_button);
+ }
+
+ @Override
+ public void onClickCustomizedButton() {
+ mContext.startActivity(getSeeMoreIntent());
+ }
+
+ @Override
public int getMetricsCategory() {
return SettingsEnums.PANEL_INTERNET_CONNECTIVITY;
}
diff --git a/src/com/android/settings/panel/PanelFragment.java b/src/com/android/settings/panel/PanelFragment.java
index cc27683..8eec24f 100644
--- a/src/com/android/settings/panel/PanelFragment.java
+++ b/src/com/android/settings/panel/PanelFragment.java
@@ -452,13 +452,13 @@
View.OnClickListener getSeeMoreListener() {
return (v) -> {
mPanelClosedKey = PanelClosedKeys.KEY_SEE_MORE;
+ final FragmentActivity activity = getActivity();
if (mPanel.isCustomizedButtonUsed()) {
mPanel.onClickCustomizedButton();
} else {
- final FragmentActivity activity = getActivity();
activity.startActivityForResult(mPanel.getSeeMoreIntent(), 0);
- activity.finish();
}
+ activity.finish();
};
}
diff --git a/src/com/android/settings/sim/SimSelectNotification.java b/src/com/android/settings/sim/SimSelectNotification.java
index b4bd409..4b46939 100644
--- a/src/com/android/settings/sim/SimSelectNotification.java
+++ b/src/com/android/settings/sim/SimSelectNotification.java
@@ -226,7 +226,7 @@
resultIntent.setPackage(SETTINGS_PACKAGE_NAME);
resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent resultPendingIntent = PendingIntent.getActivity(context, 0, resultIntent,
- PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
+ PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
builder.setContentIntent(resultPendingIntent);
NotificationManager notificationManager =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
@@ -264,7 +264,7 @@
resultIntent.putExtra(Settings.EXTRA_SUB_ID, subId);
resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent resultPendingIntent = PendingIntent.getActivity(context, 0, resultIntent,
- PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
+ PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
builder.setContentIntent(resultPendingIntent);
// Notify the notification.
@@ -312,7 +312,7 @@
resultIntent.putExtra(Intent.EXTRA_TEXT, "help_uri_sim_combination_warning");
PendingIntent resultPendingIntent = PendingIntent.getActivity(context, 0, resultIntent,
- PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
+ PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
builder.setContentIntent(resultPendingIntent);
NotificationManager notificationManager =
diff --git a/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java b/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
index afab8c3..4467d66 100644
--- a/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
+++ b/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
@@ -18,9 +18,9 @@
import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
+import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
import static com.android.settings.slices.CustomSliceRegistry.WIFI_CALLING_PREFERENCE_URI;
import static com.android.settings.slices.CustomSliceRegistry.WIFI_CALLING_URI;
-import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
import android.app.PendingIntent;
import android.content.ComponentName;
@@ -539,7 +539,8 @@
*/
public static PendingIntent getSettingsIntent(Context context) {
final Intent intent = new Intent(Settings.ACTION_SETTINGS);
- return PendingIntent.getActivity(context, 0 /* requestCode */, intent, PendingIntent.FLAG_MUTABLE_UNAUDITED /* flags */);
+ return PendingIntent.getActivity(context, 0 /* requestCode */, intent,
+ PendingIntent.FLAG_IMMUTABLE);
}
private PendingIntent getBroadcastIntent(String action) {
@@ -547,7 +548,7 @@
intent.setClass(mContext, SliceBroadcastReceiver.class);
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
return PendingIntent.getBroadcast(mContext, 0 /* requestCode */, intent,
- PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
+ PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
}
/**
@@ -557,7 +558,8 @@
final Intent intent = new Intent(action);
intent.setPackage(SETTINGS_PACKAGE_NAME);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_MUTABLE_UNAUDITED /* flags */);
+ return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent,
+ PendingIntent.FLAG_IMMUTABLE);
}
private Resources getResourcesForSubId(int subId) {
diff --git a/tests/robotests/src/com/android/settings/accessibility/TapAssistanceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/TapAssistanceFragmentTest.java
new file mode 100644
index 0000000..093ea03
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/TapAssistanceFragmentTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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 android.content.Context;
+
+import androidx.test.core.app.ApplicationProvider;
+
+import com.android.settings.R;
+import com.android.settings.testutils.XmlTestUtils;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
+
+import java.util.List;
+
+@RunWith(RobolectricTestRunner.class)
+/** Tests for {@link TapAssistanceFragment}. */
+public class TapAssistanceFragmentTest {
+
+ private Context mContext = ApplicationProvider.getApplicationContext();
+
+ @Test
+ public void getNonIndexableKeys_existInXmlLayout() {
+ final List<String> niks = TapAssistanceFragment.SEARCH_INDEX_DATA_PROVIDER
+ .getNonIndexableKeys(mContext);
+ final List<String> keys =
+ XmlTestUtils.getKeysFromPreferenceXml(mContext, R.xml.accessibility_tap_assistance);
+
+ assertThat(keys).containsAtLeastElementsIn(niks);
+ }
+}
diff --git a/tests/robotests/src/com/android/settings/panel/InternetConnectivityPanelTest.java b/tests/robotests/src/com/android/settings/panel/InternetConnectivityPanelTest.java
index d9f56de..eb82d31 100644
--- a/tests/robotests/src/com/android/settings/panel/InternetConnectivityPanelTest.java
+++ b/tests/robotests/src/com/android/settings/panel/InternetConnectivityPanelTest.java
@@ -20,10 +20,12 @@
import static com.google.common.truth.Truth.assertThat;
import android.net.Uri;
+import android.os.SystemProperties;
import com.android.settings.network.AirplaneModePreferenceController;
import com.android.settings.slices.CustomSliceRegistry;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -37,14 +39,25 @@
public class InternetConnectivityPanelTest {
private InternetConnectivityPanel mPanel;
+ private static final String SETTINGS_PROVIDER_MODEL =
+ "persist.sys.fflag.override.settings_provider_model";
+ private boolean mSettingsProviderModelState;
@Before
public void setUp() {
mPanel = InternetConnectivityPanel.create(RuntimeEnvironment.application);
+ mSettingsProviderModelState = SystemProperties.getBoolean(SETTINGS_PROVIDER_MODEL, false);
+ }
+
+ @After
+ public void tearDown() {
+ SystemProperties.set(SETTINGS_PROVIDER_MODEL,
+ mSettingsProviderModelState ? "true" : "false");
}
@Test
- public void getSlices_containsNecessarySlices() {
+ public void getSlices_providerModelDisabled_containsNecessarySlices() {
+ SystemProperties.set(SETTINGS_PROVIDER_MODEL, "false");
final List<Uri> uris = mPanel.getSlices();
assertThat(uris).containsExactly(
@@ -54,6 +67,16 @@
}
@Test
+ public void getSlices_providerModelEnabled_containsNecessarySlices() {
+ SystemProperties.set(SETTINGS_PROVIDER_MODEL, "true");
+ final List<Uri> uris = mPanel.getSlices();
+
+ assertThat(uris).containsExactly(
+ CustomSliceRegistry.PROVIDER_MODEL_SLICE_URI,
+ CustomSliceRegistry.AIRPLANE_SAFE_NETWORKS_SLICE_URI);
+ }
+
+ @Test
public void getSeeMoreIntent_notNull() {
assertThat(mPanel.getSeeMoreIntent()).isNotNull();
}
diff --git a/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java b/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java
index 0dcf685..dbe7718 100644
--- a/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java
@@ -397,14 +397,15 @@
final Intent intent = new Intent(action);
intent.setClass(mContext, SliceBroadcastReceiver.class);
return PendingIntent.getBroadcast(mContext, 0 /* requestCode */, intent,
- PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED);
+ PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
}
private PendingIntent getActivityIntent(String action) {
final Intent intent = new Intent(action);
intent.setPackage(SETTINGS_PACKAGE_NAME);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_MUTABLE_UNAUDITED /* flags */);
+ return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent,
+ PendingIntent.FLAG_IMMUTABLE);
}
private void assertTitle(List<SliceItem> sliceItems, String title) {