[Media TTT] Update the test adb commands to be able to see the default

icon on the sender chip (used for a11y testing).

Test: manual (verified adb commands still work)
Bug: 215562505
Change-Id: If1d9009b9f4477d087387508e8488fd2b1510153
This commit is contained in:
Caitlin Cassidy
2022-03-21 16:43:35 +00:00
parent 497007a173
commit b8d933ce8e

View File

@@ -66,11 +66,14 @@ class MediaTttCommandLineHelper @Inject constructor(
as StatusBarManager
val routeInfo = MediaRoute2Info.Builder("id", args[0])
.addFeature("feature")
.setPackageName(TEST_PACKAGE_NAME)
.build()
val useAppIcon = !(args.size >= 3 && args[2] == "useAppIcon=false")
if (useAppIcon) {
routeInfo.setPackageName(TEST_PACKAGE_NAME)
}
statusBarManager.updateMediaTapToTransferSenderDisplay(
displayState,
routeInfo,
displayState,
routeInfo.build(),
getUndoExecutor(displayState),
getUndoCallback(displayState)
)
@@ -106,7 +109,8 @@ class MediaTttCommandLineHelper @Inject constructor(
}
override fun help(pw: PrintWriter) {
pw.println("Usage: adb shell cmd statusbar $SENDER_COMMAND <deviceName> <chipState>")
pw.println("Usage: adb shell cmd statusbar $SENDER_COMMAND " +
"<deviceName> <chipState> useAppIcon=[true|false]")
}
}
@@ -128,7 +132,8 @@ class MediaTttCommandLineHelper @Inject constructor(
as StatusBarManager
val routeInfo = MediaRoute2Info.Builder("id", "Test Name")
.addFeature("feature")
if (args.size >= 2 && args[1] == "useAppIcon=true") {
val useAppIcon = !(args.size >= 2 && args[1] == "useAppIcon=false")
if (useAppIcon) {
routeInfo.setPackageName(TEST_PACKAGE_NAME)
}