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

Commit 232962c3 authored by Nate Myren's avatar Nate Myren
Browse files

Create PrivacyControls page in settings

Current strings are WIP, no entry point. Also updates a few remaining
EXTRA_PERMISSION lines to EXTRA_PERMISSION_GROUP

Test: build
Bug: 194816787
Change-Id: I347b3011e1f51bd11dca92471ba8ba77e2d758e5
parent 085aadb7
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -13151,6 +13151,11 @@
    <!-- Summary for the top level Privacy Settings [CHAR LIMIT=NONE]-->
    <string name="privacy_dashboard_summary">Permissions, account activity, personal data</string>
    <!-- Title for the privacy controls page [CHAR LIMIT=30]-->
    <string name="privacy_controls_title">Controls</string>
    <!-- Label for button in contextual card for users to remove the card [CHAR LIMIT=30] -->
    <string name="contextual_card_dismiss_remove">Remove</string>
    <!-- Label for button in contextual card for users to keep the card [CHAR LIMIT=30] -->
@@ -13690,8 +13695,10 @@
    <string name="camera_toggle_title">Camera access</string>
    <!-- Label for the camera use toggle [CHAR LIMIT=40] -->
    <string name="mic_toggle_title">Microphone access</string>
    <!-- Describes what is affected by the camera toggle [CHAR LIMIT=NONE] -->
    <string name="cam_toggle_description">For apps and services</string>
    <!-- Label for the location use toggle [CHAR LIMIT=40] -->
    <string name="location_toggle_title">Location access</string>
    <!-- Describes what is affected by a permission toggle [CHAR LIMIT=NONE] -->
    <string name="perm_toggle_description">For apps and services</string>
    <!-- Describes what is affected by the mic toggle [CHAR LIMIT=NONE] -->
    <string name="mic_toggle_description">For apps and services. If this setting is off, microphone data may still be shared when you call an emergency number.</string>
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
        android:title="@string/location_app_level_permissions"
        settings:controller="com.android.settings.location.AppLocationPermissionPreferenceController">
        <intent android:action="android.intent.action.MANAGE_PERMISSION_APPS">
            <extra android:name="android.intent.extra.PERMISSION_NAME"
            <extra android:name="android.intent.extra.PERMISSION_GROUP_NAME"
                   android:value="android.permission-group.LOCATION"/>
        </intent>
    </Preference>
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
        android:title="@string/location_app_level_permissions"
        settings:controller="com.android.settings.location.AppLocationPermissionPreferenceController">
        <intent android:action="android.intent.action.MANAGE_PERMISSION_APPS">
            <extra android:name="android.intent.extra.PERMISSION_NAME"
            <extra android:name="android.intent.extra.PERMISSION_GROUP_NAME"
                   android:value="android.permission-group.LOCATION"/>
        </intent>
    </Preference>
+50 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2022 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="privacy_controls_page"
    android:title="@string/privacy_controls_title">

    <!-- Camera toggle -->
    <com.android.settingslib.RestrictedSwitchPreference
        android:key="privacy_camera_toggle"
        android:title="@string/camera_toggle_title"
        android:summary="@string/perm_toggle_description"
        settings:controller="com.android.settings.privacy.CameraToggleController"/>

    <!-- Microphone toggle -->
    <com.android.settingslib.RestrictedSwitchPreference
        android:key="privacy_mic_toggle"
        android:title="@string/mic_toggle_title"
        android:summary="@string/mic_toggle_description"
        settings:controller="com.android.settings.privacy.MicToggleController"/>

    <!-- Location toggle -->
    <com.android.settingslib.RestrictedSwitchPreference
        android:key="privacy_location_toggle"
        android:title="@string/location_toggle_title"
        android:summary="@string/perm_toggle_description"/>

    <!-- Clipboard access notifications -->
    <SwitchPreference
        android:key="show_clip_access_notification"
        android:title="@string/show_clip_access_notification"
        android:summary="@string/show_clip_access_notification_summary"
        settings:controller="com.android.settings.privacy.ShowClipAccessNotificationPreferenceController"/>

</PreferenceScreen>
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@
    <com.android.settingslib.RestrictedSwitchPreference
        android:key="privacy_camera_toggle"
        android:title="@string/camera_toggle_title"
        android:summary="@string/cam_toggle_description"
        android:summary="@string/perm_toggle_description"
        settings:controller="com.android.settings.privacy.CameraToggleController"/>

    <!-- Microphone toggle -->
Loading