Prevent multiple calls of ActivityThread.systemMain()
Bug: 170591440
Test: manually
Change-Id: Iba6d10e5203fa1c1f96c85e39a57483ee26e8111
(cherry picked from commit 8f2c59c0cb)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user