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

Commit 17021c66 authored by Caitlin Cassidy's avatar Caitlin Cassidy Committed by Automerger Merge Worker
Browse files

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

Merge "[Media TTT] Update the test adb commands to be able to see the default icon on the sender chip (used for a11y testing)." into tm-dev am: fd5d2c28

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17293233

Change-Id: Ie782f3df4e076ff20307b709a24c0970792202c2
parents 04d3b1ca fd5d2c28
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -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,
                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)
            }