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

Commit 132e9274 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by Android (Google) Code Review
Browse files

Merge changes from topic "userSensitive"

* changes:
  Control assistant's record audio user sensitivity
  Allow to manually mark uids as user sensitive
parents ff8739b1 2e0df8ea
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -104,6 +104,13 @@
            </intent-filter>
        </activity>

        <activity android:name="com.android.packageinstaller.permission.ui.AdjustUserSensitiveActivity"
                  android:configChanges="orientation|keyboardHidden|screenSize"
                  android:label="@string/adjust_user_sensitive_title"
                  android:theme="@style/Settings"
                  android:exported="false"
                  android:permission="android.permission.GRANT_RUNTIME_PERMISSIONS" />

        <activity android:name="com.android.packageinstaller.permission.ui.ManagePermissionsActivityTrampoline"
                  android:excludeFromRecents="true"
                  android:noHistory="true"
+21 −0
Original line number Diff line number Diff line
@@ -799,4 +799,25 @@ Allow <xliff:g id="app_name" example="Gmail">%4$s</xliff:g> to upload a bug repo

    <!-- Dismiss with acknowledgment [CHAR LIMIT=30] -->
    <string name="dismiss_with_acknowledgment">Got it</string>

    <!-- Label for screen allowing the user to force certain apps to always be shown in permission controller settings ui instead of being hidden behind "system app" menu. [CHAR LIMIT=60] -->
    <string name="adjust_user_sensitive_title">Advanced settings</string>

    <!-- Label for link to the screen allowing the user to force certain apps to always be shown in permission controller settings ui instead of being hidden behind "system app" menu. [CHAR LIMIT=30] -->
    <string name="menu_adjust_user_sensitive">Advanced settings</string>

    <!-- Title for global switch that enables/disables the ability for the user to force certain apps to always be shown in permission controller settings ui instead of being hidden behind "system app" menu. [CHAR LIMIT=60] -->
    <string name="adjust_user_sensitive_globally_title">Show system app usage</string>

    <!-- Subtitle for global switch that enables/disables the ability for the user to force certain apps to always be shown in permission controller settings ui instead of being hidden behind "system app" menu. [CHAR LIMIT=none] -->
    <string name="adjust_user_sensitive_globally_summary">Show system app use of permissions in status bar, dashboard \u0026 elsewhere</string>

    <!-- Header above the per app switches that enables/disables the ability for the user to force the app to always be shown in permission controller settings ui instead of being hidden behind "system app" menu. [CHAR LIMIT=60] -->
    <string name="adjust_user_sensitive_per_app_header">Highlight usage for the following</string>

    <!-- Title for switch that enables/disables the microphone status bar icon for the currently selected assistant. [CHAR LIMIT=60] -->
    <string name="assistant_record_audio_user_sensitive_title">Show Assistant trigger detection</string>

    <!-- Subtitle for switch that enables/disables the microphone status bar icon for the currently selected assistant. [CHAR LIMIT=none] -->
    <string name="assistant_record_audio_user_sensitive_summary">Show icon in status bar when microphone is used to activate voice assistant</string>
</resources>
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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">

    <SwitchPreference
        android:key="assistantrecordaudio"
        android:title="@string/assistant_record_audio_user_sensitive_title"
        android:summary="@string/assistant_record_audio_user_sensitive_summary"/>

    <SwitchPreference
        android:key="global"
        android:title="@string/adjust_user_sensitive_globally_title"
        android:summary="@string/adjust_user_sensitive_globally_summary"/>

    <PreferenceCategory
        android:key="perapp"
        android:title="@string/adjust_user_sensitive_per_app_header" />

</PreferenceScreen>
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.packageinstaller.role.ui;
package com.android.packageinstaller;

import android.os.AsyncTask;

+21 −0
Original line number Diff line number Diff line
@@ -92,6 +92,27 @@ public class Constants {
    public static final String SEARCH_INDEXABLE_PROVIDER_PASSWORD_KEY =
            "search_indexable_provider_password";

    /**
     * Key in the generic shared preferences that stores the name of the packages that are currently
     * have an overridden user sensitivity.
     */
    public static final String FORCED_USER_SENSITIVE_UIDS_KEY = "forced_user_sensitive_uids_key";

    /**
     * Key in the generic shared preferences that stores if all packages should be considered user
     * sensitive
     */
    public static final String ALLOW_OVERRIDE_USER_SENSITIVE_KEY =
            "allow_override_user_sensitive_key";

    /**
     * Key in the generic shared preferences that controls if the
     * {@link android.Manifest.permission#RECORD_AUDIO} of the currently registered assistant is
     * user sensitive.
     */
    public static final String ASSISTANT_RECORD_AUDIO_IS_USER_SENSITIVE_KEY =
            "assistant_record_audio_is_user_sensitive_key";

    /**
     * Name of file containing the permissions that should be restored, but have not been restored
     * yet.
Loading