Loading android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,5 +20,6 @@ <option name="tests-config-file" value="pts_bot_tests_config.json" /> <option name="physical" value="false" /> <option name="profile" value="A2DP/SRC" /> <option name="profile" value="AVDTP/SRC" /> </test> </configuration> android/pandora/server/configs/pts_bot_tests_config.json +2 −1 Original line number Diff line number Diff line Loading @@ -22,10 +22,10 @@ "AVDTP/SRC/ACP/SIG/SMG/BV-12-C", "AVDTP/SRC/ACP/SIG/SMG/BV-16-C", "AVDTP/SRC/ACP/SIG/SMG/BV-18-C", "AVDTP/SRC/ACP/SIG/SMG/BV-20-C", "AVDTP/SRC/ACP/SIG/SMG/BV-22-C", "AVDTP/SRC/ACP/SIG/SMG/BV-24-C", "AVDTP/SRC/ACP/SIG/SMG/BV-26-C", "AVDTP/SRC/ACP/SIG/SMG/BV-14-C", "AVDTP/SRC/ACP/SIG/SMG/ESR04/BI-28-C", "AVDTP/SRC/ACP/SIG/SYN/BV-06-C", "AVDTP/SRC/ACP/TRA/BTR/BI-01-C", Loading Loading @@ -56,6 +56,7 @@ "A2DP/SRC/SYN/BV-02-I", "AVDTP/SRC/ACP/SIG/SMG/BI-11-C", "AVDTP/SRC/ACP/SIG/SMG/BI-23-C", "AVDTP/SRC/ACP/SIG/SMG/BV-14-C", "AVDTP/SRC/ACP/SIG/SMG/ESR05/BV-14-C", "AVDTP/SRC/INT/SIG/SMG/BV-11-C", "AVDTP/SRC/INT/SIG/SMG/BV-13-C", Loading android/pandora/server/src/com/android/pandora/Utils.kt +21 −15 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.flow.first import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withTimeout /** * Creates a cold flow of intents based on an intent filter. If used multiple times in a same class, Loading Loading @@ -60,6 +61,8 @@ fun intentFlow(context: Context, intentFilter: IntentFilter) = callbackFlow { * @param T the type of gRPC response. * @param scope coroutine scope used to run the coroutine. * @param responseObserver the gRPC stream observer on which to send the response. * @param timeout the duration in seconds after which the coroutine is automatically cancelled and * returns a timeout error. Default: 60s. * @param block the suspended function to execute to get the response. * @return reference to the coroutine as a Job. * Loading @@ -79,13 +82,16 @@ fun intentFlow(context: Context, intentFilter: IntentFilter) = callbackFlow { fun <T> grpcUnary( scope: CoroutineScope, responseObserver: StreamObserver<T>, timeout: Long = 60, block: suspend () -> T ): Job { return scope.launch { try { withTimeout(timeout * 1000) { val response = block() responseObserver.onNext(response) responseObserver.onCompleted() } } catch (e: Throwable) { e.printStackTrace() responseObserver.onError(e) Loading Loading
android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,5 +20,6 @@ <option name="tests-config-file" value="pts_bot_tests_config.json" /> <option name="physical" value="false" /> <option name="profile" value="A2DP/SRC" /> <option name="profile" value="AVDTP/SRC" /> </test> </configuration>
android/pandora/server/configs/pts_bot_tests_config.json +2 −1 Original line number Diff line number Diff line Loading @@ -22,10 +22,10 @@ "AVDTP/SRC/ACP/SIG/SMG/BV-12-C", "AVDTP/SRC/ACP/SIG/SMG/BV-16-C", "AVDTP/SRC/ACP/SIG/SMG/BV-18-C", "AVDTP/SRC/ACP/SIG/SMG/BV-20-C", "AVDTP/SRC/ACP/SIG/SMG/BV-22-C", "AVDTP/SRC/ACP/SIG/SMG/BV-24-C", "AVDTP/SRC/ACP/SIG/SMG/BV-26-C", "AVDTP/SRC/ACP/SIG/SMG/BV-14-C", "AVDTP/SRC/ACP/SIG/SMG/ESR04/BI-28-C", "AVDTP/SRC/ACP/SIG/SYN/BV-06-C", "AVDTP/SRC/ACP/TRA/BTR/BI-01-C", Loading Loading @@ -56,6 +56,7 @@ "A2DP/SRC/SYN/BV-02-I", "AVDTP/SRC/ACP/SIG/SMG/BI-11-C", "AVDTP/SRC/ACP/SIG/SMG/BI-23-C", "AVDTP/SRC/ACP/SIG/SMG/BV-14-C", "AVDTP/SRC/ACP/SIG/SMG/ESR05/BV-14-C", "AVDTP/SRC/INT/SIG/SMG/BV-11-C", "AVDTP/SRC/INT/SIG/SMG/BV-13-C", Loading
android/pandora/server/src/com/android/pandora/Utils.kt +21 −15 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.flow.first import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withTimeout /** * Creates a cold flow of intents based on an intent filter. If used multiple times in a same class, Loading Loading @@ -60,6 +61,8 @@ fun intentFlow(context: Context, intentFilter: IntentFilter) = callbackFlow { * @param T the type of gRPC response. * @param scope coroutine scope used to run the coroutine. * @param responseObserver the gRPC stream observer on which to send the response. * @param timeout the duration in seconds after which the coroutine is automatically cancelled and * returns a timeout error. Default: 60s. * @param block the suspended function to execute to get the response. * @return reference to the coroutine as a Job. * Loading @@ -79,13 +82,16 @@ fun intentFlow(context: Context, intentFilter: IntentFilter) = callbackFlow { fun <T> grpcUnary( scope: CoroutineScope, responseObserver: StreamObserver<T>, timeout: Long = 60, block: suspend () -> T ): Job { return scope.launch { try { withTimeout(timeout * 1000) { val response = block() responseObserver.onNext(response) responseObserver.onCompleted() } } catch (e: Throwable) { e.printStackTrace() responseObserver.onError(e) Loading