Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5473,6 +5473,7 @@ package android.app { public static final class Notification.BubbleMetadata implements android.os.Parcelable { method public int describeContents(); method public boolean getAutoExpandBubble(); method public android.app.PendingIntent getDeleteIntent(); method public int getDesiredHeight(); method public android.graphics.drawable.Icon getIcon(); method public android.app.PendingIntent getIntent(); Loading @@ -5486,6 +5487,7 @@ package android.app { ctor public Notification.BubbleMetadata.Builder(); method public android.app.Notification.BubbleMetadata build(); method public android.app.Notification.BubbleMetadata.Builder setAutoExpandBubble(boolean); method public android.app.Notification.BubbleMetadata.Builder setDeleteIntent(android.app.PendingIntent); method public android.app.Notification.BubbleMetadata.Builder setDesiredHeight(int); method public android.app.Notification.BubbleMetadata.Builder setIcon(android.graphics.drawable.Icon); method public android.app.Notification.BubbleMetadata.Builder setIntent(android.app.PendingIntent); core/java/android/app/Notification.java +30 −4 Original line number Diff line number Diff line Loading @@ -8408,6 +8408,7 @@ public class Notification implements Parcelable public static final class BubbleMetadata implements Parcelable { private PendingIntent mPendingIntent; private PendingIntent mDeleteIntent; private CharSequence mTitle; private Icon mIcon; private int mDesiredHeight; Loading Loading @@ -8436,11 +8437,13 @@ public class Notification implements Parcelable */ private static final int FLAG_SUPPRESS_INITIAL_NOTIFICATION = 0x00000002; private BubbleMetadata(PendingIntent intent, CharSequence title, Icon icon, int height) { mPendingIntent = intent; private BubbleMetadata(PendingIntent expandIntent, PendingIntent deleteIntent, CharSequence title, Icon icon, int height) { mPendingIntent = expandIntent; mTitle = title; mIcon = icon; mDesiredHeight = height; mDeleteIntent = deleteIntent; } private BubbleMetadata(Parcel in) { Loading @@ -8449,6 +8452,9 @@ public class Notification implements Parcelable mIcon = Icon.CREATOR.createFromParcel(in); mDesiredHeight = in.readInt(); mFlags = in.readInt(); if (in.readInt() != 0) { mDeleteIntent = PendingIntent.CREATOR.createFromParcel(in); } } /** Loading @@ -8458,6 +8464,13 @@ public class Notification implements Parcelable return mPendingIntent; } /** * @return the pending intent to send when the bubble is dismissed by a user, if one exists. */ public PendingIntent getDeleteIntent() { return mDeleteIntent; } /** * @return the title that will appear along with the app content defined by * {@link #getIntent()} for this bubble. Loading Loading @@ -8525,6 +8538,10 @@ public class Notification implements Parcelable mIcon.writeToParcel(out, 0); out.writeInt(mDesiredHeight); out.writeInt(mFlags); out.writeInt(mDeleteIntent != null ? 1 : 0); if (mDeleteIntent != null) { mDeleteIntent.writeToParcel(out, 0); } } private void setFlags(int flags) { Loading @@ -8541,6 +8558,7 @@ public class Notification implements Parcelable private Icon mIcon; private int mDesiredHeight; private int mFlags; private PendingIntent mDeleteIntent; /** * Constructs a new builder object. Loading Loading @@ -8632,6 +8650,14 @@ public class Notification implements Parcelable return this; } /** * Sets an optional intent to send when this bubble is explicitly removed by the user. */ public BubbleMetadata.Builder setDeleteIntent(PendingIntent deleteIntent) { mDeleteIntent = deleteIntent; return this; } /** * Creates the {@link BubbleMetadata} defined by this builder. * <p>Will throw {@link IllegalStateException} if required fields have not been set Loading @@ -8647,8 +8673,8 @@ public class Notification implements Parcelable if (mIcon == null) { throw new IllegalStateException("Must supply an icon for the bubble"); } BubbleMetadata data = new BubbleMetadata(mPendingIntent, mTitle, mIcon, mDesiredHeight); BubbleMetadata data = new BubbleMetadata(mPendingIntent, mDeleteIntent, mTitle, mIcon, mDesiredHeight); data.setFlags(mFlags); return data; } Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5473,6 +5473,7 @@ package android.app { public static final class Notification.BubbleMetadata implements android.os.Parcelable { method public int describeContents(); method public boolean getAutoExpandBubble(); method public android.app.PendingIntent getDeleteIntent(); method public int getDesiredHeight(); method public android.graphics.drawable.Icon getIcon(); method public android.app.PendingIntent getIntent(); Loading @@ -5486,6 +5487,7 @@ package android.app { ctor public Notification.BubbleMetadata.Builder(); method public android.app.Notification.BubbleMetadata build(); method public android.app.Notification.BubbleMetadata.Builder setAutoExpandBubble(boolean); method public android.app.Notification.BubbleMetadata.Builder setDeleteIntent(android.app.PendingIntent); method public android.app.Notification.BubbleMetadata.Builder setDesiredHeight(int); method public android.app.Notification.BubbleMetadata.Builder setIcon(android.graphics.drawable.Icon); method public android.app.Notification.BubbleMetadata.Builder setIntent(android.app.PendingIntent);
core/java/android/app/Notification.java +30 −4 Original line number Diff line number Diff line Loading @@ -8408,6 +8408,7 @@ public class Notification implements Parcelable public static final class BubbleMetadata implements Parcelable { private PendingIntent mPendingIntent; private PendingIntent mDeleteIntent; private CharSequence mTitle; private Icon mIcon; private int mDesiredHeight; Loading Loading @@ -8436,11 +8437,13 @@ public class Notification implements Parcelable */ private static final int FLAG_SUPPRESS_INITIAL_NOTIFICATION = 0x00000002; private BubbleMetadata(PendingIntent intent, CharSequence title, Icon icon, int height) { mPendingIntent = intent; private BubbleMetadata(PendingIntent expandIntent, PendingIntent deleteIntent, CharSequence title, Icon icon, int height) { mPendingIntent = expandIntent; mTitle = title; mIcon = icon; mDesiredHeight = height; mDeleteIntent = deleteIntent; } private BubbleMetadata(Parcel in) { Loading @@ -8449,6 +8452,9 @@ public class Notification implements Parcelable mIcon = Icon.CREATOR.createFromParcel(in); mDesiredHeight = in.readInt(); mFlags = in.readInt(); if (in.readInt() != 0) { mDeleteIntent = PendingIntent.CREATOR.createFromParcel(in); } } /** Loading @@ -8458,6 +8464,13 @@ public class Notification implements Parcelable return mPendingIntent; } /** * @return the pending intent to send when the bubble is dismissed by a user, if one exists. */ public PendingIntent getDeleteIntent() { return mDeleteIntent; } /** * @return the title that will appear along with the app content defined by * {@link #getIntent()} for this bubble. Loading Loading @@ -8525,6 +8538,10 @@ public class Notification implements Parcelable mIcon.writeToParcel(out, 0); out.writeInt(mDesiredHeight); out.writeInt(mFlags); out.writeInt(mDeleteIntent != null ? 1 : 0); if (mDeleteIntent != null) { mDeleteIntent.writeToParcel(out, 0); } } private void setFlags(int flags) { Loading @@ -8541,6 +8558,7 @@ public class Notification implements Parcelable private Icon mIcon; private int mDesiredHeight; private int mFlags; private PendingIntent mDeleteIntent; /** * Constructs a new builder object. Loading Loading @@ -8632,6 +8650,14 @@ public class Notification implements Parcelable return this; } /** * Sets an optional intent to send when this bubble is explicitly removed by the user. */ public BubbleMetadata.Builder setDeleteIntent(PendingIntent deleteIntent) { mDeleteIntent = deleteIntent; return this; } /** * Creates the {@link BubbleMetadata} defined by this builder. * <p>Will throw {@link IllegalStateException} if required fields have not been set Loading @@ -8647,8 +8673,8 @@ public class Notification implements Parcelable if (mIcon == null) { throw new IllegalStateException("Must supply an icon for the bubble"); } BubbleMetadata data = new BubbleMetadata(mPendingIntent, mTitle, mIcon, mDesiredHeight); BubbleMetadata data = new BubbleMetadata(mPendingIntent, mDeleteIntent, mTitle, mIcon, mDesiredHeight); data.setFlags(mFlags); return data; } Loading