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;
- field public static final int RESULT_ERROR_UNKNOWN_ERROR = -1; // 0xffffffff
- field public static final int RESULT_INFO_SKIPPED = 1; // 0x1
- field public static final int RESULT_SUCCESS = 0; // 0x0
}
public static final class Session2Command.Result {
ctor public Session2Command.Result(int, @Nullable android.os.Bundle);
method public int getResultCode();
method @Nullable public android.os.Bundle getResultData();
+ field public static final int RESULT_ERROR_UNKNOWN_ERROR = -1; // 0xffffffff
+ field public static final int RESULT_INFO_SKIPPED = 1; // 0x1
+ field public static final int RESULT_SUCCESS = 0; // 0x0
}
public final class Session2CommandGroup implements android.os.Parcelable {
import static android.media.MediaConstants.KEY_PLAYBACK_ACTIVE;
import static android.media.MediaConstants.KEY_SESSION2LINK;
import static android.media.MediaConstants.KEY_TOKEN_EXTRAS;
-import static android.media.Session2Command.RESULT_ERROR_UNKNOWN_ERROR;
-import static android.media.Session2Command.RESULT_INFO_SKIPPED;
+import static android.media.Session2Command.Result.RESULT_ERROR_UNKNOWN_ERROR;
+import static android.media.Session2Command.Result.RESULT_INFO_SKIPPED;
import static android.media.Session2Token.TYPE_SESSION;
import android.annotation.NonNull;
MediaController2.this, command, args);
if (resultReceiver != null) {
if (result == null) {
- resultReceiver.send(Session2Command.RESULT_INFO_SKIPPED, null);
+ resultReceiver.send(RESULT_INFO_SKIPPED, null);
} else {
resultReceiver.send(result.getResultCode(), result.getResultData());
}
import static android.media.MediaConstants.KEY_PLAYBACK_ACTIVE;
import static android.media.MediaConstants.KEY_SESSION2LINK;
import static android.media.MediaConstants.KEY_TOKEN_EXTRAS;
-import static android.media.Session2Command.RESULT_ERROR_UNKNOWN_ERROR;
-import static android.media.Session2Command.RESULT_INFO_SKIPPED;
+import static android.media.Session2Command.Result.RESULT_ERROR_UNKNOWN_ERROR;
+import static android.media.Session2Command.Result.RESULT_INFO_SKIPPED;
import static android.media.Session2Token.TYPE_SESSION;
import android.annotation.NonNull;
MediaSession2.this, controllerInfo, command, args);
if (resultReceiver != null) {
if (result == null) {
- resultReceiver.send(Session2Command.RESULT_INFO_SKIPPED, null);
+ resultReceiver.send(RESULT_INFO_SKIPPED, null);
} else {
resultReceiver.send(result.getResultCode(), result.getResultData());
}
*/
public static final int COMMAND_CODE_CUSTOM = 0;
- /**
- * Result code representing that the command is skipped or canceled. For an example, a seek
- * command can be skipped if it is followed by another seek command.
- */
- public static final int RESULT_INFO_SKIPPED = 1;
-
- /**
- * Result code representing that the command is successfully completed.
- */
- public static final int RESULT_SUCCESS = 0;
-
- /**
- * Result code represents that call is ended with an unknown error.
- */
- public static final int RESULT_ERROR_UNKNOWN_ERROR = -1;
-
public static final @android.annotation.NonNull Parcelable.Creator<Session2Command> CREATOR =
new Parcelable.Creator<Session2Command>() {
@Override
private final Bundle mResultData;
/**
+ * Result code representing that the command is skipped or canceled. For an example, a seek
+ * command can be skipped if it is followed by another seek command.
+ */
+ public static final int RESULT_INFO_SKIPPED = 1;
+
+ /**
+ * Result code representing that the command is successfully completed.
+ */
+ public static final int RESULT_SUCCESS = 0;
+
+ /**
+ * Result code represents that call is ended with an unknown error.
+ */
+ public static final int RESULT_ERROR_UNKNOWN_ERROR = -1;
+
+ /**
* Constructor of {@link Result}.
*
* @param resultCode result code