Skip to content

Commit 04b74ec

Browse files
committed
SystemServer: Looper's getMainLooper to return ServerThread
Fix to ensure Context.getMainLooper and Looper.getMainLooper returns ServerThread for system_server. Currently, Looper's getMainLooper returns null. Change-Id: I5324a1cc00e27a79ba97836a9377a584e6f76b15
1 parent 9d25b82 commit 04b74ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/java/com/android/server/SystemServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void run() {
7979
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_SYSTEM_RUN,
8080
SystemClock.uptimeMillis());
8181

82-
Looper.prepare();
82+
Looper.prepareMainLooper();
8383

8484
android.os.Process.setThreadPriority(
8585
android.os.Process.THREAD_PRIORITY_FOREGROUND);

0 commit comments

Comments
 (0)