diff options
| author | Edwin Wong <edwinwong@google.com> | 2017-01-06 19:07:54 -0800 |
|---|---|---|
| committer | Edwin Wong <edwinwong@google.com> | 2017-01-30 15:26:51 -0800 |
| commit | 68b3d9f49e68a11af5225175dc9e60ce88819e84 (patch) | |
| tree | 750d8fe493c2ec45542968192ecfe52d83133a02 /drm/libmediadrm/IDrm.cpp | |
| parent | 9b088162cb9cdeb542f106a45d06a1f802e91e6e (diff) | |
| download | frameworks_av-68b3d9f49e68a11af5225175dc9e60ce88819e84.tar.gz frameworks_av-68b3d9f49e68a11af5225175dc9e60ce88819e84.tar.bz2 frameworks_av-68b3d9f49e68a11af5225175dc9e60ce88819e84.zip | |
Pass application packagename to drm plugin.
Pass application package name to createPlugin and createDrmPlugin.
The application packagename will be used as part of a unique
identifier for drm plugin.
Test: Play Movies.
Test: ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts -m
GtsMediaTestCases --test
com.google.android.media.gts.WidevineH264PlaybackTests#testL1With480P60
Verify the application's packagename is reachable in the drm plugin's
debug log.
bug: 27101531
Change-Id: I84fb09b591a7af63f6e20004e910112a4ce6ebac
Diffstat (limited to 'drm/libmediadrm/IDrm.cpp')
| -rw-r--r-- | drm/libmediadrm/IDrm.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drm/libmediadrm/IDrm.cpp b/drm/libmediadrm/IDrm.cpp index c4558c67f5..4e47112057 100644 --- a/drm/libmediadrm/IDrm.cpp +++ b/drm/libmediadrm/IDrm.cpp @@ -88,13 +88,15 @@ struct BpDrm : public BpInterface<IDrm> { return reply.readInt32() != 0; } - virtual status_t createPlugin(const uint8_t uuid[16]) { + virtual status_t createPlugin(const uint8_t uuid[16], + const String8& appPackageName) { Parcel data, reply; data.writeInterfaceToken(IDrm::getInterfaceDescriptor()); data.write(uuid, 16); - + data.writeString8(appPackageName); status_t status = remote()->transact(CREATE_PLUGIN, data, &reply); if (status != OK) { + ALOGE("createPlugin: binder call failed: %d", status); return status; } @@ -585,7 +587,6 @@ status_t BnDrm::onTransact( data.read(uuid, sizeof(uuid)); String8 mimeType = data.readString8(); reply->writeInt32(isCryptoSchemeSupported(uuid, mimeType)); - return OK; } @@ -594,7 +595,8 @@ status_t BnDrm::onTransact( CHECK_INTERFACE(IDrm, data, reply); uint8_t uuid[16]; data.read(uuid, sizeof(uuid)); - reply->writeInt32(createPlugin(uuid)); + String8 appPackageName = data.readString8(); + reply->writeInt32(createPlugin(uuid, appPackageName)); return OK; } |
