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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad8fb5c18c68300b2c01548abd3798cfccb445a5
This commit is contained in:
Sungsoo Lim
2021-01-26 02:14:06 +00:00
committed by Automerger Merge Worker

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);