Merge "ActivityThread: Avoid creating duplicate handlers and reuse mH"
This commit is contained in:
@ -4728,13 +4728,14 @@ public final class ActivityThread {
|
|||||||
Process.setArgV0("<pre-initialized>");
|
Process.setArgV0("<pre-initialized>");
|
||||||
|
|
||||||
Looper.prepareMainLooper();
|
Looper.prepareMainLooper();
|
||||||
if (sMainThreadHandler == null) {
|
|
||||||
sMainThreadHandler = new Handler();
|
|
||||||
}
|
|
||||||
|
|
||||||
ActivityThread thread = new ActivityThread();
|
ActivityThread thread = new ActivityThread();
|
||||||
thread.attach(false);
|
thread.attach(false);
|
||||||
|
|
||||||
|
if (sMainThreadHandler == null) {
|
||||||
|
sMainThreadHandler = thread.getHandler();
|
||||||
|
}
|
||||||
|
|
||||||
AsyncTask.init();
|
AsyncTask.init();
|
||||||
|
|
||||||
if (false) {
|
if (false) {
|
||||||
|
Reference in New Issue
Block a user