From 365ce1db339db53cd5afb118ff867fe940644e45 Mon Sep 17 00:00:00 2001 From: James Dong Date: Thu, 23 Feb 2012 00:12:29 -0800 Subject: Improved comment about DrmStore.ConstraintsColumns Change-Id: I89c588759dd409ac0252d686af12bfe4e105f3d5 --- drm/java/android/drm/DrmManagerClient.java | 1 + drm/java/android/drm/DrmStore.java | 32 ++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) (limited to 'drm') diff --git a/drm/java/android/drm/DrmManagerClient.java b/drm/java/android/drm/DrmManagerClient.java index 9a7194c..14d5fae 100755 --- a/drm/java/android/drm/DrmManagerClient.java +++ b/drm/java/android/drm/DrmManagerClient.java @@ -317,6 +317,7 @@ public class DrmManagerClient { * * @return A {@link android.content.ContentValues} instance that contains * key-value pairs representing the constraints. Null in case of failure. + * The keys are defined in {@link DrmStore.ConstraintsColumns}. */ public ContentValues getConstraints(String path, int action) { if (null == path || path.equals("") || !DrmStore.Action.isValid(action)) { diff --git a/drm/java/android/drm/DrmStore.java b/drm/java/android/drm/DrmStore.java index ae311de..2f004cf 100755 --- a/drm/java/android/drm/DrmStore.java +++ b/drm/java/android/drm/DrmStore.java @@ -23,45 +23,65 @@ package android.drm; public class DrmStore { /** * Interface definition for the columns that represent DRM constraints. + * {@link android.drm.DrmManagerClient#getConstraints DrmManagerClient.getConstraints()} + * can be called by an application to find out the contraints on the + * {@link android.drm.DrmStore.Action actions} that can be performed + * on right-protected content. The constants defined in this interface + * represent three most common types of constraints: count-based, + * date-based, and duration-based. Two or more constraints can be used + * at the same time to represent more sophisticated constraints. + * In addition, user-defined constraint, + * {@link #EXTENDED_METADATA extended metadata}, can be + * used if these three types of constraints are not sufficient. */ public interface ConstraintsColumns { /** - * The maximum repeat count. + * This is a count-based constraint. It represents the maximum + * repeat count that can be performed on an + * {@link android.drm.DrmStore.Action action}. *

* Type: INTEGER */ public static final String MAX_REPEAT_COUNT = "max_repeat_count"; /** - * The remaining repeat count. + * This is a count-based constraint. It represents the remaining + * repeat count that can be performed on an + * {@link android.drm.DrmStore.Action action}. *

* Type: INTEGER */ public static final String REMAINING_REPEAT_COUNT = "remaining_repeat_count"; /** - * The time before which the rights-protected file cannot be played/viewed. + * This is a date-based constraint. It represents the time before which + * an {@link android.drm.DrmStore.Action action} can be performed on + * the rights-protected content. *

* Type: TEXT */ public static final String LICENSE_START_TIME = "license_start_time"; /** - * The time after which the rights-protected file cannot be played/viewed. + * This is a date-based constaint. It represents the time after which + * an {@link android.drm.DrmStore.Action action} can not be performed on + * the rights-protected content. *

* Type: TEXT */ public static final String LICENSE_EXPIRY_TIME = "license_expiry_time"; /** - * The available time left before the license expires. + * This is a duration-based constaint. It represents the available time left + * before the license expires. *

* Type: TEXT */ public static final String LICENSE_AVAILABLE_TIME = "license_available_time"; /** - * The data stream for extended metadata. + * This is a user-defined constraint. It represents the additional constraint + * using extended metadata. *

* Type: TEXT */ -- cgit v1.1