Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6929c2ec authored by Alison Cichowlas's avatar Alison Cichowlas Committed by android-build-merger
Browse files

Merge "Move ShutdownThread calls to system ui thread." into oc-dr1-dev am:...

Merge "Move ShutdownThread calls to system ui thread." into oc-dr1-dev am: 39a556f1 am: b7ac4ca5
am: a41c839d

Change-Id: Iefbe36c3f70c941d6986e201bf04bdc1b5f901f5
parents b7ec32ee a41c839d
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import android.os.FactoryTest;
import android.os.FileUtils;
import android.os.IIncidentManager;
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
@@ -454,9 +455,22 @@ public final class SystemServer {
                    }
                }
            }
            Runnable runnable = new Runnable() {
                @Override
                public void run() {
                    synchronized (this) {
                        ShutdownThread.rebootOrShutdown(null, reboot, reason);
                    }
                }
            };

            // ShutdownThread must run on a looper capable of displaying the UI.
            Message msg = Message.obtain(UiThread.getHandler(), runnable);
            msg.setAsynchronous(true);
            UiThread.getHandler().sendMessage(msg);

        }
    }

    private void createSystemContext() {
        ActivityThread activityThread = ActivityThread.systemMain();