Native impl for ApOpManager.checkAudioOperation
Bug: 112339570
Test: enter DnD, play notifications, verify not heard
Change-Id: I645121cbf2c5d99a727f82b8fbf4226d104a5ae3
diff --git a/libs/binder/AppOpsManager.cpp b/libs/binder/AppOpsManager.cpp
index a494e22..525685c 100644
--- a/libs/binder/AppOpsManager.cpp
+++ b/libs/binder/AppOpsManager.cpp
@@ -93,6 +93,14 @@
: APP_OPS_MANAGER_UNAVAILABLE_MODE;
}
+int32_t AppOpsManager::checkAudioOpNoThrow(int32_t op, int32_t usage, int32_t uid,
+ const String16& callingPackage) {
+ sp<IAppOpsService> service = getService();
+ return service != nullptr
+ ? service->checkAudioOperation(op, usage, uid, callingPackage)
+ : APP_OPS_MANAGER_UNAVAILABLE_MODE;
+}
+
int32_t AppOpsManager::noteOp(int32_t op, int32_t uid, const String16& callingPackage) {
sp<IAppOpsService> service = getService();
return service != nullptr