From f5faf9db14347e917747c3d65e0220918dd0ab7b Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Mon, 23 May 2016 13:56:15 -0700 Subject: [PATCH] Deprecate unnecessairy Notification.Style constructors Change-Id: I7a15eaaac4f756d137483aec5f389951c5a7eecb Fixes: 28775574 --- api/current.txt | 10 ++++------ api/system-current.txt | 10 ++++------ api/test-current.txt | 10 ++++------ core/java/android/app/Notification.java | 24 ++++++++++++++++-------- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/api/current.txt b/api/current.txt index 842fa11126cee..bd428fb798831 100644 --- a/api/current.txt +++ b/api/current.txt @@ -5047,7 +5047,7 @@ package android.app { public static class Notification.BigPictureStyle extends android.app.Notification.Style { ctor public Notification.BigPictureStyle(); - ctor public Notification.BigPictureStyle(android.app.Notification.Builder); + ctor public deprecated Notification.BigPictureStyle(android.app.Notification.Builder); method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.Bitmap); method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.drawable.Icon); method public android.app.Notification.BigPictureStyle bigPicture(android.graphics.Bitmap); @@ -5057,7 +5057,7 @@ package android.app { public static class Notification.BigTextStyle extends android.app.Notification.Style { ctor public Notification.BigTextStyle(); - ctor public Notification.BigTextStyle(android.app.Notification.Builder); + ctor public deprecated Notification.BigTextStyle(android.app.Notification.Builder); method public android.app.Notification.BigTextStyle bigText(java.lang.CharSequence); method public android.app.Notification.BigTextStyle setBigContentTitle(java.lang.CharSequence); method public android.app.Notification.BigTextStyle setSummaryText(java.lang.CharSequence); @@ -5158,12 +5158,10 @@ package android.app { public static class Notification.DecoratedCustomViewStyle extends android.app.Notification.Style { ctor public Notification.DecoratedCustomViewStyle(); - ctor public Notification.DecoratedCustomViewStyle(android.app.Notification.Builder); } public static class Notification.DecoratedMediaCustomViewStyle extends android.app.Notification.MediaStyle { ctor public Notification.DecoratedMediaCustomViewStyle(); - ctor public Notification.DecoratedMediaCustomViewStyle(android.app.Notification.Builder); } public static abstract interface Notification.Extender { @@ -5172,7 +5170,7 @@ package android.app { public static class Notification.InboxStyle extends android.app.Notification.Style { ctor public Notification.InboxStyle(); - ctor public Notification.InboxStyle(android.app.Notification.Builder); + ctor public deprecated Notification.InboxStyle(android.app.Notification.Builder); method public android.app.Notification.InboxStyle addLine(java.lang.CharSequence); method public android.app.Notification.InboxStyle setBigContentTitle(java.lang.CharSequence); method public android.app.Notification.InboxStyle setSummaryText(java.lang.CharSequence); @@ -5180,7 +5178,7 @@ package android.app { public static class Notification.MediaStyle extends android.app.Notification.Style { ctor public Notification.MediaStyle(); - ctor public Notification.MediaStyle(android.app.Notification.Builder); + ctor public deprecated Notification.MediaStyle(android.app.Notification.Builder); method public android.app.Notification.MediaStyle setMediaSession(android.media.session.MediaSession.Token); method public android.app.Notification.MediaStyle setShowActionsInCompactView(int...); } diff --git a/api/system-current.txt b/api/system-current.txt index b204d5c6cd9f6..c8cf2328608bb 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5194,7 +5194,7 @@ package android.app { public static class Notification.BigPictureStyle extends android.app.Notification.Style { ctor public Notification.BigPictureStyle(); - ctor public Notification.BigPictureStyle(android.app.Notification.Builder); + ctor public deprecated Notification.BigPictureStyle(android.app.Notification.Builder); method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.Bitmap); method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.drawable.Icon); method public android.app.Notification.BigPictureStyle bigPicture(android.graphics.Bitmap); @@ -5204,7 +5204,7 @@ package android.app { public static class Notification.BigTextStyle extends android.app.Notification.Style { ctor public Notification.BigTextStyle(); - ctor public Notification.BigTextStyle(android.app.Notification.Builder); + ctor public deprecated Notification.BigTextStyle(android.app.Notification.Builder); method public android.app.Notification.BigTextStyle bigText(java.lang.CharSequence); method public android.app.Notification.BigTextStyle setBigContentTitle(java.lang.CharSequence); method public android.app.Notification.BigTextStyle setSummaryText(java.lang.CharSequence); @@ -5305,12 +5305,10 @@ package android.app { public static class Notification.DecoratedCustomViewStyle extends android.app.Notification.Style { ctor public Notification.DecoratedCustomViewStyle(); - ctor public Notification.DecoratedCustomViewStyle(android.app.Notification.Builder); } public static class Notification.DecoratedMediaCustomViewStyle extends android.app.Notification.MediaStyle { ctor public Notification.DecoratedMediaCustomViewStyle(); - ctor public Notification.DecoratedMediaCustomViewStyle(android.app.Notification.Builder); } public static abstract interface Notification.Extender { @@ -5319,7 +5317,7 @@ package android.app { public static class Notification.InboxStyle extends android.app.Notification.Style { ctor public Notification.InboxStyle(); - ctor public Notification.InboxStyle(android.app.Notification.Builder); + ctor public deprecated Notification.InboxStyle(android.app.Notification.Builder); method public android.app.Notification.InboxStyle addLine(java.lang.CharSequence); method public android.app.Notification.InboxStyle setBigContentTitle(java.lang.CharSequence); method public android.app.Notification.InboxStyle setSummaryText(java.lang.CharSequence); @@ -5327,7 +5325,7 @@ package android.app { public static class Notification.MediaStyle extends android.app.Notification.Style { ctor public Notification.MediaStyle(); - ctor public Notification.MediaStyle(android.app.Notification.Builder); + ctor public deprecated Notification.MediaStyle(android.app.Notification.Builder); method public android.app.Notification.MediaStyle setMediaSession(android.media.session.MediaSession.Token); method public android.app.Notification.MediaStyle setShowActionsInCompactView(int...); } diff --git a/api/test-current.txt b/api/test-current.txt index 420cd433e2ca6..9ffd7f19299cb 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -5048,7 +5048,7 @@ package android.app { public static class Notification.BigPictureStyle extends android.app.Notification.Style { ctor public Notification.BigPictureStyle(); - ctor public Notification.BigPictureStyle(android.app.Notification.Builder); + ctor public deprecated Notification.BigPictureStyle(android.app.Notification.Builder); method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.Bitmap); method public android.app.Notification.BigPictureStyle bigLargeIcon(android.graphics.drawable.Icon); method public android.app.Notification.BigPictureStyle bigPicture(android.graphics.Bitmap); @@ -5058,7 +5058,7 @@ package android.app { public static class Notification.BigTextStyle extends android.app.Notification.Style { ctor public Notification.BigTextStyle(); - ctor public Notification.BigTextStyle(android.app.Notification.Builder); + ctor public deprecated Notification.BigTextStyle(android.app.Notification.Builder); method public android.app.Notification.BigTextStyle bigText(java.lang.CharSequence); method public android.app.Notification.BigTextStyle setBigContentTitle(java.lang.CharSequence); method public android.app.Notification.BigTextStyle setSummaryText(java.lang.CharSequence); @@ -5159,12 +5159,10 @@ package android.app { public static class Notification.DecoratedCustomViewStyle extends android.app.Notification.Style { ctor public Notification.DecoratedCustomViewStyle(); - ctor public Notification.DecoratedCustomViewStyle(android.app.Notification.Builder); } public static class Notification.DecoratedMediaCustomViewStyle extends android.app.Notification.MediaStyle { ctor public Notification.DecoratedMediaCustomViewStyle(); - ctor public Notification.DecoratedMediaCustomViewStyle(android.app.Notification.Builder); } public static abstract interface Notification.Extender { @@ -5173,7 +5171,7 @@ package android.app { public static class Notification.InboxStyle extends android.app.Notification.Style { ctor public Notification.InboxStyle(); - ctor public Notification.InboxStyle(android.app.Notification.Builder); + ctor public deprecated Notification.InboxStyle(android.app.Notification.Builder); method public android.app.Notification.InboxStyle addLine(java.lang.CharSequence); method public android.app.Notification.InboxStyle setBigContentTitle(java.lang.CharSequence); method public android.app.Notification.InboxStyle setSummaryText(java.lang.CharSequence); @@ -5181,7 +5179,7 @@ package android.app { public static class Notification.MediaStyle extends android.app.Notification.Style { ctor public Notification.MediaStyle(); - ctor public Notification.MediaStyle(android.app.Notification.Builder); + ctor public deprecated Notification.MediaStyle(android.app.Notification.Builder); method public android.app.Notification.MediaStyle setMediaSession(android.media.session.MediaSession.Token); method public android.app.Notification.MediaStyle setShowActionsInCompactView(int...); } diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index a666e664acba2..4108e3a0bbba1 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -4075,6 +4075,10 @@ public class Notification implements Parcelable public BigPictureStyle() { } + /** + * @deprecated use {@code BigPictureStyle()}. + */ + @Deprecated public BigPictureStyle(Builder builder) { setBuilder(builder); } @@ -4231,6 +4235,10 @@ public class Notification implements Parcelable public BigTextStyle() { } + /** + * @deprecated use {@code BigTextStyle()}. + */ + @Deprecated public BigTextStyle(Builder builder) { setBuilder(builder); } @@ -4773,6 +4781,10 @@ public class Notification implements Parcelable public InboxStyle() { } + /** + * @deprecated use {@code InboxStyle()}. + */ + @Deprecated public InboxStyle(Builder builder) { setBuilder(builder); } @@ -4945,6 +4957,10 @@ public class Notification implements Parcelable public MediaStyle() { } + /** + * @deprecated use {@code MediaStyle()}. + */ + @Deprecated public MediaStyle(Builder builder) { setBuilder(builder); } @@ -5152,10 +5168,6 @@ public class Notification implements Parcelable public DecoratedCustomViewStyle() { } - public DecoratedCustomViewStyle(Builder builder) { - setBuilder(builder); - } - /** * @hide */ @@ -5272,10 +5284,6 @@ public class Notification implements Parcelable public DecoratedMediaCustomViewStyle() { } - public DecoratedMediaCustomViewStyle(Builder builder) { - setBuilder(builder); - } - /** * @hide */