Merge "Workaround for Recent app icon disappear" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-06-18 09:10:00 +00:00
committed by Android (Google) Code Review
6 changed files with 144 additions and 8 deletions

View File

@@ -219,7 +219,7 @@
<activity <activity
android:name=".Settings$ConnectedDeviceDashboardActivity" android:name=".Settings$ConnectedDeviceDashboardActivity"
android:label="@string/connected_devices_dashboard_title" android:label="@string/connected_devices_dashboard_title"
android:icon="@drawable/ic_devices_other"> android:icon="@drawable/ic_homepage_connected_device">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.settings.BLUETOOTH_SETTINGS" /> <action android:name="android.settings.BLUETOOTH_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@@ -254,7 +254,7 @@
<activity <activity
android:name="Settings$WifiSettingsActivity" android:name="Settings$WifiSettingsActivity"
android:label="@string/wifi_settings" android:label="@string/wifi_settings"
android:icon="@drawable/ic_settings_wireless" android:icon="@drawable/ic_homepage_network"
android:configChanges="orientation|keyboardHidden|screenSize"> android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.settings.WIFI_SETTINGS" /> <action android:name="android.settings.WIFI_SETTINGS" />
@@ -273,7 +273,7 @@
<activity <activity
android:name="Settings$WifiSettings2Activity" android:name="Settings$WifiSettings2Activity"
android:label="@string/wifi_settings" android:label="@string/wifi_settings"
android:icon="@drawable/ic_settings_wireless" android:icon="@drawable/ic_homepage_network"
android:configChanges="orientation|keyboardHidden|screenSize"> android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.settings.WIFI_SETTINGS2" /> <action android:name="android.settings.WIFI_SETTINGS2" />
@@ -492,7 +492,7 @@
<activity <activity
android:name="Settings$TetherSettingsActivity" android:name="Settings$TetherSettingsActivity"
android:label="@string/tether_settings_title_all" android:label="@string/tether_settings_title_all"
android:icon="@drawable/ic_settings_wireless"> android:icon="@drawable/ic_homepage_network">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.TETHER_SETTINGS" /> <action android:name="android.settings.TETHER_SETTINGS" />
@@ -738,7 +738,7 @@
<activity <activity
android:name="Settings$ZenModeSettingsActivity" android:name="Settings$ZenModeSettingsActivity"
android:label="@string/zen_mode_settings_title" android:label="@string/zen_mode_settings_title"
android:icon="@drawable/ic_notifications" android:icon="@drawable/ic_homepage_notification"
android:exported="true"> android:exported="true">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.settings.ZEN_MODE_SETTINGS" /> <action android:name="android.settings.ZEN_MODE_SETTINGS" />
@@ -909,7 +909,7 @@
android:name="Settings$NightDisplaySettingsActivity" android:name="Settings$NightDisplaySettingsActivity"
android:label="@string/night_display_title" android:label="@string/night_display_title"
android:enabled="@*android:bool/config_nightDisplayAvailable" android:enabled="@*android:bool/config_nightDisplayAvailable"
android:icon="@drawable/ic_settings_night_display"> android:icon="@drawable/ic_homepage_night_display">
<intent-filter android:priority="32"> <intent-filter android:priority="32">
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="com.android.settings.SHORTCUT" /> <category android:name="com.android.settings.SHORTCUT" />
@@ -1225,7 +1225,7 @@
<activity <activity
android:name="Settings$LocationSettingsActivity" android:name="Settings$LocationSettingsActivity"
android:label="@string/location_settings_title" android:label="@string/location_settings_title"
android:icon="@drawable/ic_settings_location" android:icon="@drawable/ic_homepage_location"
android:configChanges="orientation|keyboardHidden|screenSize"> android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.settings.LOCATION_SOURCE_SETTINGS" /> <action android:name="android.settings.LOCATION_SOURCE_SETTINGS" />
@@ -2179,7 +2179,7 @@
<activity <activity
android:name="Settings$PowerUsageSummaryActivity" android:name="Settings$PowerUsageSummaryActivity"
android:label="@string/power_usage_summary_title" android:label="@string/power_usage_summary_title"
android:icon="@drawable/ic_settings_battery"> android:icon="@drawable/ic_homepage_battery">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.intent.action.POWER_USAGE_SUMMARY" /> <action android:name="android.intent.action.POWER_USAGE_SUMMARY" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

View File

@@ -2321,6 +2321,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_generic_icon_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_night_display.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_generic_icon_background&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_homepage_notification.xml"
line="24"
column="13"/>
</issue>
<issue <issue
id="HardCodedColor" id="HardCodedColor"
severity="Error" severity="Error"

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/dashboard_tile_image_size"
android:height="@dimen/dashboard_tile_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/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_night_display_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/dashboard_tile_image_size"
android:height="@dimen/dashboard_tile_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/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_notifications_white" />
</layer-list>

View File

@@ -0,0 +1,19 @@
<!--
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.
-->
<com.android.settings.widget.TintDrawable
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_notifications"
android:tint="?android:attr/colorPrimary" />

View File

@@ -0,0 +1,19 @@
<!--
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.
-->
<com.android.settings.widget.TintDrawable
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_settings_night_display"
android:tint="?android:attr/colorPrimary" />