From e2e6411d7042c636a3e24770ed3301e9c7619888 Mon Sep 17 00:00:00 2001 From: tonihei Date: Mon, 17 Apr 2023 16:08:37 +0100 Subject: [PATCH] Fix thread access when creating notifications for media sessions The sessions may have different application threads for their players, and the service with its notification provider runs on the main thread. To ensure everything runs on the correct thread, this change labels methods where needed and fixes thread access in some places. Issue: androidx/media#318 PiperOrigin-RevId: 524849598 (cherry picked from commit 73c216d1204dcb4ef7c23bd3cc7d15c4bc40d3d7) --- testutils/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/testutils/build.gradle b/testutils/build.gradle index 11a8d1b76e7..7f46a7cc1a3 100644 --- a/testutils/build.gradle +++ b/testutils/build.gradle @@ -20,6 +20,7 @@ dependencies { api 'androidx.test.ext:truth:' + androidxTestTruthVersion api 'junit:junit:' + junitVersion api 'com.google.truth:truth:' + truthVersion + api 'com.google.truth.extensions:truth-java8-extension:' + truthVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion