aboutsummaryrefslogtreecommitdiff
path: root/TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java
diff options
context:
space:
mode:
authorYabin Huang <yabinh@google.com>2019-09-03 13:46:42 -0700
committerYabin Huang <yabinh@google.com>2019-09-24 11:57:00 -0700
commit0ff14f2087fad2a0570bf0fafb6749fc56a42cc3 (patch)
treed2e11c26c81e9e46ea09e97a977221a5332c27f4 /TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java
parent5c03d5cdb6f55fc566adce0584ace596e9494f39 (diff)
downloadtests-0ff14f2087fad2a0570bf0fafb6749fc56a42cc3.tar.gz
Add some test cases in test media app
Fixes: 139295650 Test: manual Change-Id: I4c2443992fe0fa7e9a21397aa1c47ba9ce62579f
Diffstat (limited to 'TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java')
-rw-r--r--TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java b/TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java
index f6ec8af..491f940 100644
--- a/TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java
+++ b/TestMediaApp/src/com/android/car/media/testmediaapp/TmaMediaEvent.java
@@ -53,7 +53,7 @@ public class TmaMediaEvent {
public static final TmaMediaEvent INSTANT_PLAYBACK =
new TmaMediaEvent(EventState.PLAYING, StateErrorCode.UNKNOWN_ERROR, null, null,
- ResolutionIntent.NONE, 0, null);
+ ResolutionIntent.NONE, Action.NONE, 0, null);
/** The name of each entry is the value used in the json file. */
public enum EventState {
@@ -105,23 +105,31 @@ public class TmaMediaEvent {
PREFS
}
+ /** The name of each entry is the value used in the json file. */
+ public enum Action {
+ NONE,
+ RESET_METADATA
+ }
+
final EventState mState;
final StateErrorCode mErrorCode;
final String mErrorMessage;
final String mActionLabel;
final ResolutionIntent mResolutionIntent;
+ final Action mAction;
/** How long to wait before sending the event to the app. */
final int mPostDelayMs;
private final String mExceptionClass;
public TmaMediaEvent(EventState state, StateErrorCode errorCode, String errorMessage,
- String actionLabel, ResolutionIntent resolutionIntent, int postDelayMs,
+ String actionLabel, ResolutionIntent resolutionIntent, Action action, int postDelayMs,
String exceptionClass) {
mState = state;
mErrorCode = errorCode;
mErrorMessage = errorMessage;
mActionLabel = actionLabel;
mResolutionIntent = resolutionIntent;
+ mAction = action;
mPostDelayMs = postDelayMs;
mExceptionClass = exceptionClass;
}
@@ -152,6 +160,7 @@ public class TmaMediaEvent {
", mErrorMessage='" + mErrorMessage + '\'' +
", mActionLabel='" + mActionLabel + '\'' +
", mResolutionIntent=" + mResolutionIntent +
+ ", mAction=" + mAction +
", mPostDelayMs=" + mPostDelayMs +
", mExceptionClass=" + mExceptionClass +
'}';