Skip to content

Commit b4f56b5

Browse files
Dianne HackbornAndroid Git Automerger
authored andcommitted
am 8b97ee6: am b0b4a70: Merge "ActivityThread: Avoid creating duplicate handlers and reuse mH"
* commit '8b97ee6d8c26974a6fc9ce85c3d7a07ca1e9cac2': ActivityThread: Avoid creating duplicate handlers and reuse mH
2 parents 7e877fa + 8b97ee6 commit b4f56b5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/java/android/app/ActivityThread.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4817,13 +4817,14 @@ public static void main(String[] args) {
48174817
Process.setArgV0("<pre-initialized>");
48184818

48194819
Looper.prepareMainLooper();
4820-
if (sMainThreadHandler == null) {
4821-
sMainThreadHandler = new Handler();
4822-
}
48234820

48244821
ActivityThread thread = new ActivityThread();
48254822
thread.attach(false);
48264823

4824+
if (sMainThreadHandler == null) {
4825+
sMainThreadHandler = thread.getHandler();
4826+
}
4827+
48274828
AsyncTask.init();
48284829

48294830
if (false) {

0 commit comments

Comments
 (0)