diff options
author | 2019-08-13 12:24:25 -0700 | |
---|---|---|
committer | 2019-08-30 14:52:12 -0700 | |
commit | 8e95ee87a96bcacab17a4b49a8150fb42565ac8c (patch) | |
tree | 48a2b10aad3c1d41fdf847a45fe2fc128b164adb /libs/binder/IAppOpsService.cpp | |
parent | 217dd40021b4b6f346a588bbdb3bf9afd9790568 (diff) |
Camera: add camera audio restriction binder call
Also add the API to AppOpsManager
Test: new CTS tests
Bug: 135676184
Change-Id: I8bcdd34a4b6bb0fba5151677db38f8c35b7ae97e
Diffstat (limited to 'libs/binder/IAppOpsService.cpp')
-rw-r--r-- | libs/binder/IAppOpsService.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/binder/IAppOpsService.cpp b/libs/binder/IAppOpsService.cpp index 8840990824..b6360cbffd 100644 --- a/libs/binder/IAppOpsService.cpp +++ b/libs/binder/IAppOpsService.cpp @@ -138,6 +138,13 @@ public: return reply.readInt32(); } + virtual void setCameraAudioRestriction(int32_t mode) { + Parcel data, reply; + data.writeInterfaceToken(IAppOpsService::getInterfaceDescriptor()); + data.writeInt32(mode); + remote()->transact(SET_CAMERA_AUDIO_RESTRICTION_TRANSACTION, data, &reply); + } + #endif virtual void noteAsyncOp(const String16& callingPackageName, int32_t uid, const String16& packageName, int32_t opCode, const String16& message) { @@ -274,6 +281,13 @@ status_t BnAppOpsService::onTransact( reply->writeInt32(res); return NO_ERROR; } break; + case SET_CAMERA_AUDIO_RESTRICTION_TRANSACTION: { + CHECK_INTERFACE(IAppOpsService, data, reply); + const int32_t mode = data.readInt32(); + setCameraAudioRestriction(mode); + reply->writeNoException(); + return NO_ERROR; + } break; #endif // __ANDROID_VNDK__ case NOTE_ASYNC_OP_TRANSACTION: { CHECK_INTERFACE(IAppOpsService, data, reply); |