Redirect to new modes page when modes_ui is on.

The new modes page has essentially no content yet, but this is a rough proof of concept for the existing abstract classes and hopefully serves as a building block for future changes. It lists modes and those preferences lead to contentless pages that will be fleshed out later..

Flag: android.app.modes_ui
Bug: 327260745
Test: ZenModePreferenceControllerTest
Test: manual; individual pages only have skeleton functionality and should be unit tested in future CLs
Change-Id: I12f48b48f761e3c9ff1a173445b15f7536d34edb
This commit is contained in:
Yuri Lin
2024-04-11 17:12:24 -04:00
parent 7469ed03de
commit eff863e5a3
9 changed files with 438 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2024 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"
android:title="@string/zen_modes_list_title" >
<!-- TODO: b/333682392 - add strings for summary as appropriate -->
<PreferenceCategory
android:key="zen_modes_list">
<!-- Preferences leading to rules are added in this PreferenceCategory. -->
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2024 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"
android:title="@string/zen_modes_list_title" >
<!-- TODO: b/308819292 - implement page, delete this test preference -->
<Preference
android:key="zen_mode_test" />
</PreferenceScreen>