summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/system-current.txt1
-rw-r--r--core/java/android/app/AppOpsManager.java29
-rw-r--r--core/res/AndroidManifest.xml12
3 files changed, 28 insertions, 14 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 7dcc7b2cab13..a1da9e02f23d 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -299,6 +299,7 @@ package android {
field public static final String RECEIVE_DATA_ACTIVITY_CHANGE = "android.permission.RECEIVE_DATA_ACTIVITY_CHANGE";
field public static final String RECEIVE_DEVICE_CUSTOMIZATION_READY = "android.permission.RECEIVE_DEVICE_CUSTOMIZATION_READY";
field public static final String RECEIVE_EMERGENCY_BROADCAST = "android.permission.RECEIVE_EMERGENCY_BROADCAST";
+ field @FlaggedApi("android.permission.flags.voice_activation_permission_apis") public static final String RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA = "android.permission.RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA";
field @FlaggedApi("android.permission.flags.voice_activation_permission_apis") public static final String RECEIVE_SANDBOX_TRIGGER_AUDIO = "android.permission.RECEIVE_SANDBOX_TRIGGER_AUDIO";
field public static final String RECEIVE_WIFI_CREDENTIAL_CHANGE = "android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE";
field public static final String RECORD_BACKGROUND_AUDIO = "android.permission.RECORD_BACKGROUND_AUDIO";
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 17637df90b99..ecbc9b1d52c2 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -1487,13 +1487,13 @@ public class AppOpsManager {
AppProtoEnums.APP_OP_RECEIVE_SANDBOX_TRIGGER_AUDIO;
/**
- * Allows the assistant app to get the training data from the trusted process to improve the
- * hotword training model.
+ * Allows the privileged assistant app to receive the training data from the sandboxed hotword
+ * detection service.
*
* @hide
*/
- public static final int OP_RECEIVE_TRUSTED_PROCESS_TRAINING_DATA =
- AppProtoEnums.APP_OP_RECEIVE_TRUSTED_PROCESS_TRAINING_DATA;
+ public static final int OP_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA =
+ AppProtoEnums.APP_OP_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA;
/** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@@ -1641,7 +1641,7 @@ public class AppOpsManager {
OPSTR_CAMERA_SANDBOXED,
OPSTR_RECORD_AUDIO_SANDBOXED,
OPSTR_RECEIVE_SANDBOX_TRIGGER_AUDIO,
- OPSTR_RECEIVE_TRUSTED_PROCESS_TRAINING_DATA
+ OPSTR_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA
})
public @interface AppOpString {}
@@ -2262,13 +2262,13 @@ public class AppOpsManager {
"android:receive_sandbox_trigger_audio";
/**
- * Allows the assistant app to get the training data from the trusted process to improve
- * the hotword training model.
+ * Allows the privileged assistant app to receive training data from the sandboxed hotword
+ * detection service.
*
* @hide
*/
- public static final String OPSTR_RECEIVE_TRUSTED_PROCESS_TRAINING_DATA =
- "android:receive_trusted_process_training_data";
+ public static final String OPSTR_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA =
+ "android:RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA";
/** {@link #sAppOpsToNote} not initialized yet for this op */
private static final byte SHOULD_COLLECT_NOTE_OP_NOT_INITIALIZED = 0;
@@ -2381,7 +2381,8 @@ public class AppOpsManager {
OP_FOREGROUND_SERVICE_SPECIAL_USE,
OP_CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD,
OP_USE_FULL_SCREEN_INTENT,
- OP_RECEIVE_SANDBOX_TRIGGER_AUDIO
+ OP_RECEIVE_SANDBOX_TRIGGER_AUDIO,
+ OP_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA
};
static final AppOpInfo[] sAppOpInfos = new AppOpInfo[]{
@@ -2814,9 +2815,11 @@ public class AppOpsManager {
"RECEIVE_SANDBOX_TRIGGER_AUDIO")
.setPermission(Manifest.permission.RECEIVE_SANDBOX_TRIGGER_AUDIO)
.setDefaultMode(AppOpsManager.MODE_DEFAULT).build(),
- new AppOpInfo.Builder(OP_RECEIVE_TRUSTED_PROCESS_TRAINING_DATA,
- OPSTR_RECEIVE_TRUSTED_PROCESS_TRAINING_DATA,
- "RECEIVE_TRUSTED_PROCESS_TRAINING_DATA").build()
+ new AppOpInfo.Builder(OP_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA,
+ OPSTR_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA,
+ "RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA")
+ .setPermission(Manifest.permission.RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA)
+ .setDefaultMode(AppOpsManager.MODE_DEFAULT).build()
};
// The number of longs needed to form a full bitmask of app ops
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index ca768ad434f1..a54a563b1804 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -7235,13 +7235,23 @@
<!-- @SystemApi Required for the privileged assistant apps targeting
{@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM}
- that receive voice trigger from the trusted hotword detection service.
+ that receive voice trigger from a trusted hotword detection service.
<p>Protection level: signature|privileged|appop
@FlaggedApi("android.permission.flags.voice_activation_permission_apis")
@hide -->
<permission android:name="android.permission.RECEIVE_SANDBOX_TRIGGER_AUDIO"
android:protectionLevel="signature|privileged|appop" />
+ <!-- @SystemApi Required for the privileged assistant apps targeting
+ {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM}
+ that receive training data from the sandboxed hotword detection service or visual
+ query detection service.
+ <p>Protection level: internal|appop
+ @FlaggedApi("android.permission.flags.voice_activation_permission_apis")
+ @hide -->
+ <permission android:name="android.permission.RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA"
+ android:protectionLevel="internal|appop" />
+
<!-- @SystemApi Allows requesting the framework broadcast the
{@link Intent#ACTION_DEVICE_CUSTOMIZATION_READY} intent.
@hide -->