Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a7bb6e1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove Session2CommandGroup.Builder methods"

parents 36ae1ded cf89089b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -26404,10 +26404,8 @@ package android.media {
    ctor public Session2CommandGroup.Builder();
    ctor public Session2CommandGroup.Builder(@NonNull android.media.Session2CommandGroup);
    method @NonNull public android.media.Session2CommandGroup.Builder addCommand(@NonNull android.media.Session2Command);
    method @NonNull public android.media.Session2CommandGroup.Builder addCommand(int);
    method @NonNull public android.media.Session2CommandGroup build();
    method @NonNull public android.media.Session2CommandGroup.Builder removeCommand(@NonNull android.media.Session2Command);
    method @NonNull public android.media.Session2CommandGroup.Builder removeCommand(int);
  }
  public final class Session2Token implements android.os.Parcelable {
+0 −31
Original line number Diff line number Diff line
@@ -166,22 +166,6 @@ public final class Session2CommandGroup implements Parcelable {
            return this;
        }

        /**
         * Adds a predefined command with given {@code commandCode} to this command group.
         *
         * @param commandCode A command code to add.
         *                    Shouldn't be {@link Session2Command#COMMAND_CODE_CUSTOM}.
         */
        @NonNull
        public Builder addCommand(int commandCode) {
            if (commandCode == COMMAND_CODE_CUSTOM) {
                throw new IllegalArgumentException(
                        "Use addCommand(Session2Command) for COMMAND_CODE_CUSTOM.");
            }
            mCommands.add(new Session2Command(commandCode));
            return this;
        }

        /**
         * Removes a command from this group which matches given {@code command}.
         *
@@ -196,21 +180,6 @@ public final class Session2CommandGroup implements Parcelable {
            return this;
        }

        /**
         * Removes a command from this group which matches given {@code commandCode}.
         *
         * @param commandCode A command code to find.
         *                    Shouldn't be {@link Session2Command#COMMAND_CODE_CUSTOM}.
         */
        @NonNull
        public Builder removeCommand(int commandCode) {
            if (commandCode == COMMAND_CODE_CUSTOM) {
                throw new IllegalArgumentException("commandCode shouldn't be COMMAND_CODE_CUSTOM");
            }
            mCommands.remove(new Session2Command(commandCode));
            return this;
        }

        /**
         * Builds {@link Session2CommandGroup}.
         *