Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 765007b0 authored by Doris Ling's avatar Doris Ling
Browse files

Add controllers for default app shortcut preferences.

- add the default app shortcut preferences to the preference screen
xml instead of creating them dynamically in the fragment.
- add controller for each of the shortcut preference.
- move the corresponding shortcut detail settings into the appinfo
package.
- add individual preference screen xml for the shortcut detail settings
instead of using the shared screen template.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: I7bc0b3b727e87fb1a32a82291e64b8e290947671
parent d7d5754c
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -105,6 +105,33 @@
        android:title="@string/sms_application_title"
        android:summary="@string/summary_placeholder" />

    <!-- Advanced apps settings -->
    <PreferenceCategory
        android:key="advanced_app_info"
        android:title="@string/advanced_apps">

        <Preference
            android:key="system_alert_window"
            android:title="@string/draw_overlay"
            android:summary="@string/summary_placeholder" />

        <Preference
            android:key="write_settings_apps"
            android:title="@string/write_settings"
            android:summary="@string/summary_placeholder" />

        <Preference
            android:key="picture_in_picture"
            android:title="@string/picture_in_picture_app_detail_title"
            android:summary="@string/summary_placeholder" />

        <Preference
            android:key="install_other_apps"
            android:title="@string/install_other_apps"
            android:summary="@string/summary_placeholder" />

    </PreferenceCategory>

    <Preference
        android:key="app_version"
        android:selectable="false"
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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:key="draw_overlay_permission_detail_settings"
    android:title="@string/draw_overlay">

    <SwitchPreference
        android:key="app_ops_settings_switch"
        android:title="@string/permit_draw_overlay"/>

    <Preference
        android:key="app_ops_settings_preference"
        android:title="@string/app_overlay_permission_preference"/>

    <Preference
        android:summary="@string/allow_overlay_description"
        android:selectable="false"/>

</PreferenceScreen>
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:settings="http://schemas.android.com/apk/res-auto"
        android:title="@string/install_other_apps">

    <com.android.settingslib.RestrictedSwitchPreference
+29 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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:key="picture_in_picture_permission_detail_settings"
    android:title="@string/picture_in_picture_app_detail_title">

    <SwitchPreference
        android:key="app_ops_settings_switch"
        android:title="@string/picture_in_picture_app_detail_switch"/>

    <Preference
        android:summary="@string/picture_in_picture_app_detail_summary"
        android:selectable="false"/>

</PreferenceScreen>
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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:key="write_system_settings_permission_detail_settings"
    android:title="@string/write_settings">

    <SwitchPreference
        android:key="app_ops_settings_switch"
        android:title="@string/permit_write_settings"/>

    <Preference
        android:key="app_ops_settings_preference"
        android:title="@string/write_settings_preference"/>

    <Preference
        android:summary="@string/write_settings_description"
        android:selectable="false"/>

</PreferenceScreen>
Loading