diff options
Diffstat (limited to 'drm/java')
-rwxr-xr-x | drm/java/android/drm/DrmStore.java | 30 | ||||
-rwxr-xr-x | drm/java/android/drm/DrmSupportInfo.java | 11 | ||||
-rwxr-xr-x | drm/java/android/drm/DrmUtils.java | 30 |
3 files changed, 66 insertions, 5 deletions
diff --git a/drm/java/android/drm/DrmStore.java b/drm/java/android/drm/DrmStore.java index 2f004cfdae26..3a77ea19a19b 100755 --- a/drm/java/android/drm/DrmStore.java +++ b/drm/java/android/drm/DrmStore.java @@ -108,6 +108,12 @@ public class DrmStore { * A trigger information object type. */ public static final int TRIGGER_OBJECT = 0x03; + + /** + * @deprecated This class should have been an interface instead. + * The default constuctor should have not been exposed. + */ + public DrmObjectType() {} } /** @@ -143,6 +149,12 @@ public class DrmStore { } return isValid; } + + /** + * @deprecated This class should have been an interface instead. + * The default constuctor should have not been exposed. + */ + public Playback() {} } /** @@ -198,6 +210,12 @@ public class DrmStore { } return isValid; } + + /** + * @deprecated This class should have been an interface instead. + * The default constuctor should have not been exposed. + */ + public Action() {} } /** @@ -220,6 +238,18 @@ public class DrmStore { * The digital rights have not been acquired for the rights-protected content. */ public static final int RIGHTS_NOT_ACQUIRED = 0x03; + + /** + * @deprecated This class should have been an interface instead. + * The default constuctor should have not been exposed. + */ + public RightsStatus() {} } + + /** + * @deprecated This class should have been an interface instead. + * The default constuctor should have not been exposed. + */ + public DrmStore() {} } diff --git a/drm/java/android/drm/DrmSupportInfo.java b/drm/java/android/drm/DrmSupportInfo.java index 720c545282a9..6484fa71dbd2 100755 --- a/drm/java/android/drm/DrmSupportInfo.java +++ b/drm/java/android/drm/DrmSupportInfo.java @@ -85,12 +85,23 @@ public class DrmSupportInfo { * Retrieves the DRM plug-in (agent) description. * * @return The plug-in description. + * @deprecated The method name is mis-spelled, and it is replaced by + * {@link #getDescription()}. */ public String getDescriprition() { return mDescription; } /** + * Retrieves the DRM plug-in (agent) description. + * + * @return The plug-in description. + */ + public String getDescription() { + return mDescription; + } + + /** * Overridden hash code implementation. * * @return The hash code value. diff --git a/drm/java/android/drm/DrmUtils.java b/drm/java/android/drm/DrmUtils.java index dc5f1fa3d087..4f7cb224fd65 100755 --- a/drm/java/android/drm/DrmUtils.java +++ b/drm/java/android/drm/DrmUtils.java @@ -55,8 +55,8 @@ public class DrmUtils { bufferedStream.read(data); } } finally { - quiteDispose(bufferedStream); - quiteDispose(inputStream); + quietlyDispose(bufferedStream); + quietlyDispose(inputStream); } return data; } @@ -70,7 +70,7 @@ public class DrmUtils { outputStream = new FileOutputStream(path); outputStream.write(data); } finally { - quiteDispose(outputStream); + quietlyDispose(outputStream); } } } @@ -80,7 +80,7 @@ public class DrmUtils { file.delete(); } - private static void quiteDispose(InputStream stream) { + private static void quietlyDispose(InputStream stream) { try { if (null != stream) { stream.close(); @@ -90,7 +90,7 @@ public class DrmUtils { } } - private static void quiteDispose(OutputStream stream) { + private static void quietlyDispose(OutputStream stream) { try { if (null != stream) { stream.close(); @@ -175,14 +175,34 @@ public class DrmUtils { } } + /** + * This method returns an iterator object that can be used to iterate over + * all values of the metadata. + * + * @return The iterator object. + */ public Iterator<String> iterator() { return mMap.values().iterator(); } + /** + * This method returns an iterator object that can be used to iterate over + * all keys of the metadata. + * + * @return The iterator object. + */ public Iterator<String> keyIterator() { return mMap.keySet().iterator(); } + /** + * This method retrieves the metadata value associated with a given key. + * + * @param key The key whose value is being retrieved. + * + * @return The metadata value associated with the given key. Returns null + * if the key is not found. + */ public String get(String key) { return mMap.get(key); } |