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

Commit 96990125 authored by Narayan Kamath's avatar Narayan Kamath Committed by Automerger Merge Worker
Browse files

Merge "AppOpsManager: Add OP_RECORD_AUDIO_HOTWORD" into rvc-qpr-dev am: 046d6480 am: 69876904

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

Change-Id: I7fad503f467fd88f778ad4449b7ec2a1b722ec69
parents 7d87555e 69876904
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
@@ -1160,9 +1160,17 @@ public class AppOpsManager {
    // TODO: Add as AppProtoEnums
    public static final int OP_PHONE_CALL_CAMERA = 101;

    /**
     * Audio is being recorded for hotword detection.
     *
     * @hide
     */
    // TODO: Add as AppProtoEnums
    public static final int OP_RECORD_AUDIO_HOTWORD = 102;

    /** @hide */
    @UnsupportedAppUsage
    public static final int _NUM_OP = 102;
    public static final int _NUM_OP = 103;

    /** Access to coarse location information. */
    public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -1497,6 +1505,13 @@ public class AppOpsManager {
     */
    public static final String OPSTR_PHONE_CALL_CAMERA = "android:phone_call_camera";

    /**
     * Audio is being recorded for hotword detection.
     *
     * @hide
     */
    public static final String OPSTR_RECORD_AUDIO_HOTWORD = "android:record_audio_hotword";

    /** {@link #sAppOpsToNote} not initialized yet for this op */
    private static final byte SHOULD_COLLECT_NOTE_OP_NOT_INITIALIZED = 0;
    /** Should not collect noting of this app-op in {@link #sAppOpsToNote} */
@@ -1688,6 +1703,7 @@ public class AppOpsManager {
            OP_NO_ISOLATED_STORAGE,             // NO_ISOLATED_STORAGE
            OP_PHONE_CALL_MICROPHONE,           // OP_PHONE_CALL_MICROPHONE
            OP_PHONE_CALL_CAMERA,               // OP_PHONE_CALL_CAMERA
            OP_RECORD_AUDIO_HOTWORD,            // RECORD_AUDIO_HOTWORD
    };

    /**
@@ -1796,6 +1812,7 @@ public class AppOpsManager {
            OPSTR_NO_ISOLATED_STORAGE,
            OPSTR_PHONE_CALL_MICROPHONE,
            OPSTR_PHONE_CALL_CAMERA,
            OPSTR_RECORD_AUDIO_HOTWORD,
    };

    /**
@@ -1905,6 +1922,7 @@ public class AppOpsManager {
            "NO_ISOLATED_STORAGE",
            "PHONE_CALL_MICROPHONE",
            "PHONE_CALL_CAMERA",
            "RECORD_AUDIO_HOTWORD",
    };

    /**
@@ -2015,6 +2033,7 @@ public class AppOpsManager {
            null, // no permission for OP_NO_ISOLATED_STORAGE
            null, // no permission for OP_PHONE_CALL_MICROPHONE
            null, // no permission for OP_PHONE_CALL_CAMERA
            null, // no permission for OP_RECORD_AUDIO_HOTWORD
    };

    /**
@@ -2125,6 +2144,7 @@ public class AppOpsManager {
            null, // NO_ISOLATED_STORAGE
            null, // PHONE_CALL_MICROPHONE
            null, // PHONE_CALL_MICROPHONE
            null, // RECORD_AUDIO_HOTWORD
    };

    /**
@@ -2234,6 +2254,7 @@ public class AppOpsManager {
            null, // NO_ISOLATED_STORAGE
            null, // PHONE_CALL_MICROPHONE
            null, // PHONE_CALL_CAMERA
            null, // RECORD_AUDIO_HOTWORD
    };

    /**
@@ -2342,6 +2363,7 @@ public class AppOpsManager {
            AppOpsManager.MODE_ERRORED, // OP_NO_ISOLATED_STORAGE
            AppOpsManager.MODE_ALLOWED, // PHONE_CALL_MICROPHONE
            AppOpsManager.MODE_ALLOWED, // PHONE_CALL_CAMERA
            AppOpsManager.MODE_ALLOWED, // OP_RECORD_AUDIO_HOTWORD
    };

    /**
@@ -2454,6 +2476,7 @@ public class AppOpsManager {
            true, // NO_ISOLATED_STORAGE
            false, // PHONE_CALL_MICROPHONE
            false, // PHONE_CALL_CAMERA
            false, // RECORD_AUDIO_HOTWORD
    };

    /**