Allow MediaCodecs to be created on behalf of other client processes.
Use case is for TV Input Service which creates MediaCodecs when tuning
to TV channels on behalf of operator and OEM apps. Requires the
MEDIA_RESOURCE_PID_OVERRIDE permission.
Bug: 217746837
Test: atest MediaCodecResourceTest
Change-Id: I191ff13c5730970664a818a9333c160e6e773c7d
diff --git a/media/jni/android_media_MediaCodec.h b/media/jni/android_media_MediaCodec.h
index ee456c9..616c31b 100644
--- a/media/jni/android_media_MediaCodec.h
+++ b/media/jni/android_media_MediaCodec.h
@@ -55,7 +55,7 @@
struct JMediaCodec : public AHandler {
JMediaCodec(
JNIEnv *env, jobject thiz,
- const char *name, bool nameIsType, bool encoder);
+ const char *name, bool nameIsType, bool encoder, int pid, int uid);
status_t initCheck() const;