Merge "Refine the preference layout for homepage"

This commit is contained in:
TreeHugger Robot
2021-01-12 09:01:54 +00:00
committed by Android (Google) Code Review
27 changed files with 1268 additions and 71 deletions

View File

@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<issues format="4"> <issues format="4">
<issue
id="LintError"
severity="Error"
message="No `.class` files were found in project &quot;.&quot;, 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.&#xA;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 <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2273,6 +2285,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_about_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_about_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2305,6 +2333,38 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_accessibility_background&quot; />"
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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_accessibility_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_accessibility_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2321,6 +2381,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_accounts_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_accounts_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2337,6 +2413,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_app_and_notification_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_apps_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2353,6 +2445,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_battery_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_battery_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2369,6 +2477,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_connected_device_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_connected_device_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2385,6 +2509,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_display_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_display_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2401,6 +2541,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_emergency_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_emergency_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2417,6 +2573,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_location_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_location_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2433,6 +2605,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_network_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_network_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2465,6 +2653,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_generic_icon_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_notification_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2481,6 +2685,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_privacy_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_privacy_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2497,6 +2717,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_security_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_security_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2513,6 +2749,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_sound_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_sound_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2529,6 +2781,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_storage_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_storage_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2561,6 +2829,38 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_support_background&quot; />"
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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_support_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_support_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2577,6 +2877,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_system_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_system_dashboard_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2593,6 +2909,22 @@
column="13"/> column="13"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/homepage_wallpaper_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_wallpaper_v2.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -2957,7 +3289,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="44" line="45"
column="17"/> column="17"/>
</issue> </issue>
@@ -2973,7 +3305,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="45" line="46"
column="17"/> column="17"/>
</issue> </issue>
@@ -2989,7 +3321,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="54" line="55"
column="17"/> column="17"/>
</issue> </issue>
@@ -3005,7 +3337,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="55" line="56"
column="17"/> column="17"/>
</issue> </issue>
@@ -3021,7 +3353,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="64" line="65"
column="17"/> column="17"/>
</issue> </issue>
@@ -3037,7 +3369,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="65" line="66"
column="17"/> column="17"/>
</issue> </issue>
@@ -3053,7 +3385,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="74" line="75"
column="17"/> column="17"/>
</issue> </issue>
@@ -3069,7 +3401,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/layout/screen_zoom_preview_1.xml" file="res/layout/screen_zoom_preview_1.xml"
line="75" line="76"
column="17"/> column="17"/>
</issue> </issue>
@@ -3121,6 +3453,22 @@
column="9"/> column="9"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;string name=&quot;sync_plug&quot; msgid=&quot;7956982719077985381&quot;>&quot;&quot;&lt;font fgcolor=&quot;#ffffffff&quot;>&quot;Welcome to Google sync!&quot;&lt;/font>&quot; \nA Google approach to syncing data to allow access to your contacts, appointments, and more from wherever you are.&quot;&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rXC/strings.xml"
line="2815"
column="170"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -3133,7 +3481,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/values-en-rAU/strings.xml" file="res/values-en-rAU/strings.xml"
line="2818" line="2816"
column="64"/> column="64"/>
</issue> </issue>
@@ -3149,7 +3497,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/values-en-rCA/strings.xml" file="res/values-en-rCA/strings.xml"
line="2818" line="2816"
column="64"/> column="64"/>
</issue> </issue>
@@ -3165,7 +3513,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/values-en-rGB/strings.xml" file="res/values-en-rGB/strings.xml"
line="2818" line="2816"
column="64"/> column="64"/>
</issue> </issue>
@@ -3181,26 +3529,10 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/values-en-rIN/strings.xml" file="res/values-en-rIN/strings.xml"
line="2818" line="2816"
column="64"/> column="64"/>
</issue> </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;string name=&quot;sync_plug&quot; msgid=&quot;7956982719077985381&quot;>&quot;&quot;&lt;font fgcolor=&quot;#ffffffff&quot;>&quot;Welcome to Google sync!&quot;&lt;/font>&quot; \nA Google approach to syncing data to allow access to your contacts, appointments, and more from wherever you are.&quot;&lt;/string>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rXC/strings.xml"
line="2818"
column="170"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"
@@ -3245,7 +3577,7 @@
errorLine2=" ^"> errorLine2=" ^">
<location <location
file="res/values/styles.xml" file="res/values/styles.xml"
line="428" line="434"
column="44"/> column="44"/>
</issue> </issue>
@@ -3261,7 +3593,7 @@
errorLine2=" ^"> errorLine2=" ^">
<location <location
file="res/values/styles.xml" file="res/values/styles.xml"
line="434" line="440"
column="44"/> column="44"/>
</issue> </issue>
@@ -3277,7 +3609,7 @@
errorLine2=" ^"> errorLine2=" ^">
<location <location
file="res/values/styles.xml" file="res/values/styles.xml"
line="435" line="441"
column="44"/> column="44"/>
</issue> </issue>
@@ -3293,7 +3625,7 @@
errorLine2=" ^"> errorLine2=" ^">
<location <location
file="res/values/styles.xml" file="res/values/styles.xml"
line="471" line="477"
column="34"/> column="34"/>
</issue> </issue>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -20,7 +20,10 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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"> app:layout_scrollFlags="scroll|enterAlways">
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView

View File

@@ -116,6 +116,12 @@
<!-- Dashboard foreground image inset (from background edge to foreground edge) --> <!-- Dashboard foreground image inset (from background edge to foreground edge) -->
<dimen name="dashboard_tile_foreground_image_inset">6dp</dimen> <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) --> <!-- Preference icon foreground image inset (from background edge to foreground edge) -->
<dimen name="preference_icon_foreground_image_inset">12dp</dimen> <dimen name="preference_icon_foreground_image_inset">12dp</dimen>

View File

@@ -312,6 +312,12 @@
<item name="android:textSize">@dimen/search_bar_text_size</item> <item name="android:textSize">@dimen/search_bar_text_size</item>
</style> </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" <style name="TextAppearance.HomepageCardTitle"
parent="@*android:style/TextAppearance.DeviceDefault.Subhead"> parent="@*android:style/TextAppearance.DeviceDefault.Subhead">
<item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item> <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>

View File

@@ -20,17 +20,17 @@
xmlns:settings="http://schemas.android.com/apk/res-auto" xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="top_level_settings_grouped"> android:key="top_level_settings_grouped">
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.network.NetworkDashboardFragment" 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:key="top_level_network"
android:order="-140" android:order="-140"
android:title="@string/network_dashboard_title" android:title="@string/network_dashboard_title"
settings:controller="com.android.settings.network.TopLevelNetworkEntryPreferenceController"/> settings:controller="com.android.settings.network.TopLevelNetworkEntryPreferenceController"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment" 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:key="top_level_connected_devices"
android:order="-130" android:order="-130"
android:title="@string/connected_devices_dashboard_title" android:title="@string/connected_devices_dashboard_title"
@@ -40,16 +40,16 @@
android:key="apps" android:key="apps"
android:order="-120" android:order="-120"
settings:allowDividerAbove="false"> settings:allowDividerAbove="false">
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.applications.AppAndNotificationDashboardFragment" 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:key="top_level_apps_and_notifs"
android:order="-120" android:order="-120"
android:title="@string/apps_dashboard_title"/> android:title="@string/apps_dashboard_title"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.notification.ConfigureNotificationSettings" 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:key="top_level_notification"
android:order="-110" android:order="-110"
android:title="@string/configure_notification_settings"/> android:title="@string/configure_notification_settings"/>
@@ -61,47 +61,47 @@
android:key="phone_essential" android:key="phone_essential"
android:order="-100" android:order="-100"
settings:allowDividerAbove="false"> settings:allowDividerAbove="false">
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.fuelgauge.PowerUsageSummary" 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:key="top_level_battery"
android:order="-100" android:order="-100"
android:title="@string/power_usage_summary_title" android:title="@string/power_usage_summary_title"
settings:controller="com.android.settings.fuelgauge.TopLevelBatteryPreferenceController"/> settings:controller="com.android.settings.fuelgauge.TopLevelBatteryPreferenceController"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.deviceinfo.StorageSettings" 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:key="top_level_storage"
android:order="-90" android:order="-90"
android:title="@string/storage_settings" android:title="@string/storage_settings"
settings:controller="com.android.settings.deviceinfo.TopLevelStoragePreferenceController"/> settings:controller="com.android.settings.deviceinfo.TopLevelStoragePreferenceController"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.notification.SoundSettings" 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:key="top_level_sound"
android:order="-80" android:order="-80"
android:title="@string/sound_settings"/> android:title="@string/sound_settings"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.DisplaySettings" 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:key="top_level_display"
android:order="-70" android:order="-70"
android:title="@string/display_settings" android:title="@string/display_settings"
settings:controller="com.android.settings.display.TopLevelDisplayPreferenceController"/> settings:controller="com.android.settings.display.TopLevelDisplayPreferenceController"/>
<com.android.settingslib.RestrictedTopLevelPreference <com.android.settings.homepage.RestrictedHomepagePreference
android:icon="@drawable/ic_homepage_wallpaper" android:icon="@drawable/ic_homepage_wallpaper_v2"
android:key="top_level_wallpaper" android:key="top_level_wallpaper"
android:order="-60" android:order="-60"
android:title="@string/wallpaper_settings_title" android:title="@string/wallpaper_settings_title"
settings:controller="com.android.settings.display.TopLevelWallpaperPreferenceController"/> settings:controller="com.android.settings.display.TopLevelWallpaperPreferenceController"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.accessibility.AccessibilitySettings" 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:key="top_level_accessibility"
android:order="-50" android:order="-50"
android:title="@string/accessibility_settings" android:title="@string/accessibility_settings"
@@ -112,45 +112,44 @@
android:key="privacy_and_security" android:key="privacy_and_security"
android:order="-40" android:order="-40"
settings:allowDividerAbove="false"> settings:allowDividerAbove="false">
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.privacy.PrivacyDashboardFragment" 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:key="top_level_privacy"
android:order="-40" android:order="-40"
android:title="@string/privacy_dashboard_title"/> android:title="@string/privacy_dashboard_title"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.location.LocationSettings" 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:key="top_level_location"
android:order="-30" android:order="-30"
android:title="@string/location_settings_title" android:title="@string/location_settings_title"
settings:controller="com.android.settings.location.TopLevelLocationPreferenceController"/> settings:controller="com.android.settings.location.TopLevelLocationPreferenceController"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.security.SecuritySettings" 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:key="top_level_security"
android:order="-20" android:order="-20"
android:title="@string/security_settings_title" android:title="@string/security_settings_title"
settings:controller="com.android.settings.security.TopLevelSecurityEntryPreferenceController"/> settings:controller="com.android.settings.security.TopLevelSecurityEntryPreferenceController"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:key="top_level_emergency" android:key="top_level_emergency"
android:title="@string/emergency_settings_preference_title" android:title="@string/emergency_settings_preference_title"
android:icon="@drawable/ic_homepage_emergency" android:icon="@drawable/ic_homepage_emergency_v2"
android:order="-10" android:order="-10"
android:fragment="com.android.settings.emergency.EmergencyDashboardFragment"/> android:fragment="com.android.settings.emergency.EmergencyDashboardFragment"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:key="accounts" android:key="accounts"
android:order="-10" android:order="-10"
settings:allowDividerAbove="false"> settings:allowDividerAbove="false">
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.accounts.AccountDashboardFragment" 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:key="top_level_accounts"
android:order="-10" android:order="-10"
android:title="@string/account_dashboard_title" android:title="@string/account_dashboard_title"
@@ -161,23 +160,23 @@
android:key="system" android:key="system"
android:order="10" android:order="10"
settings:allowDividerAbove="false"> settings:allowDividerAbove="false">
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.system.SystemDashboardFragment" 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:key="top_level_system"
android:order="10" android:order="10"
android:title="@string/header_category_system"/> android:title="@string/header_category_system"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:fragment="com.android.settings.deviceinfo.aboutphone.MyDeviceInfoFragment" 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:key="top_level_about_device"
android:order="20" android:order="20"
android:title="@string/about_settings" android:title="@string/about_settings"
settings:controller="com.android.settings.deviceinfo.aboutphone.TopLevelAboutDevicePreferenceController"/> settings:controller="com.android.settings.deviceinfo.aboutphone.TopLevelAboutDevicePreferenceController"/>
<Preference <com.android.settings.homepage.HomePagePreference
android:icon="@drawable/ic_homepage_support" android:icon="@drawable/ic_homepage_support_v2"
android:key="top_level_support" android:key="top_level_support"
android:order="100" android:order="100"
android:title="@string/page_tab_title_support" android:title="@string/page_tab_title_support"

View File

@@ -25,6 +25,7 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo; import android.content.pm.ResolveInfo;
import android.os.UserHandle; import android.os.UserHandle;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.FeatureFlagUtils;
import android.util.Log; import android.util.Log;
import androidx.preference.Preference; import androidx.preference.Preference;
@@ -32,6 +33,8 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.R; import com.android.settings.R;
import com.android.settings.core.BasePreferenceController; 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.RestrictedLockUtilsInternal;
import com.android.settingslib.RestrictedTopLevelPreference; import com.android.settingslib.RestrictedTopLevelPreference;
@@ -89,8 +92,12 @@ public class TopLevelWallpaperPreferenceController extends BasePreferenceControl
@Override @Override
public void updateState(Preference preference) { public void updateState(Preference preference) {
if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.SILKY_HOME)) {
disablePreferenceIfManaged((RestrictedHomepagePreference) preference);
} else {
disablePreferenceIfManaged((RestrictedTopLevelPreference) preference); disablePreferenceIfManaged((RestrictedTopLevelPreference) preference);
} }
}
@Override @Override
public boolean handlePreferenceTreeClick(Preference preference) { public boolean handlePreferenceTreeClick(Preference preference) {
@@ -133,4 +140,18 @@ public class TopLevelWallpaperPreferenceController extends BasePreferenceControl
} }
} }
} }
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);
}
}
}
} }

View File

@@ -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);
}
}

View File

@@ -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();
}
}
}