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

Commit f467c0ac authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Implement development UI for background check.

Allows you to toggle off full background access for
whatever apps you want.

Change-Id: I8542ecac1449ccd65dc18af3c0ca1fc18443f89c
parent 70b49b1b
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1161,6 +1161,18 @@
        </activity>
        -->

        <activity android:name="Settings$BackgroundCheckSummaryActivity"
                android:label="@string/background_check_title"
                android:taskAffinity=""
                android:enabled="false">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.applications.BackgroundCheckSummary" />
        </activity>

        <activity android:name="Settings$LocationSettingsActivity"
                android:label="@string/location_settings_title"
                android:icon="@drawable/ic_settings_location"
+9 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:paddingTop="8dip"
    android:paddingBottom="8dip"
    android:columnCount="3">
    android:columnCount="4">

    <ImageView
        android:id="@+id/app_icon"
@@ -47,6 +47,14 @@
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textAlignment="viewStart" />

    <Switch
        android:id="@+id/op_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_rowSpan="2"
        android:focusable="false"
        android:clickable="false" />

    <TextView
        android:id="@+id/op_name"
        android:layout_width="0dip"
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 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.
*/
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/appops_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
</LinearLayout>
+28 −0
Original line number Diff line number Diff line
@@ -620,11 +620,25 @@
        <item>monitor high power location</item>
        <item>get usage stats</item>
        <item>mute/unmute microphone</item>
        <item>show toast</item>
        <item>project media</item>
        <item>activate VPN</item>
        <item>write wallpaper</item>
        <item>assist structure</item>
        <item>assist screenshot</item>
        <item>read phone state</item>
        <item>add voicemail</item>
        <item>use sip</item>
        <item>process outgoing call</item>
        <item>fingerprint</item>
        <item>body sensors</item>
        <item>read cell broadcasts</item>
        <item>mock location</item>
        <item>read storage</item>
        <item>write storage</item>
        <item>turn on screen</item>
        <item>get accounts</item>
        <item>run in background</item>
    </string-array>

    <!-- User display names for app ops codes -->
@@ -674,11 +688,25 @@
        <item>Location</item>
        <item>Get usage stats</item>
        <item>Mute/unmute microphone</item>
        <item>Show toast</item>
        <item>Project media</item>
        <item>Activate VPN</item>
        <item>Write wallpaper</item>
        <item>Assist structure</item>
        <item>Assist screenshot</item>
        <item>Read phone state</item>
        <item>Add voicemail</item>
        <item>Use sip</item>
        <item>Process outgoing call</item>
        <item>Fingerprint</item>
        <item>Body sensors</item>
        <item>Read cell broadcasts</item>
        <item>Mock location</item>
        <item>Read storage</item>
        <item>Write storage</item>
        <item>Turn on screen</item>
        <item>Get accounts</item>
        <item>Run in background</item>
    </string-array>

    <!-- Titles for the list of long press timeout options. -->
+6 −0
Original line number Diff line number Diff line
@@ -6425,6 +6425,12 @@
         usb_use_file_transfer, use_use_photo_transfer, and usb_use_MIDI -->
    <string name="usb_use">Use USB for</string>

    <!-- Settings item title for background check prefs [CHAR LIMIT=35] -->
    <string name="background_check_pref">Background check</string>

    <!-- Settings screen title for background check prefs [CHAR LIMIT=35] -->
    <string name="background_check_title">Full background access</string>

    <!-- Title for the "context" preference to determine whether assist can access the data currently displayed on-screen [CHAR LIMIT=40] -->
    <string name="assist_access_context_title">Use text from screen</string>

Loading