Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67b39bfa authored by Jeff Tinker's avatar Jeff Tinker Committed by Android (Google) Code Review
Browse files

Merge "Remove unused MediaDrm.unprovisionDevice"

parents 3f743711 dade24c1
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -21415,7 +21415,6 @@ package android.media {
    method public void setOnKeyStatusChangeListener(android.media.MediaDrm.OnKeyStatusChangeListener, android.os.Handler);
    method public void setPropertyByteArray(java.lang.String, byte[]);
    method public void setPropertyString(java.lang.String, java.lang.String);
    method public void unprovisionDevice();
    field public static final int EVENT_KEY_EXPIRED = 3; // 0x3
    field public static final int EVENT_KEY_REQUIRED = 2; // 0x2
    field public static final deprecated int EVENT_PROVISION_REQUIRED = 1; // 0x1
+0 −12
Original line number Diff line number Diff line
@@ -905,18 +905,6 @@ public final class MediaDrm {
    private native Certificate provideProvisionResponseNative(@NonNull byte[] response)
            throws DeniedByServerException;

    /**
     * Remove provisioning from a device.  Only system apps may unprovision a
     * device.  Note that removing provisioning will invalidate any keys saved
     * for offline use (KEY_TYPE_OFFLINE), which may render downloaded content
     * unplayable until new licenses are acquired.  Since provisioning is global
     * to the device, license invalidation will apply to all content downloaded
     * by any app, so appropriate warnings should be given to the user.
     * @hide
     */
    @SystemApi
    public native void unprovisionDevice();

    /**
     * A means of enforcing limits on the number of concurrent streams per subscriber
     * across devices is provided via SecureStop. This is achieved by securely
+0 −19
Original line number Diff line number Diff line
@@ -1048,22 +1048,6 @@ static jobject android_media_MediaDrm_provideProvisionResponseNative(
    return certificateObj;
}

static void android_media_MediaDrm_unprovisionDeviceNative(
    JNIEnv *env, jobject thiz) {
    sp<IDrm> drm = GetDrm(env, thiz);

    if (drm == NULL) {
        jniThrowException(env, "java/lang/IllegalStateException",
                          "MediaDrm obj is null");
        return;
    }

    status_t err = drm->unprovisionDevice();

    throwExceptionAsNecessary(env, err, "Failed to handle provision response");
    return;
}

static jobject android_media_MediaDrm_getSecureStops(
    JNIEnv *env, jobject thiz) {
    sp<IDrm> drm = GetDrm(env, thiz);
@@ -1496,9 +1480,6 @@ static const JNINativeMethod gMethods[] = {
    { "provideProvisionResponseNative", "([B)Landroid/media/MediaDrm$Certificate;",
      (void *)android_media_MediaDrm_provideProvisionResponseNative },

    { "unprovisionDevice", "()V",
      (void *)android_media_MediaDrm_unprovisionDeviceNative },

    { "getSecureStops", "()Ljava/util/List;",
      (void *)android_media_MediaDrm_getSecureStops },