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

Commit 06768210 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "More robust DRM support, including tests."

parents ef620d21 530deca4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13453,6 +13453,7 @@ package android.drm {
    method public android.drm.DrmConvertedStatus closeConvertSession(int);
    method public android.drm.DrmConvertedStatus convertData(int, byte[]);
    method public String[] getAvailableDrmEngines();
    method @NonNull public java.util.Collection<android.drm.DrmSupportInfo> getAvailableDrmSupportInfo();
    method public android.content.ContentValues getConstraints(String, int);
    method public android.content.ContentValues getConstraints(android.net.Uri, int);
    method public int getDrmObjectType(String, String);
+14 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.drm;

import android.annotation.NonNull;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
@@ -37,6 +38,8 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.concurrent.atomic.AtomicBoolean;

@@ -369,6 +372,17 @@ public class DrmManagerClient implements AutoCloseable {
        return descriptions.toArray(drmEngines);
    }

    /**
     * Retrieves information about all the DRM plug-ins (agents) that are
     * registered with the DRM framework.
     *
     * @return List of all the DRM plug-ins (agents) that are registered with
     *         the DRM framework.
     */
    public @NonNull Collection<DrmSupportInfo> getAvailableDrmSupportInfo() {
        return Arrays.asList(_getAllSupportInfo(mUniqueId));
    }

    /**
     * Retrieves constraint information for rights-protected content.
     *