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

Commit 872f653b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Grant CAPTURE_AUDIO_OUTPUT permission for trusted process" into tm-dev...

Merge "Grant CAPTURE_AUDIO_OUTPUT permission for trusted process" into tm-dev am: d2a02887 am: 09786d47 am: 7544f10d am: fc9df56b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18629571



Change-Id: Id87408883f9598b4f5d559e5d11a06dc543a217e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 51029d16 fc9df56b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.pm.permission;

import static android.Manifest.permission.CAPTURE_AUDIO_HOTWORD;
import static android.Manifest.permission.CAPTURE_AUDIO_OUTPUT;
import static android.Manifest.permission.RECORD_AUDIO;
import static android.Manifest.permission.UPDATE_APP_OPS_STATS;
import static android.app.AppOpsManager.ATTRIBUTION_CHAIN_ID_NONE;
@@ -1367,8 +1368,8 @@ public class PermissionManagerService extends IPermissionManager.Stub {
            // the only use case for this, so simply override here.
            if (!permissionGranted
                    && Process.isIsolated(uid) // simple check which fails-fast for the common case
                    && (permission.equals(RECORD_AUDIO)
                    || permission.equals(CAPTURE_AUDIO_HOTWORD))) {
                    && (permission.equals(RECORD_AUDIO) || permission.equals(CAPTURE_AUDIO_HOTWORD)
                    || permission.equals(CAPTURE_AUDIO_OUTPUT))) {
                HotwordDetectionServiceProvider hotwordServiceProvider =
                        permissionManagerServiceInt.getHotwordDetectionServiceProvider();
                permissionGranted = hotwordServiceProvider != null
+2 −2
Original line number Diff line number Diff line
@@ -457,8 +457,8 @@ public interface PermissionManagerServiceInternal extends PermissionManagerInter

    /**
     * Provides the uid of the currently active
     * {@link android.service.voice.HotwordDetectionService}, which should be granted RECORD_AUDIO
     * and CAPTURE_AUDIO_HOTWORD permissions.
     * {@link android.service.voice.HotwordDetectionService}, which should be granted RECORD_AUDIO,
     * CAPTURE_AUDIO_HOTWORD and CAPTURE_AUDIO_OUTPUT permissions.
     */
    interface HotwordDetectionServiceProvider {
        int getUid();