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

Commit a8f767a2 authored by Mike Lockwood's avatar Mike Lockwood Committed by Mike Lockwood
Browse files

ActivityManager: Make sure BOOT_COMPLETED Intent is sent when running headless

parent 25d1fdc3
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2870,6 +2870,13 @@ public final class ActivityManagerService extends ActivityManagerNative
    }
    boolean startHomeActivityLocked(int userId) {
        if (mHeadless) {
            // Added because none of the other calls to ensureBootCompleted seem to fire
            // when running headless.
            ensureBootCompleted();
            return false;
        }
        if (mFactoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL
                && mTopAction == null) {
            // We are running in factory test mode, but unable to find
@@ -4918,7 +4925,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        synchronized (this) {
            booting = mBooting;
            mBooting = false;
            enableScreen = !mBooted;
            enableScreen = !mBooted && !mHeadless;
            mBooted = true;
        }