[Expressive design] Apply colors to homepage icons

Bug: 396944193
Test: visual, robotest
Flag: com.android.settingslib.widget.theme.flags.is_expressive_design_enabled
Change-Id: I6ec24bdf8cb9a6f8454bd837daffe743b3b01526
This commit is contained in:
Jason Chiu
2025-02-26 02:56:34 +08:00
parent 98a039e8d3
commit 9c16e94552
54 changed files with 995 additions and 40 deletions

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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/ia_settings_communal"
android:tint="@color/homepage_hub_mode_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_account_child_invert"
android:tint="@color/homepage_supervision_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_apps_filled"
android:tint="@color/homepage_apps_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_devices_other_filled"
android:tint="@color/homepage_connected_device_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_help_filled"
android:tint="@color/homepage_support_foreground" />

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_about_device" /> android:drawable="@drawable/ic_settings_about_device_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_accessibility" /> android:drawable="@drawable/ic_settings_accessibility_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_accounts" /> android:drawable="@drawable/ic_settings_passwords_expressive" />
</layer-list> </layer-list>

View File

@@ -21,7 +21,7 @@
<com.android.settingslib.widget.AdaptiveIconShapeDrawable <com.android.settingslib.widget.AdaptiveIconShapeDrawable
android:width="@dimen/dashboard_tile_image_size" android:width="@dimen/dashboard_tile_image_size"
android:height="@dimen/dashboard_tile_image_size" android:height="@dimen/dashboard_tile_image_size"
android:color="@color/homepage_app_and_notification_background" /> android:color="@color/homepage_apps_background" />
</item> </item>
<item <item
@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_apps" /> android:drawable="@drawable/ic_apps_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_battery_white" /> android:drawable="@drawable/ic_settings_battery_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_devices_other" /> android:drawable="@drawable/ic_devices_other_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_display_white" /> android:drawable="@drawable/ic_settings_display_expressive" />
</layer-list> </layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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_safety_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_emergency_expressive" />
</layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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_hub_mode_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/ia_settings_communal_expressive" />
</layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_location"/> android:drawable="@drawable/ic_settings_location_expressive"/>
</layer-list> </layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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_modes_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_zen_priority_modes_expressive" />
</layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_wireless_white" /> android:drawable="@drawable/ic_settings_wireless_expressive" />
</layer-list> </layer-list>

View File

@@ -21,7 +21,7 @@
<com.android.settingslib.widget.AdaptiveIconShapeDrawable <com.android.settingslib.widget.AdaptiveIconShapeDrawable
android:width="@dimen/dashboard_tile_image_size" android:width="@dimen/dashboard_tile_image_size"
android:height="@dimen/dashboard_tile_image_size" android:height="@dimen/dashboard_tile_image_size"
android:color="@color/homepage_generic_icon_background" /> android:color="@color/homepage_sound_background" />
</item> </item>
<item <item
@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_notifications_white" /> android:drawable="@drawable/ic_notifications_expressive" />
</layer-list> </layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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_security_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_privacy_expressive" />
</layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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_security_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_safety_center_expressive" />
</layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_security_white" /> android:drawable="@drawable/ic_settings_security_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_volume_up_24dp" /> android:drawable="@drawable/ic_volume_up_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_storage_white" /> android:drawable="@drawable/ic_storage_expressive" />
</layer-list> </layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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_supervision_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_account_child_invert_expressive" />
</layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_help" /> android:drawable="@drawable/ic_help_expressive" />
</layer-list> </layer-list>

View File

@@ -29,5 +29,5 @@
android:height="@dimen/dashboard_tile_foreground_image_size" android:height="@dimen/dashboard_tile_foreground_image_size"
android:start="@dimen/dashboard_tile_foreground_image_inset" android:start="@dimen/dashboard_tile_foreground_image_inset"
android:top="@dimen/dashboard_tile_foreground_image_inset" android:top="@dimen/dashboard_tile_foreground_image_inset"
android:drawable="@drawable/ic_settings_system_dashboard_white" /> android:drawable="@drawable/ic_settings_system_dashboard_expressive" />
</layer-list> </layer-list>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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_wallpaper_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_wallpaper_expressive" />
</layer-list>

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_filled"
android:tint="@color/homepage_notification_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_about_device_filled"
android:tint="@color/homepage_about_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_accessibility_filled"
android:tint="@color/homepage_accessibility_foreground"/>

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_battery_filled"
android:tint="@color/homepage_battery_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_display_filled"
android:tint="@color/homepage_display_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_emergency_filled"
android:tint="@color/homepage_safety_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_location_filled"
android:tint="@color/homepage_location_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_passwords_filled"
android:tint="@color/homepage_accounts_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_privacy_filled"
android:tint="@color/homepage_security_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_safety_center_filled"
android:tint="@color/homepage_security_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_security_filled"
android:tint="@color/homepage_security_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_system_dashboard_filled"
android:tint="@color/homepage_system_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_wallpaper_filled"
android:tint="@color/homepage_wallpaper_foreground" />

View File

@@ -14,12 +14,12 @@
limitations under the License. limitations under the License.
--> -->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="960" android:viewportWidth="960"
android:viewportHeight="960" android:viewportHeight="960"
android:tint="?android:attr/colorControlNormal"> android:tint="?android:attr/colorControlNormal">
<path <path
android:fillColor="@android:color/white" android:fillColor="@android:color/white"
android:pathData="M480,880Q398,880 325,848.5Q252,817 197.5,762.5Q143,708 111.5,635Q80,562 80,480Q80,397 112.5,324Q145,251 200.5,197Q256,143 330,111.5Q404,80 488,80Q568,80 639,107.5Q710,135 763.5,183.5Q817,232 848.5,298.5Q880,365 880,442Q880,557 810,618.5Q740,680 640,680L566,680Q557,680 553.5,685Q550,690 550,696Q550,708 565,730.5Q580,753 580,782Q580,832 552.5,856Q525,880 480,880ZM260,520Q286,520 303,503Q320,486 320,460Q320,434 303,417Q286,400 260,400Q234,400 217,417Q200,434 200,460Q200,486 217,503Q234,520 260,520ZM380,360Q406,360 423,343Q440,326 440,300Q440,274 423,257Q406,240 380,240Q354,240 337,257Q320,274 320,300Q320,326 337,343Q354,360 380,360ZM580,360Q606,360 623,343Q640,326 640,300Q640,274 623,257Q606,240 580,240Q554,240 537,257Q520,274 520,300Q520,326 537,343Q554,360 580,360ZM700,520Q726,520 743,503Q760,486 760,460Q760,434 743,417Q726,400 700,400Q674,400 657,417Q640,434 640,460Q640,486 657,503Q674,520 700,520Z"/> android:pathData="M480,880Q398,880 325,848.5Q252,817 197.5,762.5Q143,708 111.5,635Q80,562 80,480Q80,397 112.5,324Q145,251 200.5,197Q256,143 330,111.5Q404,80 488,80Q568,80 639,107.5Q710,135 763.5,183.5Q817,232 848.5,298.5Q880,365 880,442Q880,557 810,618.5Q740,680 640,680L566,680Q557,680 553.5,685Q550,690 550,696Q550,708 565,730.5Q580,753 580,782Q580,832 552.5,856Q525,880 480,880ZM260,520Q286,520 303,503Q320,486 320,460Q320,434 303,417Q286,400 260,400Q234,400 217,417Q200,434 200,460Q200,486 217,503Q234,520 260,520ZM380,360Q406,360 423,343Q440,326 440,300Q440,274 423,257Q406,240 380,240Q354,240 337,257Q320,274 320,300Q320,326 337,343Q354,360 380,360ZM580,360Q606,360 623,343Q640,326 640,300Q640,274 623,257Q606,240 580,240Q554,240 537,257Q520,274 520,300Q520,326 537,343Q554,360 580,360ZM700,520Q726,520 743,503Q760,486 760,460Q760,434 743,417Q726,400 700,400Q674,400 657,417Q640,434 640,460Q640,486 657,503Q674,520 700,520Z"/>
</vector> </vector>

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_wireless_filled"
android:tint="@color/homepage_network_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_storage_filled"
android:tint="@color/homepage_storage_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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_volume_up_filled"
android:tint="@color/homepage_sound_foreground" />

View File

@@ -0,0 +1,19 @@
<!--
Copyright (C) 2025 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="@*android:drawable/ic_zen_priority_modes"
android:tint="@color/homepage_modes_foreground" />

View File

@@ -0,0 +1,269 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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="top_level_settings">
<PreferenceCategory
android:order="-140"
android:key="top_level_account_category"
android:layout="@layout/settingslib_preference_category_no_title">
</PreferenceCategory>
<PreferenceCategory
android:order="-130"
android:key="top_level_connectivity_category"
android:layout="@layout/settingslib_preference_category_no_title">
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.network.NetworkDashboardFragment"
android:icon="@drawable/ic_homepage_network"
android:key="top_level_network"
android:order="-20"
android:title="@string/network_dashboard_title"
android:summary="@string/summary_placeholder"
settings:highlightableMenuKey="@string/menu_key_network"
settings:controller="com.android.settings.network.TopLevelNetworkEntryPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment"
android:icon="@drawable/ic_homepage_connected_device"
android:key="top_level_connected_devices"
android:order="-10"
android:title="@string/connected_devices_dashboard_title"
android:summary="@string/connected_devices_dashboard_default_summary"
settings:highlightableMenuKey="@string/menu_key_connected_devices"
settings:controller="com.android.settings.connecteddevice.TopLevelConnectedDevicesPreferenceController"/>
</PreferenceCategory>
<PreferenceCategory
android:order="-120"
android:key="top_level_personalize_category"
android:layout="@layout/settingslib_preference_category_no_title">
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.applications.AppDashboardFragment"
android:icon="@drawable/ic_homepage_apps"
android:key="top_level_apps"
android:order="-60"
android:title="@string/apps_dashboard_title"
android:summary="@string/app_and_notification_dashboard_summary"
settings:highlightableMenuKey="@string/menu_key_apps"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.notification.ConfigureNotificationSettings"
android:icon="@drawable/ic_homepage_notification"
android:key="top_level_notifications"
android:order="-50"
android:title="@string/configure_notification_settings"
android:summary="@string/notification_dashboard_summary"
settings:highlightableMenuKey="@string/menu_key_notifications"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.notification.SoundSettings"
android:icon="@drawable/ic_homepage_sound"
android:key="top_level_sound"
android:order="-40"
android:title="@string/sound_settings"
android:summary="@string/sound_dashboard_summary_with_dnd"
settings:highlightableMenuKey="@string/menu_key_sound"
settings:controller="com.android.settings.sound.TopLevelSoundPreferenceController"/>
<com.android.settings.widget.RestrictedHomepagePreference
android:fragment="com.android.settings.notification.modes.ZenModesListFragment"
android:icon="@drawable/ic_homepage_modes"
android:key="top_level_priority_modes"
android:order="-35"
android:title="@string/zen_modes_list_title"
settings:useAdminDisabledSummary="true"
settings:highlightableMenuKey="@string/menu_key_priority_modes"
settings:controller="com.android.settings.notification.modes.ZenModesLinkPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.communal.CommunalDashboardFragment"
android:icon="@drawable/ic_homepage_hub_mode"
android:key="top_level_communal"
android:order="-30"
android:title="@string/communal_settings_title"
android:summary="@string/communal_settings_summary"
settings:highlightableMenuKey="@string/menu_key_communal"
settings:controller="com.android.settings.communal.CommunalPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.DisplaySettings"
android:icon="@drawable/ic_homepage_display"
android:key="top_level_display"
android:order="-20"
android:title="@string/display_settings"
android:summary="@string/display_dashboard_summary"
settings:highlightableMenuKey="@string/menu_key_display"
settings:controller="com.android.settings.display.TopLevelDisplayPreferenceController"/>
<com.android.settings.widget.RestrictedHomepagePreference
android:icon="@drawable/ic_homepage_wallpaper"
android:key="top_level_wallpaper"
android:order="-10"
android:title="@string/wallpaper_settings_title"
android:summary="@string/wallpaper_dashboard_summary"
settings:highlightableMenuKey="@string/menu_key_wallpaper"
settings:controller="com.android.settings.display.TopLevelWallpaperPreferenceController"/>
</PreferenceCategory>
<PreferenceCategory
android:order="-110"
android:key="top_level_system_info_category"
android:layout="@layout/settingslib_preference_category_no_title">
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.deviceinfo.StorageDashboardFragment"
android:icon="@drawable/ic_homepage_storage"
android:key="top_level_storage"
android:order="-50"
android:title="@string/storage_settings"
android:summary="@string/summary_placeholder"
settings:highlightableMenuKey="@string/menu_key_storage"
settings:controller="com.android.settings.deviceinfo.TopLevelStoragePreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.fuelgauge.batteryusage.PowerUsageSummary"
android:icon="@drawable/ic_homepage_battery"
android:key="top_level_battery"
android:order="-30"
android:title="@string/power_usage_summary_title"
android:summary="@string/summary_placeholder"
settings:highlightableMenuKey="@string/menu_key_battery"
settings:controller="com.android.settings.fuelgauge.TopLevelBatteryPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.system.SystemDashboardFragment"
android:icon="@drawable/ic_homepage_system_dashboard"
android:key="top_level_system"
android:order="-20"
android:title="@string/header_category_system"
android:summary="@string/system_dashboard_summary"
settings:highlightableMenuKey="@string/menu_key_system"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.deviceinfo.aboutphone.MyDeviceInfoFragment"
android:icon="@drawable/ic_homepage_about"
android:key="top_level_about_device"
android:order="-10"
android:title="@string/about_settings"
android:summary="@string/summary_placeholder"
settings:highlightableMenuKey="@string/menu_key_about_device"
settings:controller="com.android.settings.deviceinfo.aboutphone.TopLevelAboutDevicePreferenceController"/>
</PreferenceCategory>
<PreferenceCategory
android:order="-100"
android:key="top_level_security_privacy_category"
android:layout="@layout/settingslib_preference_category_no_title">
<com.android.settings.widget.HomepagePreference
android:icon="@drawable/ic_homepage_safety_center"
android:key="top_level_safety_center"
android:order="-50"
android:title="@string/safety_center_title"
android:summary="@string/safety_center_summary"
settings:highlightableMenuKey="@string/menu_key_safety_center"
settings:controller="com.android.settings.safetycenter.TopLevelSafetyCenterEntryPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.security.SecuritySettings"
android:icon="@drawable/ic_homepage_security"
android:key="top_level_security"
android:order="-40"
android:title="@string/security_settings_title"
android:summary="@string/security_dashboard_summary"
settings:highlightableMenuKey="@string/menu_key_security"
settings:controller="com.android.settings.security.TopLevelSecurityEntryPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.privacy.PrivacyDashboardFragment"
android:icon="@drawable/ic_homepage_privacy"
android:key="top_level_privacy"
android:order="-30"
android:title="@string/privacy_dashboard_title"
android:summary="@string/privacy_dashboard_summary"
settings:highlightableMenuKey="@string/menu_key_privacy"
settings:controller="com.android.settings.privacy.TopLevelPrivacyEntryPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.location.LocationSettings"
android:icon="@drawable/ic_homepage_location"
android:key="top_level_location"
android:order="-20"
android:title="@string/location_settings_title"
android:summary="@string/location_settings_loading_app_permission_stats"
settings:highlightableMenuKey="@string/menu_key_location"
settings:controller="com.android.settings.location.TopLevelLocationPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.accounts.AccountDashboardFragment"
android:icon="@drawable/ic_homepage_accounts"
android:key="top_level_accounts"
android:order="-10"
android:title="@string/account_dashboard_title_with_passkeys"
android:summary="@string/summary_placeholder"
settings:highlightableMenuKey="@string/menu_key_accounts"
settings:controller="com.android.settings.accounts.TopLevelAccountEntryPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:key="top_level_supervision"
android:title="@string/supervision_settings_title"
android:summary="@string/supervision_settings_summary"
android:icon="@drawable/ic_homepage_supervision"
android:order="5"
android:fragment="com.android.settings.supervision.SupervisionDashboardFragment"
settings:highlightableMenuKey="@string/menu_key_supervision"
settings:controller="com.android.settings.supervision.TopLevelSupervisionPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:key="top_level_emergency"
android:title="@string/emergency_settings_preference_title"
android:summary="@string/emergency_dashboard_summary"
android:icon="@drawable/ic_homepage_emergency"
android:order="10"
android:fragment="com.android.settings.emergency.EmergencyDashboardFragment"
settings:isPreferenceVisible="@bool/config_show_emergency_settings"
settings:highlightableMenuKey="@string/menu_key_emergency"/>
</PreferenceCategory>
<PreferenceCategory
android:order="100"
android:key="top_level_support_category"
android:layout="@layout/settingslib_preference_category_no_title">
<com.android.settings.widget.HomepagePreference
android:fragment="com.android.settings.accessibility.AccessibilitySettings"
android:icon="@drawable/ic_homepage_accessibility"
android:key="top_level_accessibility"
android:order="-20"
android:title="@string/accessibility_settings"
android:summary="@string/accessibility_settings_summary"
settings:highlightableMenuKey="@string/menu_key_accessibility"
settings:controller="com.android.settings.accessibility.TopLevelAccessibilityPreferenceController"/>
<com.android.settings.widget.HomepagePreference
android:icon="@drawable/ic_homepage_support"
android:key="top_level_support"
android:order="-10"
android:title="@string/page_tab_title_support"
android:summary="@string/support_summary"
settings:highlightableMenuKey="@string/menu_key_support"
settings:controller="com.android.settings.support.SupportPreferenceController"/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -26,6 +26,7 @@ import com.android.settingslib.metadata.PreferenceSummaryProvider
import com.android.settingslib.metadata.ProvidePreferenceScreen import com.android.settingslib.metadata.ProvidePreferenceScreen
import com.android.settingslib.metadata.preferenceHierarchy import com.android.settingslib.metadata.preferenceHierarchy
import com.android.settingslib.preference.PreferenceScreenCreator import com.android.settingslib.preference.PreferenceScreenCreator
import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme
@ProvidePreferenceScreen(MyDeviceInfoScreen.KEY) @ProvidePreferenceScreen(MyDeviceInfoScreen.KEY)
class MyDeviceInfoScreen : class MyDeviceInfoScreen :
@@ -41,12 +42,12 @@ class MyDeviceInfoScreen :
?: Build.MODEL ?: Build.MODEL
} }
override fun getIcon(context: Context): Int { override fun getIcon(context: Context) =
return when (Flags.homepageRevamp()) { when {
true -> R.drawable.ic_settings_about_device_filled isExpressiveTheme(context) -> R.drawable.ic_homepage_about
false -> R.drawable.ic_settings_about_device Flags.homepageRevamp() -> R.drawable.ic_settings_about_device_filled
else -> R.drawable.ic_settings_about_device
} }
}
override fun isFlagEnabled(context: Context) = Flags.catalystMyDeviceInfoPrefScreen() override fun isFlagEnabled(context: Context) = Flags.catalystMyDeviceInfoPrefScreen()

View File

@@ -29,6 +29,7 @@ import com.android.settingslib.metadata.PreferenceMetadata
import com.android.settingslib.metadata.ProvidePreferenceScreen import com.android.settingslib.metadata.ProvidePreferenceScreen
import com.android.settingslib.metadata.preferenceHierarchy import com.android.settingslib.metadata.preferenceHierarchy
import com.android.settingslib.preference.PreferenceScreenCreator import com.android.settingslib.preference.PreferenceScreenCreator
import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme
@ProvidePreferenceScreen(DisplayScreen.KEY) @ProvidePreferenceScreen(DisplayScreen.KEY)
open class DisplayScreen : open class DisplayScreen :
@@ -41,6 +42,7 @@ open class DisplayScreen :
override fun getIcon(context: Context) = override fun getIcon(context: Context) =
when { when {
isExpressiveTheme(context) -> R.drawable.ic_homepage_display
Flags.homepageRevamp() -> R.drawable.ic_settings_display_filled Flags.homepageRevamp() -> R.drawable.ic_settings_display_filled
else -> R.drawable.ic_settings_display_white else -> R.drawable.ic_settings_display_white
} }

View File

@@ -25,6 +25,7 @@ import com.android.settingslib.metadata.PreferenceIconProvider
import com.android.settingslib.metadata.ProvidePreferenceScreen import com.android.settingslib.metadata.ProvidePreferenceScreen
import com.android.settingslib.metadata.preferenceHierarchy import com.android.settingslib.metadata.preferenceHierarchy
import com.android.settingslib.preference.PreferenceScreenCreator import com.android.settingslib.preference.PreferenceScreenCreator
import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme
@ProvidePreferenceScreen(PowerUsageSummaryScreen.KEY) @ProvidePreferenceScreen(PowerUsageSummaryScreen.KEY)
class PowerUsageSummaryScreen : class PowerUsageSummaryScreen :
@@ -47,11 +48,11 @@ class PowerUsageSummaryScreen :
override fun isAvailable(context: Context) = override fun isAvailable(context: Context) =
context.resources.getBoolean(R.bool.config_show_top_level_battery) context.resources.getBoolean(R.bool.config_show_top_level_battery)
override fun getIcon(context: Context): Int = override fun getIcon(context: Context) =
if (Flags.homepageRevamp()) { when {
R.drawable.ic_settings_battery_filled isExpressiveTheme(context) -> R.drawable.ic_homepage_battery
} else { Flags.homepageRevamp() -> R.drawable.ic_settings_battery_filled
R.drawable.ic_settings_battery_white else -> R.drawable.ic_settings_battery_white
} }
override fun getPreferenceHierarchy(context: Context) = override fun getPreferenceHierarchy(context: Context) =

View File

@@ -25,11 +25,13 @@ import android.content.Context;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import android.provider.SearchIndexableResource;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.ViewGroup; import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting; import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.preference.Preference; import androidx.preference.Preference;
@@ -56,6 +58,9 @@ import com.android.settings.widget.HomepagePreferenceLayoutHelper.HomepagePrefer
import com.android.settingslib.core.instrumentation.Instrumentable; import com.android.settingslib.core.instrumentation.Instrumentable;
import com.android.settingslib.drawer.Tile; import com.android.settingslib.drawer.Tile;
import com.android.settingslib.search.SearchIndexable; import com.android.settingslib.search.SearchIndexable;
import com.android.settingslib.widget.SettingsThemeHelper;
import java.util.List;
@SearchIndexable(forTarget = MOBILE) @SearchIndexable(forTarget = MOBILE)
public class TopLevelSettings extends DashboardFragment implements SplitLayoutListener, public class TopLevelSettings extends DashboardFragment implements SplitLayoutListener,
@@ -88,7 +93,7 @@ public class TopLevelSettings extends DashboardFragment implements SplitLayoutLi
@Override @Override
protected int getPreferenceScreenResId() { protected int getPreferenceScreenResId() {
return Flags.homepageRevamp() ? R.xml.top_level_settings_v2 : R.xml.top_level_settings; return getPreferenceLayoutResId(getContext());
} }
@Override @Override
@@ -392,11 +397,25 @@ public class TopLevelSettings extends DashboardFragment implements SplitLayoutLi
void doForEach(Preference preference); void doForEach(Preference preference);
} }
private static int getPreferenceLayoutResId(Context context) {
return Flags.homepageRevamp()
? SettingsThemeHelper.isExpressiveTheme(context)
? R.xml.top_level_settings_expressive
: R.xml.top_level_settings_v2
: R.xml.top_level_settings;
}
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
new BaseSearchIndexProvider( new BaseSearchIndexProvider() {
Flags.homepageRevamp()
? R.xml.top_level_settings_v2 @Override
: R.xml.top_level_settings) { @NonNull
public List<SearchIndexableResource> getXmlResourcesToIndex(
@NonNull Context context, boolean enabled) {
SearchIndexableResource sir = new SearchIndexableResource(context);
sir.xmlResId = getPreferenceLayoutResId(context);
return List.of(sir);
}
@Override @Override
protected boolean isPageSearchEnabled(Context context) { protected boolean isPageSearchEnabled(Context context) {

View File

@@ -24,6 +24,7 @@ import com.android.settingslib.metadata.PreferenceSummaryProvider
import com.android.settingslib.metadata.ProvidePreferenceScreen import com.android.settingslib.metadata.ProvidePreferenceScreen
import com.android.settingslib.metadata.preferenceHierarchy import com.android.settingslib.metadata.preferenceHierarchy
import com.android.settingslib.preference.PreferenceScreenCreator import com.android.settingslib.preference.PreferenceScreenCreator
import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme
@ProvidePreferenceScreen(LocationScreen.KEY) @ProvidePreferenceScreen(LocationScreen.KEY)
class LocationScreen : PreferenceScreenCreator, PreferenceSummaryProvider, PreferenceIconProvider { class LocationScreen : PreferenceScreenCreator, PreferenceSummaryProvider, PreferenceIconProvider {
@@ -47,6 +48,7 @@ class LocationScreen : PreferenceScreenCreator, PreferenceSummaryProvider, Prefe
override fun getIcon(context: Context) = override fun getIcon(context: Context) =
when { when {
isExpressiveTheme(context) -> R.drawable.ic_homepage_location
Flags.homepageRevamp() -> R.drawable.ic_settings_location_filled Flags.homepageRevamp() -> R.drawable.ic_settings_location_filled
else -> R.drawable.ic_settings_location else -> R.drawable.ic_settings_location
} }

View File

@@ -26,6 +26,7 @@ import com.android.settingslib.metadata.PreferenceMetadata
import com.android.settingslib.metadata.ProvidePreferenceScreen import com.android.settingslib.metadata.ProvidePreferenceScreen
import com.android.settingslib.metadata.preferenceHierarchy import com.android.settingslib.metadata.preferenceHierarchy
import com.android.settingslib.preference.PreferenceScreenCreator import com.android.settingslib.preference.PreferenceScreenCreator
import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme
@ProvidePreferenceScreen(NetworkDashboardScreen.KEY) @ProvidePreferenceScreen(NetworkDashboardScreen.KEY)
class NetworkDashboardScreen : PreferenceScreenCreator, PreferenceIconProvider { class NetworkDashboardScreen : PreferenceScreenCreator, PreferenceIconProvider {
@@ -37,6 +38,7 @@ class NetworkDashboardScreen : PreferenceScreenCreator, PreferenceIconProvider {
override fun getIcon(context: Context) = override fun getIcon(context: Context) =
when { when {
isExpressiveTheme(context) -> R.drawable.ic_homepage_network
Flags.homepageRevamp() -> R.drawable.ic_settings_wireless_filled Flags.homepageRevamp() -> R.drawable.ic_settings_wireless_filled
else -> R.drawable.ic_settings_wireless else -> R.drawable.ic_settings_wireless
} }

View File

@@ -26,6 +26,7 @@ import com.android.settingslib.metadata.PreferenceMetadata
import com.android.settingslib.metadata.ProvidePreferenceScreen import com.android.settingslib.metadata.ProvidePreferenceScreen
import com.android.settingslib.metadata.preferenceHierarchy import com.android.settingslib.metadata.preferenceHierarchy
import com.android.settingslib.preference.PreferenceScreenCreator import com.android.settingslib.preference.PreferenceScreenCreator
import com.android.settingslib.widget.SettingsThemeHelper.isExpressiveTheme
@ProvidePreferenceScreen(SoundScreen.KEY) @ProvidePreferenceScreen(SoundScreen.KEY)
class SoundScreen : PreferenceScreenCreator, PreferenceIconProvider { class SoundScreen : PreferenceScreenCreator, PreferenceIconProvider {
@@ -40,6 +41,7 @@ class SoundScreen : PreferenceScreenCreator, PreferenceIconProvider {
override fun getIcon(context: Context) = override fun getIcon(context: Context) =
when { when {
isExpressiveTheme(context) -> R.drawable.ic_homepage_sound
Flags.homepageRevamp() -> R.drawable.ic_volume_up_filled Flags.homepageRevamp() -> R.drawable.ic_volume_up_filled
else -> R.drawable.ic_volume_up_24dp else -> R.drawable.ic_volume_up_24dp
} }

View File

@@ -74,6 +74,14 @@ class PowerUsageSummaryScreenTest : CatalystScreenTestCase() {
} }
@Test @Test
@EnableFlags(com.android.settingslib.widget.theme.flags.Flags.FLAG_IS_EXPRESSIVE_DESIGN_ENABLED)
fun getIcon_isExpressiveTheme() {
assertThat(preferenceScreenCreator.getIcon(context))
.isEqualTo(R.drawable.ic_homepage_battery)
}
@Test
@DisableFlags(com.android.settingslib.widget.theme.flags.Flags.FLAG_IS_EXPRESSIVE_DESIGN_ENABLED)
@EnableFlags(Flags.FLAG_HOMEPAGE_REVAMP) @EnableFlags(Flags.FLAG_HOMEPAGE_REVAMP)
fun getIcon_whenHomePageRevampFlagOn() { fun getIcon_whenHomePageRevampFlagOn() {
assertThat(preferenceScreenCreator.getIcon(context)) assertThat(preferenceScreenCreator.getIcon(context))