Source code
package android.support.v4.app;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.ColorInt;
import android.support.v4.app.NotificationCompatBase.UnreadConversation;
import android.support.v4.app.NotificationCompatBase.UnreadConversation.Factory;
import android.support.v4.app.RemoteInputCompatBase.RemoteInput;
import android.widget.RemoteViews;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
public class NotificationCompat {
public static final String CATEGORY_ALARM = "alarm";
public static final String CATEGORY_CALL = "call";
public static final String CATEGORY_EMAIL = "email";
public static final String CATEGORY_ERROR = "err";
public static final String CATEGORY_EVENT = "event";
public static final String CATEGORY_MESSAGE = "msg";
public static final String CATEGORY_PROGRESS = "progress";
public static final String CATEGORY_PROMO = "promo";
public static final String CATEGORY_RECOMMENDATION = "recommendation";
public static final String CATEGORY_SERVICE = "service";
public static final String CATEGORY_SOCIAL = "social";
public static final String CATEGORY_STATUS = "status";
public static final String CATEGORY_SYSTEM = "sys";
public static final String CATEGORY_TRANSPORT = "transport";
@ColorInt
public static final int COLOR_DEFAULT = 0;
public static final int DEFAULT_ALL = -1;
public static final int DEFAULT_LIGHTS = 4;
public static final int DEFAULT_SOUND = 1;
public static final int DEFAULT_VIBRATE = 2;
public static final String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
public static final String EXTRA_BIG_TEXT = "android.bigText";
public static final String EXTRA_COMPACT_ACTIONS = "android.compactActions";
public static final String EXTRA_INFO_TEXT = "android.infoText";
public static final String EXTRA_LARGE_ICON = "android.largeIcon";
public static final String EXTRA_LARGE_ICON_BIG = "android.largeIcon.big";
public static final String EXTRA_MEDIA_SESSION = "android.mediaSession";
public static final String EXTRA_PEOPLE = "android.people";
public static final String EXTRA_PICTURE = "android.picture";
public static final String EXTRA_PROGRESS = "android.progress";
public static final String EXTRA_PROGRESS_INDETERMINATE = "android.progressIndeterminate";
public static final String EXTRA_PROGRESS_MAX = "android.progressMax";
public static final String EXTRA_SHOW_CHRONOMETER = "android.showChronometer";
public static final String EXTRA_SHOW_WHEN = "android.showWhen";
public static final String EXTRA_SMALL_ICON = "android.icon";
public static final String EXTRA_SUB_TEXT = "android.subText";
public static final String EXTRA_SUMMARY_TEXT = "android.summaryText";
public static final String EXTRA_TEMPLATE = "android.template";
public static final String EXTRA_TEXT = "android.text";
public static final String EXTRA_TEXT_LINES = "android.textLines";
public static final String EXTRA_TITLE = "android.title";
public static final String EXTRA_TITLE_BIG = "android.title.big";
public static final int FLAG_AUTO_CANCEL = 16;
public static final int FLAG_FOREGROUND_SERVICE = 64;
public static final int FLAG_GROUP_SUMMARY = 512;
public static final int FLAG_HIGH_PRIORITY = 128;
public static final int FLAG_INSISTENT = 4;
public static final int FLAG_LOCAL_ONLY = 256;
public static final int FLAG_NO_CLEAR = 32;
public static final int FLAG_ONGOING_EVENT = 2;
public static final int FLAG_ONLY_ALERT_ONCE = 8;
public static final int FLAG_SHOW_LIGHTS = 1;
private static final NotificationCompatImpl IMPL;
public static final int PRIORITY_DEFAULT = 0;
public static final int PRIORITY_HIGH = 1;
public static final int PRIORITY_LOW = -1;
public static final int PRIORITY_MAX = 2;
public static final int PRIORITY_MIN = -2;
public static final int STREAM_DEFAULT = -1;
public static final int VISIBILITY_PRIVATE = 0;
public static final int VISIBILITY_PUBLIC = 1;
public static final int VISIBILITY_SECRET = -1;
public static class Builder {
private static final int MAX_CHARSEQUENCE_LENGTH = 5120;
public ArrayList<Action> mActions = new ArrayList();
String mCategory;
int mColor = 0;
public CharSequence mContentInfo;
PendingIntent mContentIntent;
public CharSequence mContentText;
public CharSequence mContentTitle;
public Context mContext;
Bundle mExtras;
PendingIntent mFullScreenIntent;
String mGroupKey;
boolean mGroupSummary;
public Bitmap mLargeIcon;
boolean mLocalOnly = false;
public Notification mNotification = new Notification();
public int mNumber;
public ArrayList<String> mPeople;
int mPriority;
int mProgress;
boolean mProgressIndeterminate;
int mProgressMax;
Notification mPublicVersion;
boolean mShowWhen = true;
String mSortKey;
public Style mStyle;
public CharSequence mSubText;
RemoteViews mTickerView;
public boolean mUseChronometer;
int mVisibility = 0;
public Builder(Context context) {
this.mContext = context;
this.mNotification.when = System.currentTimeMillis();
this.mNotification.audioStreamType = -1;
this.mPriority = 0;
this.mPeople = new ArrayList();
}
public Builder setWhen(long when) {
this.mNotification.when = when;
return this;
}
public Builder setShowWhen(boolean show) {
this.mShowWhen = show;
return this;
}
public Builder setUsesChronometer(boolean b) {
this.mUseChronometer = b;
return this;
}
public Builder setSmallIcon(int icon) {
this.mNotification.icon = icon;
return this;
}
public Builder setSmallIcon(int icon, int level) {
this.mNotification.icon = icon;
this.mNotification.iconLevel = level;
return this;
}
public Builder setContentTitle(CharSequence title) {
this.mContentTitle = limitCharSequenceLength(title);
return this;
}
public Builder setContentText(CharSequence text) {
this.mContentText = limitCharSequenceLength(text);
return this;
}
public Builder setSubText(CharSequence text) {
this.mSubText = limitCharSequenceLength(text);
return this;
}
public Builder setNumber(int number) {
this.mNumber = number;
return this;
}
public Builder setContentInfo(CharSequence info) {
this.mContentInfo = limitCharSequenceLength(info);
return this;
}
public Builder setProgress(int max, int progress, boolean indeterminate) {
this.mProgressMax = max;
this.mProgress = progress;
this.mProgressIndeterminate = indeterminate;
return this;
}
public Builder setContent(RemoteViews views) {
this.mNotification.contentView = views;
return this;
}
public Builder setContentIntent(PendingIntent intent) {
this.mContentIntent = intent;
return this;
}
public Builder setDeleteIntent(PendingIntent intent) {
this.mNotification.deleteIntent = intent;
return this;
}
public Builder setFullScreenIntent(PendingIntent intent, boolean highPriority) {
this.mFullScreenIntent = intent;
setFlag(128, highPriority);
return this;
}
public Builder setTicker(CharSequence tickerText) {
this.mNotification.tickerText = limitCharSequenceLength(tickerText);
return this;
}
public Builder setTicker(CharSequence tickerText, RemoteViews views) {
this.mNotification.tickerText = limitCharSequenceLength(tickerText);
this.mTickerView = views;
return this;
}
public Builder setLargeIcon(Bitmap icon) {
this.mLargeIcon = icon;
return this;
}
public Builder setSound(Uri sound) {
this.mNotification.sound = sound;
this.mNotification.audioStreamType = -1;
return this;
}
public Builder setSound(Uri sound, int streamType) {
this.mNotification.sound = sound;
this.mNotification.audioStreamType = streamType;
return this;
}
public Builder setVibrate(long[] pattern) {
this.mNotification.vibrate = pattern;
return this;
}
public Builder setLights(@ColorInt int argb, int onMs, int offMs) {
boolean showLights;
int i = 1;
this.mNotification.ledARGB = argb;
this.mNotification.ledOnMS = onMs;
this.mNotification.ledOffMS = offMs;
if (this.mNotification.ledOnMS == 0 || this.mNotification.ledOffMS == 0) {
showLights = false;
} else {
showLights = true;
}
Notification notification = this.mNotification;
int i2 = this.mNotification.flags & -2;
if (!showLights) {
i = 0;
}
notification.flags = i | i2;
return this;
}
public Builder setOngoing(boolean ongoing) {
setFlag(2, ongoing);
return this;
}
public Builder setOnlyAlertOnce(boolean onlyAlertOnce) {
setFlag(8, onlyAlertOnce);
return this;
}
public Builder setAutoCancel(boolean autoCancel) {
setFlag(16, autoCancel);
return this;
}
public Builder setLocalOnly(boolean b) {
this.mLocalOnly = b;
return this;
}
public Builder setCategory(String category) {
this.mCategory = category;
return this;
}
public Builder setDefaults(int defaults) {
this.mNotification.defaults = defaults;
if ((defaults & 4) != 0) {
Notification notification = this.mNotification;
notification.flags |= 1;
}
return this;
}
private void setFlag(int mask, boolean value) {
if (value) {
Notification notification = this.mNotification;
notification.flags |= mask;
return;
}
notification = this.mNotification;
notification.flags &= mask ^ -1;
}
public Builder setPriority(int pri) {
this.mPriority = pri;
return this;
}
public Builder addPerson(String uri) {
this.mPeople.add(uri);
return this;
}
public Builder setGroup(String groupKey) {
this.mGroupKey = groupKey;
return this;
}
public Builder setGroupSummary(boolean isGroupSummary) {
this.mGroupSummary = isGroupSummary;
return this;
}
public Builder setSortKey(String sortKey) {
this.mSortKey = sortKey;
return this;
}
public Builder addExtras(Bundle extras) {
if (extras != null) {
if (this.mExtras == null) {
this.mExtras = new Bundle(extras);
} else {
this.mExtras.putAll(extras);
}
}
return this;
}
public Builder setExtras(Bundle extras) {
this.mExtras = extras;
return this;
}
public Bundle getExtras() {
if (this.mExtras == null) {
this.mExtras = new Bundle();
}
return this.mExtras;
}
public Builder addAction(int icon, CharSequence title, PendingIntent intent) {
this.mActions.add(new Action(icon, title, intent));
return this;
}
public Builder addAction(Action action) {
this.mActions.add(action);
return this;
}
public Builder setStyle(Style style) {
if (this.mStyle != style) {
this.mStyle = style;
if (this.mStyle != null) {
this.mStyle.setBuilder(this);
}
}
return this;
}
public Builder setColor(@ColorInt int argb) {
this.mColor = argb;
return this;
}
public Builder setVisibility(int visibility) {
this.mVisibility = visibility;
return this;
}
public Builder setPublicVersion(Notification n) {
this.mPublicVersion = n;
return this;
}
public Builder extend(Extender extender) {
extender.extend(this);
return this;
}
@Deprecated
public Notification getNotification() {
return build();
}
public Notification build() {
return NotificationCompat.IMPL.build(this, getExtender());
}
protected BuilderExtender getExtender() {
return new BuilderExtender();
}
protected static CharSequence limitCharSequenceLength(CharSequence cs) {
if (cs != null && cs.length() > MAX_CHARSEQUENCE_LENGTH) {
return cs.subSequence(0, MAX_CHARSEQUENCE_LENGTH);
}
return cs;
}
}
protected static class BuilderExtender {
protected BuilderExtender() {
}
public Notification build(Builder b, NotificationBuilderWithBuilderAccessor builder) {
return builder.build();
}
}
public interface Extender {
Builder extend(Builder builder);
}
interface NotificationCompatImpl {
Notification build(Builder builder, BuilderExtender builderExtender);
Action getAction(Notification notification, int i);
int getActionCount(Notification notification);
Action[] getActionsFromParcelableArrayList(ArrayList<Parcelable> arrayList);
Bundle getBundleForUnreadConversation(UnreadConversation unreadConversation);
String getCategory(Notification notification);
Bundle getExtras(Notification notification);
String getGroup(Notification notification);
boolean getLocalOnly(Notification notification);
ArrayList<Parcelable> getParcelableArrayListForActions(Action[] actionArr);
String getSortKey(Notification notification);
UnreadConversation getUnreadConversationFromBundle(Bundle bundle, Factory factory, RemoteInput.Factory factory2);
boolean isGroupSummary(Notification notification);
}
public static abstract class Style {
CharSequence mBigContentTitle;
Builder mBuilder;
CharSequence mSummaryText;
boolean mSummaryTextSet = false;
public void setBuilder(Builder builder) {
if (this.mBuilder != builder) {
this.mBuilder = builder;
if (this.mBuilder != null) {
this.mBuilder.setStyle(this);
}
}
}
public Notification build() {
if (this.mBuilder != null) {
return this.mBuilder.build();
}
return null;
}
}
public static class Action extends android.support.v4.app.NotificationCompatBase.Action {
public static final android.support.v4.app.NotificationCompatBase.Action.Factory FACTORY = new android.support.v4.app.NotificationCompatBase.Action.Factory() {
public Action build(int icon, CharSequence title, PendingIntent actionIntent, Bundle extras, RemoteInput[] remoteInputs) {
return new Action(icon, title, actionIntent, extras, (RemoteInput[]) remoteInputs);
}
public Action[] newArray(int length) {
return new Action[length];
}
};
public PendingIntent actionIntent;
public int icon;
private final Bundle mExtras;
private final RemoteInput[] mRemoteInputs;
public CharSequence title;
public static final class Builder {
private final Bundle mExtras;
private final int mIcon;
private final PendingIntent mIntent;
private ArrayList<RemoteInput> mRemoteInputs;
private final CharSequence mTitle;
public Builder(int icon, CharSequence title, PendingIntent intent) {
this(icon, title, intent, new Bundle());
}
public Builder(Action action) {
this(action.icon, action.title, action.actionIntent, new Bundle(action.mExtras));
}
private Builder(int icon, CharSequence title, PendingIntent intent, Bundle extras) {
this.mIcon = icon;
this.mTitle = Builder.limitCharSequenceLength(title);
this.mIntent = intent;
this.mExtras = extras;
}
public Builder addExtras(Bundle extras) {
if (extras != null) {
this.mExtras.putAll(extras);
}
return this;
}
public Bundle getExtras() {
return this.mExtras;
}
public Builder addRemoteInput(RemoteInput remoteInput) {
if (this.mRemoteInputs == null) {
this.mRemoteInputs = new ArrayList();
}
this.mRemoteInputs.add(remoteInput);
return this;
}
public Builder extend(Extender extender) {
extender.extend(this);
return this;
}
public Action build() {
RemoteInput[] remoteInputs;
if (this.mRemoteInputs != null) {
remoteInputs = (RemoteInput[]) this.mRemoteInputs.toArray(new RemoteInput[this.mRemoteInputs.size()]);
} else {
remoteInputs = null;
}
return new Action(this.mIcon, this.mTitle, this.mIntent, this.mExtras, remoteInputs);
}
}
public interface Extender {
Builder extend(Builder builder);
}
public static final class WearableExtender implements Extender {
private static final int DEFAULT_FLAGS = 1;
private static final String EXTRA_WEARABLE_EXTENSIONS = "android.wearable.EXTENSIONS";
private static final int FLAG_AVAILABLE_OFFLINE = 1;
private static final String KEY_CANCEL_LABEL = "cancelLabel";
private static final String KEY_CONFIRM_LABEL = "confirmLabel";
private static final String KEY_FLAGS = "flags";
private static final String KEY_IN_PROGRESS_LABEL = "inProgressLabel";
private CharSequence mCancelLabel;
private CharSequence mConfirmLabel;
private int mFlags = 1;
private CharSequence mInProgressLabel;
public WearableExtender(Action action) {
Bundle wearableBundle = action.getExtras().getBundle(EXTRA_WEARABLE_EXTENSIONS);
if (wearableBundle != null) {
this.mFlags = wearableBundle.getInt(KEY_FLAGS, 1);
this.mInProgressLabel = wearableBundle.getCharSequence(KEY_IN_PROGRESS_LABEL);
this.mConfirmLabel = wearableBundle.getCharSequence(KEY_CONFIRM_LABEL);
this.mCancelLabel = wearableBundle.getCharSequence(KEY_CANCEL_LABEL);
}
}
public Builder extend(Builder builder) {
Bundle wearableBundle = new Bundle();
if (this.mFlags != 1) {
wearableBundle.putInt(KEY_FLAGS, this.mFlags);
}
if (this.mInProgressLabel != null) {
wearableBundle.putCharSequence(KEY_IN_PROGRESS_LABEL, this.mInProgressLabel);
}
if (this.mConfirmLabel != null) {
wearableBundle.putCharSequence(KEY_CONFIRM_LABEL, this.mConfirmLabel);
}
if (this.mCancelLabel != null) {
wearableBundle.putCharSequence(KEY_CANCEL_LABEL, this.mCancelLabel);
}
builder.getExtras().putBundle(EXTRA_WEARABLE_EXTENSIONS, wearableBundle);
return builder;
}
public WearableExtender clone() {
WearableExtender that = new WearableExtender();
that.mFlags = this.mFlags;
that.mInProgressLabel = this.mInProgressLabel;
that.mConfirmLabel = this.mConfirmLabel;
that.mCancelLabel = this.mCancelLabel;
return that;
}
public WearableExtender setAvailableOffline(boolean availableOffline) {
setFlag(1, availableOffline);
return this;
}
public boolean isAvailableOffline() {
return (this.mFlags & 1) != 0;
}
private void setFlag(int mask, boolean value) {
if (value) {
this.mFlags |= mask;
} else {
this.mFlags &= mask ^ -1;
}
}
public WearableExtender setInProgressLabel(CharSequence label) {
this.mInProgressLabel = label;
return this;
}
public CharSequence getInProgressLabel() {
return this.mInProgressLabel;
}
public WearableExtender setConfirmLabel(CharSequence label) {
this.mConfirmLabel = label;
return this;
}
public CharSequence getConfirmLabel() {
return this.mConfirmLabel;
}
public WearableExtender setCancelLabel(CharSequence label) {
this.mCancelLabel = label;
return this;
}
public CharSequence getCancelLabel() {
return this.mCancelLabel;
}
}
public Action(int icon, CharSequence title, PendingIntent intent) {
this(icon, title, intent, new Bundle(), null);
}
private Action(int icon, CharSequence title, PendingIntent intent, Bundle extras, RemoteInput[] remoteInputs) {
this.icon = icon;
this.title = Builder.limitCharSequenceLength(title);
this.actionIntent = intent;
if (extras == null) {
extras = new Bundle();
}
this.mExtras = extras;
this.mRemoteInputs = remoteInputs;
}
public int getIcon() {
return this.icon;
}
public CharSequence getTitle() {
return this.title;
}
public PendingIntent getActionIntent() {
return this.actionIntent;
}
public Bundle getExtras() {
return this.mExtras;
}
public RemoteInput[] getRemoteInputs() {
return this.mRemoteInputs;
}
}
public static class BigPictureStyle extends Style {
Bitmap mBigLargeIcon;
boolean mBigLargeIconSet;
Bitmap mPicture;
public BigPictureStyle(Builder builder) {
setBuilder(builder);
}
public BigPictureStyle setBigContentTitle(CharSequence title) {
this.mBigContentTitle = Builder.limitCharSequenceLength(title);
return this;
}
public BigPictureStyle setSummaryText(CharSequence cs) {
this.mSummaryText = Builder.limitCharSequenceLength(cs);
this.mSummaryTextSet = true;
return this;
}
public BigPictureStyle bigPicture(Bitmap b) {
this.mPicture = b;
return this;
}
public BigPictureStyle bigLargeIcon(Bitmap b) {
this.mBigLargeIcon = b;
this.mBigLargeIconSet = true;
return this;
}
}
public static class BigTextStyle extends Style {
CharSequence mBigText;
public BigTextStyle(Builder builder) {
setBuilder(builder);
}
public BigTextStyle setBigContentTitle(CharSequence title) {
this.mBigContentTitle = Builder.limitCharSequenceLength(title);
return this;
}
public BigTextStyle setSummaryText(CharSequence cs) {
this.mSummaryText = Builder.limitCharSequenceLength(cs);
this.mSummaryTextSet = true;
return this;
}
public BigTextStyle bigText(CharSequence cs) {
this.mBigText = Builder.limitCharSequenceLength(cs);
return this;
}
}
public static final class CarExtender implements Extender {
private static final String EXTRA_CAR_EXTENDER = "android.car.EXTENSIONS";
private static final String EXTRA_COLOR = "app_color";
private static final String EXTRA_CONVERSATION = "car_conversation";
private static final String EXTRA_LARGE_ICON = "large_icon";
private static final String TAG = "CarExtender";
private int mColor = 0;
private Bitmap mLargeIcon;
private UnreadConversation mUnreadConversation;
public static class UnreadConversation extends android.support.v4.app.NotificationCompatBase.UnreadConversation {
static final Factory FACTORY = new Factory() {
public UnreadConversation build(String[] messages, RemoteInput remoteInput, PendingIntent replyPendingIntent, PendingIntent readPendingIntent, String[] participants, long latestTimestamp) {
return new UnreadConversation(messages, (RemoteInput) remoteInput, replyPendingIntent, readPendingIntent, participants, latestTimestamp);
}
};
private final long mLatestTimestamp;
private final String[] mMessages;
private final String[] mParticipants;
private final PendingIntent mReadPendingIntent;
private final RemoteInput mRemoteInput;
private final PendingIntent mReplyPendingIntent;
public static class Builder {
private long mLatestTimestamp;
private final List<String> mMessages = new ArrayList();
private final String mParticipant;
private PendingIntent mReadPendingIntent;
private RemoteInput mRemoteInput;
private PendingIntent mReplyPendingIntent;
public Builder(String name) {
this.mParticipant = name;
}
public Builder addMessage(String message) {
this.mMessages.add(message);
return this;
}
public Builder setReplyAction(PendingIntent pendingIntent, RemoteInput remoteInput) {
this.mRemoteInput = remoteInput;
this.mReplyPendingIntent = pendingIntent;
return this;
}
public Builder setReadPendingIntent(PendingIntent pendingIntent) {
this.mReadPendingIntent = pendingIntent;
return this;
}
public Builder setLatestTimestamp(long timestamp) {
this.mLatestTimestamp = timestamp;
return this;
}
public UnreadConversation build() {
return new UnreadConversation((String[]) this.mMessages.toArray(new String[this.mMessages.size()]), this.mRemoteInput, this.mReplyPendingIntent, this.mReadPendingIntent, new String[]{this.mParticipant}, this.mLatestTimestamp);
}
}
UnreadConversation(String[] messages, RemoteInput remoteInput, PendingIntent replyPendingIntent, PendingIntent readPendingIntent, String[] participants, long latestTimestamp) {
this.mMessages = messages;
this.mRemoteInput = remoteInput;
this.mReadPendingIntent = readPendingIntent;
this.mReplyPendingIntent = replyPendingIntent;
this.mParticipants = participants;
this.mLatestTimestamp = latestTimestamp;
}
public String[] getMessages() {
return this.mMessages;
}
public RemoteInput getRemoteInput() {
return this.mRemoteInput;
}
public PendingIntent getReplyPendingIntent() {
return this.mReplyPendingIntent;
}
public PendingIntent getReadPendingIntent() {
return this.mReadPendingIntent;
}
public String[] getParticipants() {
return this.mParticipants;
}
public String getParticipant() {
return this.mParticipants.length > 0 ? this.mParticipants[0] : null;
}
public long getLatestTimestamp() {
return this.mLatestTimestamp;
}
}
public CarExtender(Notification notif) {
if (VERSION.SDK_INT >= 21) {
Bundle carBundle = NotificationCompat.getExtras(notif) == null ? null : NotificationCompat.getExtras(notif).getBundle(EXTRA_CAR_EXTENDER);
if (carBundle != null) {
this.mLargeIcon = (Bitmap) carBundle.getParcelable(EXTRA_LARGE_ICON);
this.mColor = carBundle.getInt(EXTRA_COLOR, 0);
this.mUnreadConversation = (UnreadConversation) NotificationCompat.IMPL.getUnreadConversationFromBundle(carBundle.getBundle(EXTRA_CONVERSATION), UnreadConversation.FACTORY, RemoteInput.FACTORY);
}
}
}
public Builder extend(Builder builder) {
if (VERSION.SDK_INT >= 21) {
Bundle carExtensions = new Bundle();
if (this.mLargeIcon != null) {
carExtensions.putParcelable(EXTRA_LARGE_ICON, this.mLargeIcon);
}
if (this.mColor != 0) {
carExtensions.putInt(EXTRA_COLOR, this.mColor);
}
if (this.mUnreadConversation != null) {
carExtensions.putBundle(EXTRA_CONVERSATION, NotificationCompat.IMPL.getBundleForUnreadConversation(this.mUnreadConversation));
}
builder.getExtras().putBundle(EXTRA_CAR_EXTENDER, carExtensions);
}
return builder;
}
public CarExtender setColor(@ColorInt int color) {
this.mColor = color;
return this;
}
@ColorInt
public int getColor() {
return this.mColor;
}
public CarExtender setLargeIcon(Bitmap largeIcon) {
this.mLargeIcon = largeIcon;
return this;
}
public Bitmap getLargeIcon() {
return this.mLargeIcon;
}
public CarExtender setUnreadConversation(UnreadConversation unreadConversation) {
this.mUnreadConversation = unreadConversation;
return this;
}
public UnreadConversation getUnreadConversation() {
return this.mUnreadConversation;
}
}
public static class InboxStyle extends Style {
ArrayList<CharSequence> mTexts = new ArrayList();
public InboxStyle(Builder builder) {
setBuilder(builder);
}
public InboxStyle setBigContentTitle(CharSequence title) {
this.mBigContentTitle = Builder.limitCharSequenceLength(title);
return this;
}
public InboxStyle setSummaryText(CharSequence cs) {
this.mSummaryText = Builder.limitCharSequenceLength(cs);
this.mSummaryTextSet = true;
return this;
}
public InboxStyle addLine(CharSequence cs) {
this.mTexts.add(Builder.limitCharSequenceLength(cs));
return this;
}
}
static class NotificationCompatImplBase implements NotificationCompatImpl {
NotificationCompatImplBase() {
}
public Notification build(Builder b, BuilderExtender extender) {
Notification result = b.mNotification;
result.setLatestEventInfo(b.mContext, b.mContentTitle, b.mContentText, b.mContentIntent);
if (b.mPriority > 0) {
result.flags |= 128;
}
return result;
}
public Bundle getExtras(Notification n) {
return null;
}
public int getActionCount(Notification n) {
return 0;
}
public Action getAction(Notification n, int actionIndex) {
return null;
}
public Action[] getActionsFromParcelableArrayList(ArrayList<Parcelable> arrayList) {
return null;
}
public ArrayList<Parcelable> getParcelableArrayListForActions(Action[] actions) {
return null;
}
public String getCategory(Notification n) {
return null;
}
public boolean getLocalOnly(Notification n) {
return false;
}
public String getGroup(Notification n) {
return null;
}
public boolean isGroupSummary(Notification n) {
return false;
}
public String getSortKey(Notification n) {
return null;
}
public Bundle getBundleForUnreadConversation(UnreadConversation uc) {
return null;
}
public UnreadConversation getUnreadConversationFromBundle(Bundle b, Factory factory, RemoteInput.Factory remoteInputFactory) {
return null;
}
}
public static final class WearableExtender implements Extender {
private static final int DEFAULT_CONTENT_ICON_GRAVITY = 8388613;
private static final int DEFAULT_FLAGS = 1;
private static final int DEFAULT_GRAVITY = 80;
private static final String EXTRA_WEARABLE_EXTENSIONS = "android.wearable.EXTENSIONS";
private static final int FLAG_CONTENT_INTENT_AVAILABLE_OFFLINE = 1;
private static final int FLAG_HINT_AVOID_BACKGROUND_CLIPPING = 16;
private static final int FLAG_HINT_HIDE_ICON = 2;
private static final int FLAG_HINT_SHOW_BACKGROUND_ONLY = 4;
private static final int FLAG_START_SCROLL_BOTTOM = 8;
private static final String KEY_ACTIONS = "actions";
private static final String KEY_BACKGROUND = "background";
private static final String KEY_CONTENT_ACTION_INDEX = "contentActionIndex";
private static final String KEY_CONTENT_ICON = "contentIcon";
private static final String KEY_CONTENT_ICON_GRAVITY = "contentIconGravity";
private static final String KEY_CUSTOM_CONTENT_HEIGHT = "customContentHeight";
private static final String KEY_CUSTOM_SIZE_PRESET = "customSizePreset";
private static final String KEY_DISPLAY_INTENT = "displayIntent";
private static final String KEY_FLAGS = "flags";
private static final String KEY_GRAVITY = "gravity";
private static final String KEY_HINT_SCREEN_TIMEOUT = "hintScreenTimeout";
private static final String KEY_PAGES = "pages";
public static final int SCREEN_TIMEOUT_LONG = -1;
public static final int SCREEN_TIMEOUT_SHORT = 0;
public static final int SIZE_DEFAULT = 0;
public static final int SIZE_FULL_SCREEN = 5;
public static final int SIZE_LARGE = 4;
public static final int SIZE_MEDIUM = 3;
public static final int SIZE_SMALL = 2;
public static final int SIZE_XSMALL = 1;
public static final int UNSET_ACTION_INDEX = -1;
private ArrayList<Action> mActions = new ArrayList();
private Bitmap mBackground;
private int mContentActionIndex = -1;
private int mContentIcon;
private int mContentIconGravity = 8388613;
private int mCustomContentHeight;
private int mCustomSizePreset = 0;
private PendingIntent mDisplayIntent;
private int mFlags = 1;
private int mGravity = 80;
private int mHintScreenTimeout;
private ArrayList<Notification> mPages = new ArrayList();
public WearableExtender(Notification notif) {
Bundle extras = NotificationCompat.getExtras(notif);
Bundle wearableBundle = extras != null ? extras.getBundle(EXTRA_WEARABLE_EXTENSIONS) : null;
if (wearableBundle != null) {
Action[] actions = NotificationCompat.IMPL.getActionsFromParcelableArrayList(wearableBundle.getParcelableArrayList(KEY_ACTIONS));
if (actions != null) {
Collections.addAll(this.mActions, actions);
}
this.mFlags = wearableBundle.getInt(KEY_FLAGS, 1);
this.mDisplayIntent = (PendingIntent) wearableBundle.getParcelable(KEY_DISPLAY_INTENT);
Notification[] pages = NotificationCompat.getNotificationArrayFromBundle(wearableBundle, KEY_PAGES);
if (pages != null) {
Collections.addAll(this.mPages, pages);
}
this.mBackground = (Bitmap) wearableBundle.getParcelable(KEY_BACKGROUND);
this.mContentIcon = wearableBundle.getInt(KEY_CONTENT_ICON);
this.mContentIconGravity = wearableBundle.getInt(KEY_CONTENT_ICON_GRAVITY, 8388613);
this.mContentActionIndex = wearableBundle.getInt(KEY_CONTENT_ACTION_INDEX, -1);
this.mCustomSizePreset = wearableBundle.getInt(KEY_CUSTOM_SIZE_PRESET, 0);
this.mCustomContentHeight = wearableBundle.getInt(KEY_CUSTOM_CONTENT_HEIGHT);
this.mGravity = wearableBundle.getInt(KEY_GRAVITY, 80);
this.mHintScreenTimeout = wearableBundle.getInt(KEY_HINT_SCREEN_TIMEOUT);
}
}
public Builder extend(Builder builder) {
Bundle wearableBundle = new Bundle();
if (!this.mActions.isEmpty()) {
wearableBundle.putParcelableArrayList(KEY_ACTIONS, NotificationCompat.IMPL.getParcelableArrayListForActions((Action[]) this.mActions.toArray(new Action[this.mActions.size()])));
}
if (this.mFlags != 1) {
wearableBundle.putInt(KEY_FLAGS, this.mFlags);
}
if (this.mDisplayIntent != null) {
wearableBundle.putParcelable(KEY_DISPLAY_INTENT, this.mDisplayIntent);
}
if (!this.mPages.isEmpty()) {
wearableBundle.putParcelableArray(KEY_PAGES, (Parcelable[]) this.mPages.toArray(new Notification[this.mPages.size()]));
}
if (this.mBackground != null) {
wearableBundle.putParcelable(KEY_BACKGROUND, this.mBackground);
}
if (this.mContentIcon != 0) {
wearableBundle.putInt(KEY_CONTENT_ICON, this.mContentIcon);
}
if (this.mContentIconGravity != 8388613) {
wearableBundle.putInt(KEY_CONTENT_ICON_GRAVITY, this.mContentIconGravity);
}
if (this.mContentActionIndex != -1) {
wearableBundle.putInt(KEY_CONTENT_ACTION_INDEX, this.mContentActionIndex);
}
if (this.mCustomSizePreset != 0) {
wearableBundle.putInt(KEY_CUSTOM_SIZE_PRESET, this.mCustomSizePreset);
}
if (this.mCustomContentHeight != 0) {
wearableBundle.putInt(KEY_CUSTOM_CONTENT_HEIGHT, this.mCustomContentHeight);
}
if (this.mGravity != 80) {
wearableBundle.putInt(KEY_GRAVITY, this.mGravity);
}
if (this.mHintScreenTimeout != 0) {
wearableBundle.putInt(KEY_HINT_SCREEN_TIMEOUT, this.mHintScreenTimeout);
}
builder.getExtras().putBundle(EXTRA_WEARABLE_EXTENSIONS, wearableBundle);
return builder;
}
public WearableExtender clone() {
WearableExtender that = new WearableExtender();
that.mActions = new ArrayList(this.mActions);
that.mFlags = this.mFlags;
that.mDisplayIntent = this.mDisplayIntent;
that.mPages = new ArrayList(this.mPages);
that.mBackground = this.mBackground;
that.mContentIcon = this.mContentIcon;
that.mContentIconGravity = this.mContentIconGravity;
that.mContentActionIndex = this.mContentActionIndex;
that.mCustomSizePreset = this.mCustomSizePreset;
that.mCustomContentHeight = this.mCustomContentHeight;
that.mGravity = this.mGravity;
that.mHintScreenTimeout = this.mHintScreenTimeout;
return that;
}
public WearableExtender addAction(Action action) {
this.mActions.add(action);
return this;
}
public WearableExtender addActions(List<Action> actions) {
this.mActions.addAll(actions);
return this;
}
public WearableExtender clearActions() {
this.mActions.clear();
return this;
}
public List<Action> getActions() {
return this.mActions;
}
public WearableExtender setDisplayIntent(PendingIntent intent) {
this.mDisplayIntent = intent;
return this;
}
public PendingIntent getDisplayIntent() {
return this.mDisplayIntent;
}
public WearableExtender addPage(Notification page) {
this.mPages.add(page);
return this;
}
public WearableExtender addPages(List<Notification> pages) {
this.mPages.addAll(pages);
return this;
}
public WearableExtender clearPages() {
this.mPages.clear();
return this;
}
public List<Notification> getPages() {
return this.mPages;
}
public WearableExtender setBackground(Bitmap background) {
this.mBackground = background;
return this;
}
public Bitmap getBackground() {
return this.mBackground;
}
public WearableExtender setContentIcon(int icon) {
this.mContentIcon = icon;
return this;
}
public int getContentIcon() {
return this.mContentIcon;
}
public WearableExtender setContentIconGravity(int contentIconGravity) {
this.mContentIconGravity = contentIconGravity;
return this;
}
public int getContentIconGravity() {
return this.mContentIconGravity;
}
public WearableExtender setContentAction(int actionIndex) {
this.mContentActionIndex = actionIndex;
return this;
}
public int getContentAction() {
return this.mContentActionIndex;
}
public WearableExtender setGravity(int gravity) {
this.mGravity = gravity;
return this;
}
public int getGravity() {
return this.mGravity;
}
public WearableExtender setCustomSizePreset(int sizePreset) {
this.mCustomSizePreset = sizePreset;
return this;
}
public int getCustomSizePreset() {
return this.mCustomSizePreset;
}
public WearableExtender setCustomContentHeight(int height) {
this.mCustomContentHeight = height;
return this;
}
public int getCustomContentHeight() {
return this.mCustomContentHeight;
}
public WearableExtender setStartScrollBottom(boolean startScrollBottom) {
setFlag(8, startScrollBottom);
return this;
}
public boolean getStartScrollBottom() {
return (this.mFlags & 8) != 0;
}
public WearableExtender setContentIntentAvailableOffline(boolean contentIntentAvailableOffline) {
setFlag(1, contentIntentAvailableOffline);
return this;
}
public boolean getContentIntentAvailableOffline() {
return (this.mFlags & 1) != 0;
}
public WearableExtender setHintHideIcon(boolean hintHideIcon) {
setFlag(2, hintHideIcon);
return this;
}
public boolean getHintHideIcon() {
return (this.mFlags & 2) != 0;
}
public WearableExtender setHintShowBackgroundOnly(boolean hintShowBackgroundOnly) {
setFlag(4, hintShowBackgroundOnly);
return this;
}
public boolean getHintShowBackgroundOnly() {
return (this.mFlags & 4) != 0;
}
public WearableExtender setHintAvoidBackgroundClipping(boolean hintAvoidBackgroundClipping) {
setFlag(16, hintAvoidBackgroundClipping);
return this;
}
public boolean getHintAvoidBackgroundClipping() {
return (this.mFlags & 16) != 0;
}
public WearableExtender setHintScreenTimeout(int timeout) {
this.mHintScreenTimeout = timeout;
return this;
}
public int getHintScreenTimeout() {
return this.mHintScreenTimeout;
}
private void setFlag(int mask, boolean value) {
if (value) {
this.mFlags |= mask;
} else {
this.mFlags &= mask ^ -1;
}
}
}
static class NotificationCompatImplGingerbread extends NotificationCompatImplBase {
NotificationCompatImplGingerbread() {
}
public Notification build(Builder b, BuilderExtender extender) {
Notification result = b.mNotification;
result.setLatestEventInfo(b.mContext, b.mContentTitle, b.mContentText, b.mContentIntent);
result = NotificationCompatGingerbread.add(result, b.mContext, b.mContentTitle, b.mContentText, b.mContentIntent, b.mFullScreenIntent);
if (b.mPriority > 0) {
result.flags |= 128;
}
return result;
}
}
static class NotificationCompatImplHoneycomb extends NotificationCompatImplBase {
NotificationCompatImplHoneycomb() {
}
public Notification build(Builder b, BuilderExtender extender) {
return NotificationCompatHoneycomb.add(b.mContext, b.mNotification, b.mContentTitle, b.mContentText, b.mContentInfo, b.mTickerView, b.mNumber, b.mContentIntent, b.mFullScreenIntent, b.mLargeIcon);
}
}
static class NotificationCompatImplIceCreamSandwich extends NotificationCompatImplBase {
NotificationCompatImplIceCreamSandwich() {
}
public Notification build(Builder b, BuilderExtender extender) {
return extender.build(b, new android.support.v4.app.NotificationCompatIceCreamSandwich.Builder(b.mContext, b.mNotification, b.mContentTitle, b.mContentText, b.mContentInfo, b.mTickerView, b.mNumber, b.mContentIntent, b.mFullScreenIntent, b.mLargeIcon, b.mProgressMax, b.mProgress, b.mProgressIndeterminate));
}
}
static class NotificationCompatImplJellybean extends NotificationCompatImplBase {
NotificationCompatImplJellybean() {
}
public Notification build(Builder b, BuilderExtender extender) {
android.support.v4.app.NotificationCompatJellybean.Builder builder = new android.support.v4.app.NotificationCompatJellybean.Builder(b.mContext, b.mNotification, b.mContentTitle, b.mContentText, b.mContentInfo, b.mTickerView, b.mNumber, b.mContentIntent, b.mFullScreenIntent, b.mLargeIcon, b.mProgressMax, b.mProgress, b.mProgressIndeterminate, b.mUseChronometer, b.mPriority, b.mSubText, b.mLocalOnly, b.mExtras, b.mGroupKey, b.mGroupSummary, b.mSortKey);
NotificationCompat.addActionsToBuilder(builder, b.mActions);
NotificationCompat.addStyleToBuilderJellybean(builder, b.mStyle);
return extender.build(b, builder);
}
public Bundle getExtras(Notification n) {
return NotificationCompatJellybean.getExtras(n);
}
public int getActionCount(Notification n) {
return NotificationCompatJellybean.getActionCount(n);
}
public Action getAction(Notification n, int actionIndex) {
return (Action) NotificationCompatJellybean.getAction(n, actionIndex, Action.FACTORY, RemoteInput.FACTORY);
}
public Action[] getActionsFromParcelableArrayList(ArrayList<Parcelable> parcelables) {
return (Action[]) NotificationCompatJellybean.getActionsFromParcelableArrayList(parcelables, Action.FACTORY, RemoteInput.FACTORY);
}
public ArrayList<Parcelable> getParcelableArrayListForActions(Action[] actions) {
return NotificationCompatJellybean.getParcelableArrayListForActions(actions);
}
public boolean getLocalOnly(Notification n) {
return NotificationCompatJellybean.getLocalOnly(n);
}
public String getGroup(Notification n) {
return NotificationCompatJellybean.getGroup(n);
}
public boolean isGroupSummary(Notification n) {
return NotificationCompatJellybean.isGroupSummary(n);
}
public String getSortKey(Notification n) {
return NotificationCompatJellybean.getSortKey(n);
}
}
static class NotificationCompatImplKitKat extends NotificationCompatImplJellybean {
NotificationCompatImplKitKat() {
}
public Notification build(Builder b, BuilderExtender extender) {
android.support.v4.app.NotificationCompatKitKat.Builder builder = new android.support.v4.app.NotificationCompatKitKat.Builder(b.mContext, b.mNotification, b.mContentTitle, b.mContentText, b.mContentInfo, b.mTickerView, b.mNumber, b.mContentIntent, b.mFullScreenIntent, b.mLargeIcon, b.mProgressMax, b.mProgress, b.mProgressIndeterminate, b.mShowWhen, b.mUseChronometer, b.mPriority, b.mSubText, b.mLocalOnly, b.mPeople, b.mExtras, b.mGroupKey, b.mGroupSummary, b.mSortKey);
NotificationCompat.addActionsToBuilder(builder, b.mActions);
NotificationCompat.addStyleToBuilderJellybean(builder, b.mStyle);
return extender.build(b, builder);
}
public Bundle getExtras(Notification n) {
return NotificationCompatKitKat.getExtras(n);
}
public int getActionCount(Notification n) {
return NotificationCompatKitKat.getActionCount(n);
}
public Action getAction(Notification n, int actionIndex) {
return (Action) NotificationCompatKitKat.getAction(n, actionIndex, Action.FACTORY, RemoteInput.FACTORY);
}
public boolean getLocalOnly(Notification n) {
return NotificationCompatKitKat.getLocalOnly(n);
}
public String getGroup(Notification n) {
return NotificationCompatKitKat.getGroup(n);
}
public boolean isGroupSummary(Notification n) {
return NotificationCompatKitKat.isGroupSummary(n);
}
public String getSortKey(Notification n) {
return NotificationCompatKitKat.getSortKey(n);
}
}
static class NotificationCompatImplApi20 extends NotificationCompatImplKitKat {
NotificationCompatImplApi20() {
}
public Notification build(Builder b, BuilderExtender extender) {
android.support.v4.app.NotificationCompatApi20.Builder builder = new android.support.v4.app.NotificationCompatApi20.Builder(b.mContext, b.mNotification, b.mContentTitle, b.mContentText, b.mContentInfo, b.mTickerView, b.mNumber, b.mContentIntent, b.mFullScreenIntent, b.mLargeIcon, b.mProgressMax, b.mProgress, b.mProgressIndeterminate, b.mShowWhen, b.mUseChronometer, b.mPriority, b.mSubText, b.mLocalOnly, b.mPeople, b.mExtras, b.mGroupKey, b.mGroupSummary, b.mSortKey);
NotificationCompat.addActionsToBuilder(builder, b.mActions);
NotificationCompat.addStyleToBuilderJellybean(builder, b.mStyle);
return extender.build(b, builder);
}
public Action getAction(Notification n, int actionIndex) {
return (Action) NotificationCompatApi20.getAction(n, actionIndex, Action.FACTORY, RemoteInput.FACTORY);
}
public Action[] getActionsFromParcelableArrayList(ArrayList<Parcelable> parcelables) {
return (Action[]) NotificationCompatApi20.getActionsFromParcelableArrayList(parcelables, Action.FACTORY, RemoteInput.FACTORY);
}
public ArrayList<Parcelable> getParcelableArrayListForActions(Action[] actions) {
return NotificationCompatApi20.getParcelableArrayListForActions(actions);
}
public boolean getLocalOnly(Notification n) {
return NotificationCompatApi20.getLocalOnly(n);
}
public String getGroup(Notification n) {
return NotificationCompatApi20.getGroup(n);
}
public boolean isGroupSummary(Notification n) {
return NotificationCompatApi20.isGroupSummary(n);
}
public String getSortKey(Notification n) {
return NotificationCompatApi20.getSortKey(n);
}
}
static class NotificationCompatImplApi21 extends NotificationCompatImplApi20 {
NotificationCompatImplApi21() {
}
public Notification build(Builder b, BuilderExtender extender) {
android.support.v4.app.NotificationCompatApi21.Builder builder = new android.support.v4.app.NotificationCompatApi21.Builder(b.mContext, b.mNotification, b.mContentTitle, b.mContentText, b.mContentInfo, b.mTickerView, b.mNumber, b.mContentIntent, b.mFullScreenIntent, b.mLargeIcon, b.mProgressMax, b.mProgress, b.mProgressIndeterminate, b.mShowWhen, b.mUseChronometer, b.mPriority, b.mSubText, b.mLocalOnly, b.mCategory, b.mPeople, b.mExtras, b.mColor, b.mVisibility, b.mPublicVersion, b.mGroupKey, b.mGroupSummary, b.mSortKey);
NotificationCompat.addActionsToBuilder(builder, b.mActions);
NotificationCompat.addStyleToBuilderJellybean(builder, b.mStyle);
return extender.build(b, builder);
}
public String getCategory(Notification notif) {
return NotificationCompatApi21.getCategory(notif);
}
public Bundle getBundleForUnreadConversation(UnreadConversation uc) {
return NotificationCompatApi21.getBundleForUnreadConversation(uc);
}
public UnreadConversation getUnreadConversationFromBundle(Bundle b, Factory factory, RemoteInput.Factory remoteInputFactory) {
return NotificationCompatApi21.getUnreadConversationFromBundle(b, factory, remoteInputFactory);
}
}
private static void addActionsToBuilder(NotificationBuilderWithActions builder, ArrayList<Action> actions) {
Iterator i$ = actions.iterator();
while (i$.hasNext()) {
builder.addAction((Action) i$.next());
}
}
private static void addStyleToBuilderJellybean(NotificationBuilderWithBuilderAccessor builder, Style style) {
if (style == null) {
return;
}
if (style instanceof BigTextStyle) {
BigTextStyle bigTextStyle = (BigTextStyle) style;
NotificationCompatJellybean.addBigTextStyle(builder, bigTextStyle.mBigContentTitle, bigTextStyle.mSummaryTextSet, bigTextStyle.mSummaryText, bigTextStyle.mBigText);
} else if (style instanceof InboxStyle) {
InboxStyle inboxStyle = (InboxStyle) style;
NotificationCompatJellybean.addInboxStyle(builder, inboxStyle.mBigContentTitle, inboxStyle.mSummaryTextSet, inboxStyle.mSummaryText, inboxStyle.mTexts);
} else if (style instanceof BigPictureStyle) {
BigPictureStyle bigPictureStyle = (BigPictureStyle) style;
NotificationCompatJellybean.addBigPictureStyle(builder, bigPictureStyle.mBigContentTitle, bigPictureStyle.mSummaryTextSet, bigPictureStyle.mSummaryText, bigPictureStyle.mPicture, bigPictureStyle.mBigLargeIcon, bigPictureStyle.mBigLargeIconSet);
}
}
static {
if (VERSION.SDK_INT >= 21) {
IMPL = new NotificationCompatImplApi21();
} else if (VERSION.SDK_INT >= 20) {
IMPL = new NotificationCompatImplApi20();
} else if (VERSION.SDK_INT >= 19) {
IMPL = new NotificationCompatImplKitKat();
} else if (VERSION.SDK_INT >= 16) {
IMPL = new NotificationCompatImplJellybean();
} else if (VERSION.SDK_INT >= 14) {
IMPL = new NotificationCompatImplIceCreamSandwich();
} else if (VERSION.SDK_INT >= 11) {
IMPL = new NotificationCompatImplHoneycomb();
} else if (VERSION.SDK_INT >= 9) {
IMPL = new NotificationCompatImplGingerbread();
} else {
IMPL = new NotificationCompatImplBase();
}
}
private static Notification[] getNotificationArrayFromBundle(Bundle bundle, String key) {
Parcelable[] array = bundle.getParcelableArray(key);
if ((array instanceof Notification[]) || array == null) {
return (Notification[]) array;
}
Notification[] typedArray = new Notification[array.length];
for (int i = 0; i < array.length; i++) {
typedArray[i] = (Notification) array[i];
}
bundle.putParcelableArray(key, typedArray);
return typedArray;
}
public static Bundle getExtras(Notification notif) {
return IMPL.getExtras(notif);
}
public static int getActionCount(Notification notif) {
return IMPL.getActionCount(notif);
}
public static Action getAction(Notification notif, int actionIndex) {
return IMPL.getAction(notif, actionIndex);
}
public static String getCategory(Notification notif) {
return IMPL.getCategory(notif);
}
public static boolean getLocalOnly(Notification notif) {
return IMPL.getLocalOnly(notif);
}
public static String getGroup(Notification notif) {
return IMPL.getGroup(notif);
}
public static boolean isGroupSummary(Notification notif) {
return IMPL.isGroupSummary(notif);
}
public static String getSortKey(Notification notif) {
return IMPL.getSortKey(notif);
}
}