Merge "drm: add EVENT_SESSION_RECLAIMED for resource manager."
This commit is contained in:
@@ -15101,6 +15101,7 @@ package android.media {
|
||||
field public static final int EVENT_KEY_EXPIRED = 3; // 0x3
|
||||
field public static final int EVENT_KEY_REQUIRED = 2; // 0x2
|
||||
field public static final int EVENT_PROVISION_REQUIRED = 1; // 0x1
|
||||
field public static final int EVENT_SESSION_RECLAIMED = 5; // 0x5
|
||||
field public static final int EVENT_VENDOR_DEFINED = 4; // 0x4
|
||||
field public static final int KEY_TYPE_OFFLINE = 2; // 0x2
|
||||
field public static final int KEY_TYPE_RELEASE = 3; // 0x3
|
||||
|
||||
@@ -16101,6 +16101,7 @@ package android.media {
|
||||
field public static final int EVENT_KEY_EXPIRED = 3; // 0x3
|
||||
field public static final int EVENT_KEY_REQUIRED = 2; // 0x2
|
||||
field public static final int EVENT_PROVISION_REQUIRED = 1; // 0x1
|
||||
field public static final int EVENT_SESSION_RECLAIMED = 5; // 0x5
|
||||
field public static final int EVENT_VENDOR_DEFINED = 4; // 0x4
|
||||
field public static final int KEY_TYPE_OFFLINE = 2; // 0x2
|
||||
field public static final int KEY_TYPE_RELEASE = 3; // 0x3
|
||||
|
||||
@@ -275,6 +275,12 @@ public final class MediaDrm {
|
||||
*/
|
||||
public static final int EVENT_VENDOR_DEFINED = 4;
|
||||
|
||||
/**
|
||||
* This event indicates that a session opened by the app has been reclaimed by the resource
|
||||
* manager.
|
||||
*/
|
||||
public static final int EVENT_SESSION_RECLAIMED = 5;
|
||||
|
||||
private static final int DRM_EVENT = 200;
|
||||
|
||||
private class EventHandler extends Handler
|
||||
|
||||
@@ -92,6 +92,7 @@ struct EventTypes {
|
||||
jint kEventKeyRequired;
|
||||
jint kEventKeyExpired;
|
||||
jint kEventVendorDefined;
|
||||
jint kEventSessionReclaimed;
|
||||
} gEventTypes;
|
||||
|
||||
struct KeyTypes {
|
||||
@@ -194,6 +195,9 @@ void JNIDrmListener::notify(DrmPlugin::EventType eventType, int extra,
|
||||
case DrmPlugin::kDrmPluginEventVendorDefined:
|
||||
jeventType = gEventTypes.kEventVendorDefined;
|
||||
break;
|
||||
case DrmPlugin::kDrmPluginEventSessionReclaimed:
|
||||
jeventType = gEventTypes.kEventSessionReclaimed;
|
||||
break;
|
||||
default:
|
||||
ALOGE("Invalid event DrmPlugin::EventType %d, ignored", (int)eventType);
|
||||
return;
|
||||
@@ -565,6 +569,8 @@ static void android_media_MediaDrm_native_init(JNIEnv *env) {
|
||||
gEventTypes.kEventKeyExpired = env->GetStaticIntField(clazz, field);
|
||||
GET_STATIC_FIELD_ID(field, clazz, "EVENT_VENDOR_DEFINED", "I");
|
||||
gEventTypes.kEventVendorDefined = env->GetStaticIntField(clazz, field);
|
||||
GET_STATIC_FIELD_ID(field, clazz, "EVENT_SESSION_RECLAIMED", "I");
|
||||
gEventTypes.kEventSessionReclaimed = env->GetStaticIntField(clazz, field);
|
||||
|
||||
GET_STATIC_FIELD_ID(field, clazz, "KEY_TYPE_STREAMING", "I");
|
||||
gKeyTypes.kKeyTypeStreaming = env->GetStaticIntField(clazz, field);
|
||||
|
||||
Reference in New Issue
Block a user