Merge "Prevent multiple calls of ActivityThread.systemMain()" into rvc-qpr-dev

This commit is contained in:
Sungsoo Lim
2021-01-26 01:39:30 +00:00
committed by Android (Google) Code Review

View File

@@ -64,7 +64,7 @@ public class MediaShellCommand extends ShellCommand {
}
if (sThread == null) {
Looper.prepare();
sThread = ActivityThread.systemMain();
sThread = ActivityThread.currentActivityThread();
Context context = sThread.getSystemContext();
sMediaSessionManager =
(MediaSessionManager) context.getSystemService(Context.MEDIA_SESSION_SERVICE);