diff options
author | Jeff Tinker <jtinker@google.com> | 2015-05-13 16:53:52 -0700 |
---|---|---|
committer | Jeff Tinker <jtinker@google.com> | 2015-05-15 01:44:59 +0000 |
commit | 5ffbae64920bf38e16c5831996f00c3d28ae1186 (patch) | |
tree | 78439cbc9b0f20d799b224ab9c50fdd475c7895c /media/jni | |
parent | 5fccffd573395bbd21c477f064de7c25100c3f8a (diff) | |
download | frameworks_base-5ffbae64920bf38e16c5831996f00c3d28ae1186.zip frameworks_base-5ffbae64920bf38e16c5831996f00c3d28ae1186.tar.gz frameworks_base-5ffbae64920bf38e16c5831996f00c3d28ae1186.tar.bz2 |
MediaDrm API Updates per api council review
bug: 21044671
Change-Id: Ifb34e7b8cb53f7bd5737c0869fc6c1f731ba1c9c
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaDrm.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/media/jni/android_media_MediaDrm.cpp b/media/jni/android_media_MediaDrm.cpp index f8146a7..d456dc1 100644 --- a/media/jni/android_media_MediaDrm.cpp +++ b/media/jni/android_media_MediaDrm.cpp @@ -99,7 +99,7 @@ struct EventTypes { struct EventWhat { jint kWhatDrmEvent; jint kWhatExpirationUpdate; - jint kWhatKeysChange; + jint kWhatKeyStatusChange; } gEventWhat; struct KeyTypes { @@ -221,7 +221,7 @@ void JNIDrmListener::notify(DrmPlugin::EventType eventType, int extra, jwhat = gEventWhat.kWhatExpirationUpdate; break; case DrmPlugin::kDrmPluginEventKeysChange: - jwhat = gEventWhat.kWhatKeysChange; + jwhat = gEventWhat.kWhatKeyStatusChange; break; default: ALOGE("Invalid event DrmPlugin::EventType %d, ignored", (int)eventType); @@ -609,8 +609,8 @@ static void android_media_MediaDrm_native_init(JNIEnv *env) { gEventWhat.kWhatDrmEvent = env->GetStaticIntField(clazz, field); GET_STATIC_FIELD_ID(field, clazz, "EXPIRATION_UPDATE", "I"); gEventWhat.kWhatExpirationUpdate = env->GetStaticIntField(clazz, field); - GET_STATIC_FIELD_ID(field, clazz, "KEYS_CHANGE", "I"); - gEventWhat.kWhatKeysChange = env->GetStaticIntField(clazz, field); + GET_STATIC_FIELD_ID(field, clazz, "KEY_STATUS_CHANGE", "I"); + gEventWhat.kWhatKeyStatusChange = env->GetStaticIntField(clazz, field); GET_STATIC_FIELD_ID(field, clazz, "KEY_TYPE_STREAMING", "I"); gKeyTypes.kKeyTypeStreaming = env->GetStaticIntField(clazz, field); @@ -619,13 +619,6 @@ static void android_media_MediaDrm_native_init(JNIEnv *env) { GET_STATIC_FIELD_ID(field, clazz, "KEY_TYPE_RELEASE", "I"); gKeyTypes.kKeyTypeRelease = env->GetStaticIntField(clazz, field); - GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_INITIAL", "I"); - gKeyRequestTypes.kKeyRequestTypeInitial = env->GetStaticIntField(clazz, field); - GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_RENEWAL", "I"); - gKeyRequestTypes.kKeyRequestTypeRenewal = env->GetStaticIntField(clazz, field); - GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_RELEASE", "I"); - gKeyRequestTypes.kKeyRequestTypeRelease = env->GetStaticIntField(clazz, field); - GET_STATIC_FIELD_ID(field, clazz, "CERTIFICATE_TYPE_NONE", "I"); gCertificateTypes.kCertificateTypeNone = env->GetStaticIntField(clazz, field); GET_STATIC_FIELD_ID(field, clazz, "CERTIFICATE_TYPE_X509", "I"); @@ -636,6 +629,13 @@ static void android_media_MediaDrm_native_init(JNIEnv *env) { GET_FIELD_ID(gFields.keyRequest.defaultUrl, clazz, "mDefaultUrl", "Ljava/lang/String;"); GET_FIELD_ID(gFields.keyRequest.requestType, clazz, "mRequestType", "I"); + GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_INITIAL", "I"); + gKeyRequestTypes.kKeyRequestTypeInitial = env->GetStaticIntField(clazz, field); + GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_RENEWAL", "I"); + gKeyRequestTypes.kKeyRequestTypeRenewal = env->GetStaticIntField(clazz, field); + GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_RELEASE", "I"); + gKeyRequestTypes.kKeyRequestTypeRelease = env->GetStaticIntField(clazz, field); + FIND_CLASS(clazz, "android/media/MediaDrm$ProvisionRequest"); GET_FIELD_ID(gFields.provisionRequest.data, clazz, "mData", "[B"); GET_FIELD_ID(gFields.provisionRequest.defaultUrl, clazz, "mDefaultUrl", "Ljava/lang/String;"); |