Loading apex/jobscheduler/framework/java/android/app/AlarmManager.java +5 −6 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.compat.annotation.Disabled; import android.compat.annotation.EnabledSince; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; Loading Loading @@ -282,15 +282,14 @@ public class AlarmManager { public static final long ENABLE_USE_EXACT_ALARM = 218533173L; /** * For apps targeting {@link Build.VERSION_CODES#TIRAMISU} or above, the permission * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} will be denied, unless the user explicitly * allows it from Settings. * The permission {@link Manifest.permission#SCHEDULE_EXACT_ALARM} will be denied, unless the * user explicitly allows it from Settings. * * TODO (b/226439802): change to EnabledSince(T) after SDK finalization. * TODO (b/226439802): Either enable it in the next SDK or replace it with a better alternative. * @hide */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.S_V2) @Disabled public static final long SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = 226439802L; @UnsupportedAppUsage Loading apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java +2 −65 Original line number Diff line number Diff line Loading @@ -565,9 +565,6 @@ public class AlarmManagerService extends SystemService { @VisibleForTesting static final String KEY_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED = "kill_on_schedule_exact_alarm_revoked"; @VisibleForTesting static final String KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = "schedule_exact_alarm_denied_by_default"; private static final long DEFAULT_MIN_FUTURITY = 5 * 1000; private static final long DEFAULT_MIN_INTERVAL = 60 * 1000; Loading Loading @@ -612,8 +609,6 @@ public class AlarmManagerService extends SystemService { private static final boolean DEFAULT_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED = true; private static final boolean DEFAULT_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = true; // Minimum futurity of a new alarm public long MIN_FUTURITY = DEFAULT_MIN_FUTURITY; Loading Loading @@ -701,14 +696,6 @@ public class AlarmManagerService extends SystemService { public boolean KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED = DEFAULT_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED; /** * When this is {@code true}, apps with the change * {@link AlarmManager#SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT} enabled will not get * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} unless the user grants it to them. */ public volatile boolean SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = DEFAULT_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT; public boolean USE_TARE_POLICY = Settings.Global.DEFAULT_ENABLE_TARE == 1; private long mLastAllowWhileIdleWhitelistDuration = -1; Loading Loading @@ -892,15 +879,6 @@ public class AlarmManagerService extends SystemService { KEY_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED, DEFAULT_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED); break; case KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT: final boolean oldValue = SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT; SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = properties.getBoolean( KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, DEFAULT_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT); handleScheduleExactAlarmDeniedByDefaultChange(oldValue, SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT); break; default: if (name.startsWith(KEY_PREFIX_STANDBY_QUOTA) && !standbyQuotaUpdated) { // The quotas need to be updated in order, so we can't just rely Loading Loading @@ -971,15 +949,6 @@ public class AlarmManagerService extends SystemService { } } private void handleScheduleExactAlarmDeniedByDefaultChange(boolean oldValue, boolean newValue) { if (oldValue == newValue) { return; } mHandler.obtainMessage(AlarmHandler.CHECK_EXACT_ALARM_PERMISSION_ON_FEATURE_TOGGLE, newValue).sendToTarget(); } private void migrateAlarmsToNewStoreLocked() { final AlarmStore newStore = LAZY_BATCHING ? new LazyAlarmStore() : new BatchingAlarmStore(); Loading Loading @@ -1156,9 +1125,6 @@ public class AlarmManagerService extends SystemService { pw.print(KEY_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED, KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED); pw.println(); pw.print(KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT); pw.println(); pw.print(Settings.Global.ENABLE_TARE, USE_TARE_POLICY); pw.println(); Loading Loading @@ -2928,10 +2894,8 @@ public class AlarmManagerService extends SystemService { } private boolean isScheduleExactAlarmDeniedByDefault(String packageName, int userId) { return mConstants.SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT && CompatChanges.isChangeEnabled( AlarmManager.SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, packageName, UserHandle.of(userId)); return CompatChanges.isChangeEnabled(AlarmManager.SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, packageName, UserHandle.of(userId)); } @NeverCompile // Avoid size overhead of debugging code. Loading Loading @@ -4707,7 +4671,6 @@ public class AlarmManagerService extends SystemService { public static final int REFRESH_EXACT_ALARM_CANDIDATES = 11; public static final int TARE_AFFORDABILITY_CHANGED = 12; public static final int CHECK_EXACT_ALARM_PERMISSION_ON_UPDATE = 13; public static final int CHECK_EXACT_ALARM_PERMISSION_ON_FEATURE_TOGGLE = 14; AlarmHandler() { super(Looper.myLooper()); Loading Loading @@ -4827,32 +4790,6 @@ public class AlarmManagerService extends SystemService { removeExactAlarmsOnPermissionRevoked(uid, packageName, /*killUid = */false); } break; case CHECK_EXACT_ALARM_PERMISSION_ON_FEATURE_TOGGLE: final boolean defaultDenied = (Boolean) msg.obj; final int[] startedUserIds = mActivityManagerInternal.getStartedUserIds(); for (int appId : mExactAlarmCandidates) { for (int userId : startedUserIds) { uid = UserHandle.getUid(userId, appId); final AndroidPackage packageForUid = mPackageManagerInternal.getPackage(uid); if (packageForUid == null) { continue; } final String pkg = packageForUid.getPackageName(); if (defaultDenied) { if (!hasScheduleExactAlarmInternal(pkg, uid) && !hasUseExactAlarmInternal(pkg, uid)) { removeExactAlarmsOnPermissionRevoked(uid, pkg, true); } } else if (hasScheduleExactAlarmInternal(pkg, uid)) { sendScheduleExactAlarmPermissionStateChangedBroadcast(pkg, UserHandle.getUserId(uid)); } } } break; default: // nope, just ignore it break; Loading core/api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -320,7 +320,6 @@ package android.app { method public void setDemoted(boolean); method public void setFgServiceShown(boolean); method public void setImportanceLockedByCriticalDeviceFunction(boolean); method public void setImportanceLockedByOEM(boolean); method public void setImportantConversation(boolean); method public void setOriginalImportance(int); } Loading core/java/android/app/ActivityManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -4617,8 +4617,8 @@ public class ActivityManager { try { getService().broadcastIntentWithFeature( null, null, intent, null, null, Activity.RESULT_OK, null, null, null /*requiredPermissions*/, null /*excludedPermissions*/, appOp, null, false, true, userId); null /*requiredPermissions*/, null /*excludedPermissions*/, null /*excludedPackages*/, appOp, null, false, true, userId); } catch (RemoteException ex) { } } Loading core/java/android/app/AppOpsManager.java +29 −4 Original line number Diff line number Diff line Loading @@ -1335,9 +1335,17 @@ public class AppOpsManager { public static final int OP_ACCESS_RESTRICTED_SETTINGS = AppProtoEnums.APP_OP_ACCESS_RESTRICTED_SETTINGS; /** * Receive microphone audio from an ambient sound detection event * * @hide */ public static final int OP_RECEIVE_AMBIENT_TRIGGER_AUDIO = AppProtoEnums.APP_OP_RECEIVE_AMBIENT_TRIGGER_AUDIO; /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public static final int _NUM_OP = 120; public static final int _NUM_OP = 121; /** Access to coarse location information. */ public static final String OPSTR_COARSE_LOCATION = "android:coarse_location"; Loading Loading @@ -1800,6 +1808,14 @@ public class AppOpsManager { public static final String OPSTR_ACCESS_RESTRICTED_SETTINGS = "android:access_restricted_settings"; /** * Receive microphone audio from an ambient sound detection event * * @hide */ public static final String OPSTR_RECEIVE_AMBIENT_TRIGGER_AUDIO = "android:receive_ambient_trigger_audio"; /** {@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} */ Loading Loading @@ -2021,6 +2037,7 @@ public class AppOpsManager { OP_ESTABLISH_VPN_SERVICE, // OP_ESTABLISH_VPN_SERVICE OP_ESTABLISH_VPN_MANAGER, // OP_ESTABLISH_VPN_MANAGER OP_ACCESS_RESTRICTED_SETTINGS, // OP_ACCESS_RESTRICTED_SETTINGS OP_RECEIVE_AMBIENT_TRIGGER_AUDIO, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2147,6 +2164,7 @@ public class AppOpsManager { OPSTR_ESTABLISH_VPN_SERVICE, OPSTR_ESTABLISH_VPN_MANAGER, OPSTR_ACCESS_RESTRICTED_SETTINGS, OPSTR_RECEIVE_AMBIENT_TRIGGER_AUDIO, }; /** Loading Loading @@ -2274,6 +2292,7 @@ public class AppOpsManager { "ESTABLISH_VPN_SERVICE", "ESTABLISH_VPN_MANAGER", "ACCESS_RESTRICTED_SETTINGS", "RECEIVE_SOUNDTRIGGER_AUDIO", }; /** Loading Loading @@ -2402,6 +2421,7 @@ public class AppOpsManager { null, // no permission for OP_ESTABLISH_VPN_SERVICE null, // no permission for OP_ESTABLISH_VPN_MANAGER null, // no permission for OP_ACCESS_RESTRICTED_SETTINGS, null, // no permission for OP_RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2529,7 +2549,8 @@ public class AppOpsManager { null, // NEARBY_WIFI_DEVICES null, // ESTABLISH_VPN_SERVICE null, // ESTABLISH_VPN_MANAGER null, // ACCESS_RESTRICTED_SETTINGS, null, // ACCESS_RESTRICTED_SETTINGS null, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2656,7 +2677,8 @@ public class AppOpsManager { null, // NEARBY_WIFI_DEVICES null, // ESTABLISH_VPN_SERVICE null, // ESTABLISH_VPN_MANAGER null, // ACCESS_RESTRICTED_SETTINGS, null, // ACCESS_RESTRICTED_SETTINGS null, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2765,7 +2787,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 AppOpsManager.MODE_ALLOWED, // RECORD_AUDIO_HOTWORD AppOpsManager.MODE_DEFAULT, // MANAGE_ONGOING_CALLS AppOpsManager.MODE_DEFAULT, // MANAGE_CREDENTIALS AppOpsManager.MODE_DEFAULT, // USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER Loading @@ -2783,6 +2805,7 @@ public class AppOpsManager { AppOpsManager.MODE_ALLOWED, // ESTABLISH_VPN_SERVICE AppOpsManager.MODE_ALLOWED, // ESTABLISH_VPN_MANAGER AppOpsManager.MODE_ALLOWED, // ACCESS_RESTRICTED_SETTINGS, AppOpsManager.MODE_ALLOWED, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2913,6 +2936,7 @@ public class AppOpsManager { false, // OP_ESTABLISH_VPN_SERVICE false, // OP_ESTABLISH_VPN_MANAGER true, // ACCESS_RESTRICTED_SETTINGS false, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -3040,6 +3064,7 @@ public class AppOpsManager { false, // OP_ESTABLISH_VPN_SERVICE false, // OP_ESTABLISH_VPN_MANAGER true, // ACCESS_RESTRICTED_SETTINGS false, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading
apex/jobscheduler/framework/java/android/app/AlarmManager.java +5 −6 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.compat.annotation.Disabled; import android.compat.annotation.EnabledSince; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; Loading Loading @@ -282,15 +282,14 @@ public class AlarmManager { public static final long ENABLE_USE_EXACT_ALARM = 218533173L; /** * For apps targeting {@link Build.VERSION_CODES#TIRAMISU} or above, the permission * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} will be denied, unless the user explicitly * allows it from Settings. * The permission {@link Manifest.permission#SCHEDULE_EXACT_ALARM} will be denied, unless the * user explicitly allows it from Settings. * * TODO (b/226439802): change to EnabledSince(T) after SDK finalization. * TODO (b/226439802): Either enable it in the next SDK or replace it with a better alternative. * @hide */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.S_V2) @Disabled public static final long SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = 226439802L; @UnsupportedAppUsage Loading
apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java +2 −65 Original line number Diff line number Diff line Loading @@ -565,9 +565,6 @@ public class AlarmManagerService extends SystemService { @VisibleForTesting static final String KEY_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED = "kill_on_schedule_exact_alarm_revoked"; @VisibleForTesting static final String KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = "schedule_exact_alarm_denied_by_default"; private static final long DEFAULT_MIN_FUTURITY = 5 * 1000; private static final long DEFAULT_MIN_INTERVAL = 60 * 1000; Loading Loading @@ -612,8 +609,6 @@ public class AlarmManagerService extends SystemService { private static final boolean DEFAULT_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED = true; private static final boolean DEFAULT_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = true; // Minimum futurity of a new alarm public long MIN_FUTURITY = DEFAULT_MIN_FUTURITY; Loading Loading @@ -701,14 +696,6 @@ public class AlarmManagerService extends SystemService { public boolean KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED = DEFAULT_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED; /** * When this is {@code true}, apps with the change * {@link AlarmManager#SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT} enabled will not get * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} unless the user grants it to them. */ public volatile boolean SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = DEFAULT_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT; public boolean USE_TARE_POLICY = Settings.Global.DEFAULT_ENABLE_TARE == 1; private long mLastAllowWhileIdleWhitelistDuration = -1; Loading Loading @@ -892,15 +879,6 @@ public class AlarmManagerService extends SystemService { KEY_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED, DEFAULT_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED); break; case KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT: final boolean oldValue = SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT; SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT = properties.getBoolean( KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, DEFAULT_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT); handleScheduleExactAlarmDeniedByDefaultChange(oldValue, SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT); break; default: if (name.startsWith(KEY_PREFIX_STANDBY_QUOTA) && !standbyQuotaUpdated) { // The quotas need to be updated in order, so we can't just rely Loading Loading @@ -971,15 +949,6 @@ public class AlarmManagerService extends SystemService { } } private void handleScheduleExactAlarmDeniedByDefaultChange(boolean oldValue, boolean newValue) { if (oldValue == newValue) { return; } mHandler.obtainMessage(AlarmHandler.CHECK_EXACT_ALARM_PERMISSION_ON_FEATURE_TOGGLE, newValue).sendToTarget(); } private void migrateAlarmsToNewStoreLocked() { final AlarmStore newStore = LAZY_BATCHING ? new LazyAlarmStore() : new BatchingAlarmStore(); Loading Loading @@ -1156,9 +1125,6 @@ public class AlarmManagerService extends SystemService { pw.print(KEY_KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED, KILL_ON_SCHEDULE_EXACT_ALARM_REVOKED); pw.println(); pw.print(KEY_SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT); pw.println(); pw.print(Settings.Global.ENABLE_TARE, USE_TARE_POLICY); pw.println(); Loading Loading @@ -2928,10 +2894,8 @@ public class AlarmManagerService extends SystemService { } private boolean isScheduleExactAlarmDeniedByDefault(String packageName, int userId) { return mConstants.SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT && CompatChanges.isChangeEnabled( AlarmManager.SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, packageName, UserHandle.of(userId)); return CompatChanges.isChangeEnabled(AlarmManager.SCHEDULE_EXACT_ALARM_DENIED_BY_DEFAULT, packageName, UserHandle.of(userId)); } @NeverCompile // Avoid size overhead of debugging code. Loading Loading @@ -4707,7 +4671,6 @@ public class AlarmManagerService extends SystemService { public static final int REFRESH_EXACT_ALARM_CANDIDATES = 11; public static final int TARE_AFFORDABILITY_CHANGED = 12; public static final int CHECK_EXACT_ALARM_PERMISSION_ON_UPDATE = 13; public static final int CHECK_EXACT_ALARM_PERMISSION_ON_FEATURE_TOGGLE = 14; AlarmHandler() { super(Looper.myLooper()); Loading Loading @@ -4827,32 +4790,6 @@ public class AlarmManagerService extends SystemService { removeExactAlarmsOnPermissionRevoked(uid, packageName, /*killUid = */false); } break; case CHECK_EXACT_ALARM_PERMISSION_ON_FEATURE_TOGGLE: final boolean defaultDenied = (Boolean) msg.obj; final int[] startedUserIds = mActivityManagerInternal.getStartedUserIds(); for (int appId : mExactAlarmCandidates) { for (int userId : startedUserIds) { uid = UserHandle.getUid(userId, appId); final AndroidPackage packageForUid = mPackageManagerInternal.getPackage(uid); if (packageForUid == null) { continue; } final String pkg = packageForUid.getPackageName(); if (defaultDenied) { if (!hasScheduleExactAlarmInternal(pkg, uid) && !hasUseExactAlarmInternal(pkg, uid)) { removeExactAlarmsOnPermissionRevoked(uid, pkg, true); } } else if (hasScheduleExactAlarmInternal(pkg, uid)) { sendScheduleExactAlarmPermissionStateChangedBroadcast(pkg, UserHandle.getUserId(uid)); } } } break; default: // nope, just ignore it break; Loading
core/api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -320,7 +320,6 @@ package android.app { method public void setDemoted(boolean); method public void setFgServiceShown(boolean); method public void setImportanceLockedByCriticalDeviceFunction(boolean); method public void setImportanceLockedByOEM(boolean); method public void setImportantConversation(boolean); method public void setOriginalImportance(int); } Loading
core/java/android/app/ActivityManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -4617,8 +4617,8 @@ public class ActivityManager { try { getService().broadcastIntentWithFeature( null, null, intent, null, null, Activity.RESULT_OK, null, null, null /*requiredPermissions*/, null /*excludedPermissions*/, appOp, null, false, true, userId); null /*requiredPermissions*/, null /*excludedPermissions*/, null /*excludedPackages*/, appOp, null, false, true, userId); } catch (RemoteException ex) { } } Loading
core/java/android/app/AppOpsManager.java +29 −4 Original line number Diff line number Diff line Loading @@ -1335,9 +1335,17 @@ public class AppOpsManager { public static final int OP_ACCESS_RESTRICTED_SETTINGS = AppProtoEnums.APP_OP_ACCESS_RESTRICTED_SETTINGS; /** * Receive microphone audio from an ambient sound detection event * * @hide */ public static final int OP_RECEIVE_AMBIENT_TRIGGER_AUDIO = AppProtoEnums.APP_OP_RECEIVE_AMBIENT_TRIGGER_AUDIO; /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public static final int _NUM_OP = 120; public static final int _NUM_OP = 121; /** Access to coarse location information. */ public static final String OPSTR_COARSE_LOCATION = "android:coarse_location"; Loading Loading @@ -1800,6 +1808,14 @@ public class AppOpsManager { public static final String OPSTR_ACCESS_RESTRICTED_SETTINGS = "android:access_restricted_settings"; /** * Receive microphone audio from an ambient sound detection event * * @hide */ public static final String OPSTR_RECEIVE_AMBIENT_TRIGGER_AUDIO = "android:receive_ambient_trigger_audio"; /** {@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} */ Loading Loading @@ -2021,6 +2037,7 @@ public class AppOpsManager { OP_ESTABLISH_VPN_SERVICE, // OP_ESTABLISH_VPN_SERVICE OP_ESTABLISH_VPN_MANAGER, // OP_ESTABLISH_VPN_MANAGER OP_ACCESS_RESTRICTED_SETTINGS, // OP_ACCESS_RESTRICTED_SETTINGS OP_RECEIVE_AMBIENT_TRIGGER_AUDIO, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2147,6 +2164,7 @@ public class AppOpsManager { OPSTR_ESTABLISH_VPN_SERVICE, OPSTR_ESTABLISH_VPN_MANAGER, OPSTR_ACCESS_RESTRICTED_SETTINGS, OPSTR_RECEIVE_AMBIENT_TRIGGER_AUDIO, }; /** Loading Loading @@ -2274,6 +2292,7 @@ public class AppOpsManager { "ESTABLISH_VPN_SERVICE", "ESTABLISH_VPN_MANAGER", "ACCESS_RESTRICTED_SETTINGS", "RECEIVE_SOUNDTRIGGER_AUDIO", }; /** Loading Loading @@ -2402,6 +2421,7 @@ public class AppOpsManager { null, // no permission for OP_ESTABLISH_VPN_SERVICE null, // no permission for OP_ESTABLISH_VPN_MANAGER null, // no permission for OP_ACCESS_RESTRICTED_SETTINGS, null, // no permission for OP_RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2529,7 +2549,8 @@ public class AppOpsManager { null, // NEARBY_WIFI_DEVICES null, // ESTABLISH_VPN_SERVICE null, // ESTABLISH_VPN_MANAGER null, // ACCESS_RESTRICTED_SETTINGS, null, // ACCESS_RESTRICTED_SETTINGS null, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2656,7 +2677,8 @@ public class AppOpsManager { null, // NEARBY_WIFI_DEVICES null, // ESTABLISH_VPN_SERVICE null, // ESTABLISH_VPN_MANAGER null, // ACCESS_RESTRICTED_SETTINGS, null, // ACCESS_RESTRICTED_SETTINGS null, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2765,7 +2787,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 AppOpsManager.MODE_ALLOWED, // RECORD_AUDIO_HOTWORD AppOpsManager.MODE_DEFAULT, // MANAGE_ONGOING_CALLS AppOpsManager.MODE_DEFAULT, // MANAGE_CREDENTIALS AppOpsManager.MODE_DEFAULT, // USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER Loading @@ -2783,6 +2805,7 @@ public class AppOpsManager { AppOpsManager.MODE_ALLOWED, // ESTABLISH_VPN_SERVICE AppOpsManager.MODE_ALLOWED, // ESTABLISH_VPN_MANAGER AppOpsManager.MODE_ALLOWED, // ACCESS_RESTRICTED_SETTINGS, AppOpsManager.MODE_ALLOWED, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -2913,6 +2936,7 @@ public class AppOpsManager { false, // OP_ESTABLISH_VPN_SERVICE false, // OP_ESTABLISH_VPN_MANAGER true, // ACCESS_RESTRICTED_SETTINGS false, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading Loading @@ -3040,6 +3064,7 @@ public class AppOpsManager { false, // OP_ESTABLISH_VPN_SERVICE false, // OP_ESTABLISH_VPN_MANAGER true, // ACCESS_RESTRICTED_SETTINGS false, // RECEIVE_SOUNDTRIGGER_AUDIO }; /** Loading