Lines Matching defs:CustomAction

265     private List<PlaybackStateCompat.CustomAction> mCustomActions;
273 List<PlaybackStateCompat.CustomAction> customActions,
295 mCustomActions = in.createTypedArrayList(CustomAction.CREATOR);
411 public List<PlaybackStateCompat.CustomAction> getCustomActions() {
469 List<PlaybackStateCompat.CustomAction> customActions = null;
473 customActions.add(CustomAction.fromCustomAction(customActionObj));
510 for (PlaybackStateCompat.CustomAction customAction : mCustomActions) {
540 * {@link PlaybackStateCompat.CustomAction CustomActions} can be used to
544 public static final class CustomAction implements Parcelable {
553 * Use {@link PlaybackStateCompat.CustomAction.Builder#build()}.
555 private CustomAction(String action, CharSequence name, int icon, Bundle extras) {
562 private CustomAction(Parcel in) {
584 * {@link android.media.session.PlaybackState.CustomAction} object.
589 * @param customActionObj A {@link android.media.session.PlaybackState.CustomAction} object,
591 * @return An equivalent {@link PlaybackStateCompat.CustomAction} object, or null if none.
593 public static PlaybackStateCompat.CustomAction fromCustomAction(Object customActionObj) {
598 PlaybackStateCompat.CustomAction customAction = new PlaybackStateCompat.CustomAction(
599 PlaybackStateCompatApi21.CustomAction.getAction(customActionObj),
600 PlaybackStateCompatApi21.CustomAction.getName(customActionObj),
601 PlaybackStateCompatApi21.CustomAction.getIcon(customActionObj),
602 PlaybackStateCompatApi21.CustomAction.getExtras(customActionObj));
608 * Gets the underlying framework {@link android.media.session.PlaybackState.CustomAction}
614 * @return An equivalent {@link android.media.session.PlaybackState.CustomAction} object,
622 mCustomActionObj = PlaybackStateCompatApi21.CustomAction.newInstance(mAction,
627 public static final Parcelable.Creator<PlaybackStateCompat.CustomAction> CREATOR
628 = new Parcelable.Creator<PlaybackStateCompat.CustomAction>() {
631 public PlaybackStateCompat.CustomAction createFromParcel(Parcel p) {
632 return new PlaybackStateCompat.CustomAction(p);
636 public PlaybackStateCompat.CustomAction[] newArray(int size) {
637 return new PlaybackStateCompat.CustomAction[size];
642 * Returns the action of the {@link CustomAction}.
644 * @return The action of the {@link CustomAction}.
653 * @return The display name of this {@link CustomAction}.
676 * @return Optional arguments for the {@link CustomAction}.
691 * Builder for {@link CustomAction} objects.
700 * Creates a {@link CustomAction} builder with the id, name, and
703 * @param action The action of the {@link CustomAction}.
704 * @param name The display name of the {@link CustomAction}. This
707 * @param icon The icon resource id of the {@link CustomAction}.
715 "You must specify an action to build a CustomAction.");
719 "You must specify a name to build a CustomAction.");
723 "You must specify an icon resource id to build a CustomAction.");
731 * Set optional extras for the {@link CustomAction}. These extras
736 * @param extras Optional extras for the {@link CustomAction}.
745 * Build and return the {@link CustomAction} instance with the
748 * @return A new {@link CustomAction} instance.
750 public CustomAction build() {
751 return new CustomAction(mAction, mName, mIcon, mExtras);
760 private final List<PlaybackStateCompat.CustomAction> mCustomActions = new ArrayList<>();
937 return addCustomAction(new PlaybackStateCompat.CustomAction(action, name, icon, null));
951 public Builder addCustomAction(PlaybackStateCompat.CustomAction customAction) {
954 "You may not add a null CustomAction to PlaybackStateCompat.");