[Settings] Enable support for AdaptiveIcon (Data Usage, Hotspot, VPN)
This is a change to enable the support of AdaptiveIcon for following
widgets:
1. Data Usage
2. Wi-Fi Hotspot
3. VPN
Bug: 225252321
Test: local
Change-Id: I523dee9cfd435a95fd31e8730053e0d9ff2c2339
(cherry picked from commit 86027479cb
)
This commit is contained in:
@@ -721,7 +721,7 @@
|
||||
android:name="Settings$WifiTetherSettingsActivity"
|
||||
android:label="@string/wifi_hotspot_checkbox_text"
|
||||
android:exported="true"
|
||||
android:icon="@drawable/ic_wifi_tethering">
|
||||
android:icon="@drawable/ic_homepage_wifi_tethering">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.settings.WIFI_TETHER_SETTINGS" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
@@ -766,7 +766,7 @@
|
||||
android:name="Settings$VpnSettingsActivity"
|
||||
android:label="@string/vpn_settings_title"
|
||||
android:exported="true"
|
||||
android:icon="@drawable/ic_settings_wireless">
|
||||
android:icon="@drawable/ic_homepage_vpn">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.settings.VPN_SETTINGS" />
|
||||
<action android:name="android.net.vpn.SETTINGS" />
|
||||
@@ -2910,7 +2910,7 @@
|
||||
android:name="Settings$DataUsageSummaryActivity"
|
||||
android:label="@string/data_usage_summary_title"
|
||||
android:exported="true"
|
||||
android:icon="@drawable/ic_settings_data_usage">
|
||||
android:icon="@drawable/ic_homepage_data_usage">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.settings.DATA_USAGE_SETTINGS" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
33
res/drawable/ic_homepage_data_usage.xml
Normal file
33
res/drawable/ic_homepage_data_usage.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022 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_network_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_data_usage" />
|
||||
</layer-list>
|
33
res/drawable/ic_homepage_vpn.xml
Normal file
33
res/drawable/ic_homepage_vpn.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022 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_network_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_wireless" />
|
||||
</layer-list>
|
33
res/drawable/ic_homepage_wifi_tethering.xml
Normal file
33
res/drawable/ic_homepage_wifi_tethering.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022 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_network_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_wifi_tethering" />
|
||||
</layer-list>
|
Reference in New Issue
Block a user