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

Commit d8da51cc authored by Jason Monk's avatar Jason Monk
Browse files

New UX for app usage screen

Now uses ManageApplications base, and has a details screen which has
a switch and a link to optional app settings.

Bug: 20290386
Change-Id: If32ce8d82e55f3908644c575925b3f6506a68e6e
parent 6d610615
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1228,7 +1228,7 @@
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.UsageAccessSettings" />
                android:value="com.android.settings.applications.ManageApplications" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/security_settings" />
        </activity>
+12 −4
Original line number Diff line number Diff line
@@ -4497,10 +4497,6 @@

    <!-- Title of Usage Access preference item [CHAR LIMIT=30] -->
    <string name="usage_access_title">Apps with usage access</string>
    <!-- AlertDialog title for warning user when enabling usage access [CHAR LIMIT=30] -->
    <string name="allow_usage_access_title">Allow access?</string>
    <!-- AlertDialog message for warning user when enabling usage access [CHAR LIMIT=NONE] -->
    <string name="allow_usage_access_message">If you allow access, this app can view general information about the apps on your device, such as how often you use them.</string>

    <!-- Sound settings screen, setting check box label -->
    <string name="emergency_tone_title">Emergency tone</string>
@@ -6461,4 +6457,16 @@
    <!-- Title of app storage screen [CHAR LIMIT=30] -->
    <string name="apps_storage">Apps storage</string>

    <!-- Title of usage access screen [CHAR LIMIT=30] -->
    <string name="usage_access">Usage access</string>

    <!-- Label for setting which controls whether app has usage access [CHAR LIMIT=45] -->
    <string name="permit_usage_access">Permit usage access</string>

    <!-- Link to the apps page for app usage settings [CHAR LIMIT=45] -->
    <string name="app_usage_preference">App usage preferences</string>

    <!-- Description of the usage access setting [CHAR LIMIT=NONE] -->
    <string name="usage_access_description">Usage access allows an app to track what other apps you\'re using and how often, as well as your carrier, language settings, and other details.</string>

</resources>
+5 −1
Original line number Diff line number Diff line
@@ -117,7 +117,11 @@

        <Preference android:key="usage_access"
                    android:title="@string/usage_access_title"
                    android:fragment="com.android.settings.UsageAccessSettings"/>
                    android:fragment="com.android.settings.applications.ManageApplications">
            <extra
                android:name="classname"
                android:value="com.android.settings.Settings$UsageAccessSettingsActivity" />
        </Preference>

    </PreferenceCategory>

+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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/com.android.settings"
    android:title="@string/usage_access">

    <SwitchPreference
        android:key="usage_switch"
        android:title="@string/permit_usage_access" />

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

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

</PreferenceScreen>
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ public abstract class InstrumentedFragment extends PreferenceFragment {

    public static final int VIEW_CATEGORY_DEFAULT_APPS = VIEW_CATEGORY_UNDECLARED + 1;
    public static final int VIEW_CATEGORY_STORAGE_APPS = VIEW_CATEGORY_UNDECLARED + 2;
    public static final int VIEW_CATEGORY_USAGE_ACCESS_DETAIL = VIEW_CATEGORY_UNDECLARED + 3;

    /**
     * Declare the view of this category.
Loading