Skip to content

Commit 513b4ba

Browse files
icbakermarcbaechinger
authored andcommitted
Avoid implicit call to deprecated zero-arg Handler constructor
See [docs](https://developer.android.com/reference/android/os/Handler#Handler()) for why the zero-arg constructor is deprecated. PiperOrigin-RevId: 832311407 (cherry picked from commit 00c9a3b)
1 parent c84692f commit 513b4ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/session/src/main/java/androidx/media3/session/legacy/MediaBrowserServiceCompat.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package androidx.media3.session.legacy;
1717

18+
import static android.os.Looper.myLooper;
1819
import static androidx.annotation.RestrictTo.Scope.LIBRARY;
1920
import static androidx.media3.session.legacy.MediaBrowserProtocol.CLIENT_MSG_ADD_SUBSCRIPTION;
2021
import static androidx.media3.session.legacy.MediaBrowserProtocol.CLIENT_MSG_GET_MEDIA_ITEM;
@@ -564,6 +565,7 @@ private static final class ServiceHandler extends Handler {
564565

565566
@MainThread
566567
ServiceHandler(MediaBrowserServiceCompat service) {
568+
super(checkNotNull(myLooper()));
567569
this.service = service;
568570
}
569571

0 commit comments

Comments
 (0)