From 060526f9856e52964eaf13df8db74f5fbdcb83b1 Mon Sep 17 00:00:00 2001 From: James Dong Date: Mon, 27 Feb 2012 16:41:22 -0800 Subject: [PATCH] Deprecate default constructor for classes that should have been meant to be interfaces o We should have not exposed these default constructors in the first place. Change-Id: Ia8bcfe77e9730021ad8870ece67c6d0eed8146ad --- api/current.txt | 10 +++++----- drm/java/android/drm/DrmStore.java | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/api/current.txt b/api/current.txt index fffa1fed124cf..edb7159adf03e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -7616,11 +7616,11 @@ package android.drm { } public class DrmStore { - ctor public DrmStore(); + ctor public deprecated DrmStore(); } public static class DrmStore.Action { - ctor public DrmStore.Action(); + ctor public deprecated DrmStore.Action(); field public static final int DEFAULT = 0; // 0x0 field public static final int DISPLAY = 7; // 0x7 field public static final int EXECUTE = 6; // 0x6 @@ -7641,7 +7641,7 @@ package android.drm { } public static class DrmStore.DrmObjectType { - ctor public DrmStore.DrmObjectType(); + ctor public deprecated DrmStore.DrmObjectType(); field public static final int CONTENT = 1; // 0x1 field public static final int RIGHTS_OBJECT = 2; // 0x2 field public static final int TRIGGER_OBJECT = 3; // 0x3 @@ -7649,7 +7649,7 @@ package android.drm { } public static class DrmStore.Playback { - ctor public DrmStore.Playback(); + ctor public deprecated DrmStore.Playback(); field public static final int PAUSE = 2; // 0x2 field public static final int RESUME = 3; // 0x3 field public static final int START = 0; // 0x0 @@ -7657,7 +7657,7 @@ package android.drm { } public static class DrmStore.RightsStatus { - ctor public DrmStore.RightsStatus(); + ctor public deprecated DrmStore.RightsStatus(); field public static final int RIGHTS_EXPIRED = 2; // 0x2 field public static final int RIGHTS_INVALID = 1; // 0x1 field public static final int RIGHTS_NOT_ACQUIRED = 3; // 0x3 diff --git a/drm/java/android/drm/DrmStore.java b/drm/java/android/drm/DrmStore.java index 2f004cfdae26d..3a77ea19a19bd 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() {} }