From 8dde7269a5356503d2b283234b6cb46d0c3f214e Mon Sep 17 00:00:00 2001 From: Wei Jia Date: Mon, 28 Sep 2015 11:32:23 -0700 Subject: OMX: allow only secure codec to remotely call allocateBuffer. Bug: 24310423 Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3 --- include/media/IOMX.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/media') diff --git a/include/media/IOMX.h b/include/media/IOMX.h index 3d29e4a..27ad694 100644 --- a/include/media/IOMX.h +++ b/include/media/IOMX.h @@ -249,6 +249,12 @@ public: virtual status_t onTransact( uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags = 0); + +protected: + // check if the codec is secure. + virtual bool isSecure(IOMX::node_id node) { + return false; + } }; class BnOMXObserver : public BnInterface { -- cgit v1.1 From 4802c0c507681634aee38518581a080bfa443ae2 Mon Sep 17 00:00:00 2001 From: Praveen Chavan Date: Tue, 29 Sep 2015 02:25:47 -0700 Subject: AudioSystem: Fix race condition in accessing ioDescriptors The vector mIoDescriptors can be simultaneouly modified and accessed by 2 threads. Acquire a lock while wrapping the ioDescriptor in a sp<> Bug: 24576810 Author: Haynes Mathew George Change-Id: I73c79ef8eca092b500a7ead3a5ebd0bcf75f9920 --- include/media/AudioSystem.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/media') diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 06116a5..26a0bb2 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -399,6 +399,7 @@ private: uint32_t mInSamplingRate; audio_format_t mInFormat; audio_channel_mask_t mInChannelMask; + sp getIoDescriptor_l(audio_io_handle_t ioHandle); }; class AudioPolicyServiceClient: public IBinder::DeathRecipient, -- cgit v1.1