summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jin Seok Park <jinpark@google.com> 2019-04-16 06:47:18 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-04-16 06:47:18 +0000
commitb225cffabeb4428e6c3c2860b35a30c3a93bbead (patch)
treeef6de8429ff0ea46e11e0af599918066a75e67b1
parente6b9bdf4d061a25fe10e9b73c1dcac03268f2245 (diff)
parentdbee428755b02c37f4cb33436732345cfb14ec31 (diff)
Merge "Rename Session2Command methods" into qt-dev
-rw-r--r--api/current.txt4
-rw-r--r--media/apex/java/android/media/Session2Command.java34
2 files changed, 19 insertions, 19 deletions
diff --git a/api/current.txt b/api/current.txt
index 72e32368d91c..eb244e4cd1eb 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -26158,8 +26158,8 @@ package android.media {
ctor public Session2Command(@NonNull String, @Nullable android.os.Bundle);
method public int describeContents();
method public int getCommandCode();
- method @Nullable public String getCustomCommand();
- method @Nullable public android.os.Bundle getExtras();
+ method @Nullable public String getCustomAction();
+ method @Nullable public android.os.Bundle getCustomExtras();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field public static final int COMMAND_CODE_CUSTOM = 0; // 0x0
field @NonNull public static final android.os.Parcelable.Creator<android.media.Session2Command> CREATOR;
diff --git a/media/apex/java/android/media/Session2Command.java b/media/apex/java/android/media/Session2Command.java
index 7f73dc123063..7c752e198f3a 100644
--- a/media/apex/java/android/media/Session2Command.java
+++ b/media/apex/java/android/media/Session2Command.java
@@ -30,7 +30,7 @@ import java.util.Objects;
* <p>
* If {@link #getCommandCode()} isn't {@link #COMMAND_CODE_CUSTOM}), it's predefined command.
* If {@link #getCommandCode()} is {@link #COMMAND_CODE_CUSTOM}), it's custom command and
- * {@link #getCustomCommand()} shouldn't be {@code null}.
+ * {@link #getCustomAction()} shouldn't be {@code null}.
* <p>
* Refer to the
* <a href="{@docRoot}reference/androidx/media2/SessionCommand2.html">AndroidX SessionCommand</a>
@@ -63,8 +63,8 @@ public final class Session2Command implements Parcelable {
private final int mCommandCode;
// Nonnull if it's custom command
- private final String mCustomCommand;
- private final Bundle mExtras;
+ private final String mCustomAction;
+ private final Bundle mCustomExtras;
/**
* Constructor for creating a command predefined in AndroidX media2.
@@ -76,8 +76,8 @@ public final class Session2Command implements Parcelable {
throw new IllegalArgumentException("commandCode shouldn't be COMMAND_CODE_CUSTOM");
}
mCommandCode = commandCode;
- mCustomCommand = null;
- mExtras = null;
+ mCustomAction = null;
+ mCustomExtras = null;
}
/**
@@ -91,8 +91,8 @@ public final class Session2Command implements Parcelable {
throw new IllegalArgumentException("action shouldn't be null");
}
mCommandCode = COMMAND_CODE_CUSTOM;
- mCustomCommand = action;
- mExtras = extras;
+ mCustomAction = action;
+ mCustomExtras = extras;
}
/**
@@ -101,8 +101,8 @@ public final class Session2Command implements Parcelable {
@SuppressWarnings("WeakerAccess") /* synthetic access */
Session2Command(Parcel in) {
mCommandCode = in.readInt();
- mCustomCommand = in.readString();
- mExtras = in.readBundle();
+ mCustomAction = in.readString();
+ mCustomExtras = in.readBundle();
}
/**
@@ -118,8 +118,8 @@ public final class Session2Command implements Parcelable {
* This will return {@code null} for a predefined command.
*/
@Nullable
- public String getCustomCommand() {
- return mCustomCommand;
+ public String getCustomAction() {
+ return mCustomAction;
}
/**
@@ -127,8 +127,8 @@ public final class Session2Command implements Parcelable {
* This will return {@code null} for a predefined command.
*/
@Nullable
- public Bundle getExtras() {
- return mExtras;
+ public Bundle getCustomExtras() {
+ return mCustomExtras;
}
@Override
@@ -142,8 +142,8 @@ public final class Session2Command implements Parcelable {
throw new IllegalArgumentException("parcel shouldn't be null");
}
dest.writeInt(mCommandCode);
- dest.writeString(mCustomCommand);
- dest.writeBundle(mExtras);
+ dest.writeString(mCustomAction);
+ dest.writeBundle(mCustomExtras);
}
@Override
@@ -153,12 +153,12 @@ public final class Session2Command implements Parcelable {
}
Session2Command other = (Session2Command) obj;
return mCommandCode == other.mCommandCode
- && TextUtils.equals(mCustomCommand, other.mCustomCommand);
+ && TextUtils.equals(mCustomAction, other.mCustomAction);
}
@Override
public int hashCode() {
- return Objects.hash(mCustomCommand, mCommandCode);
+ return Objects.hash(mCustomAction, mCommandCode);
}
/**