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

Commit 331a5896 authored by Pavel Grafov's avatar Pavel Grafov Committed by android-build-merger
Browse files

Merge "Go via FgThread when starting the profiles during system boot." into pi-dev

am: 98d4d500

Change-Id: I20324e15e9fcfac6a9bedba8f9815b6e19085d90
parents ad7bbf12 98d4d500
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -845,10 +845,16 @@ class UserController implements Handler.Callback {
    }

    void scheduleStartProfiles() {
        // Parent user transition to RUNNING_UNLOCKING happens on FgThread, so it is busy, there is
        // a chance the profile will reach RUNNING_LOCKED while parent is still locked, so no
        // attempt will be made to unlock the profile. If we go via FgThread, this will be executed
        // after the parent had chance to unlock fully.
        FgThread.getHandler().post(() -> {
            if (!mHandler.hasMessages(START_PROFILES_MSG)) {
                mHandler.sendMessageDelayed(mHandler.obtainMessage(START_PROFILES_MSG),
                        DateUtils.SECOND_IN_MILLIS);
            }
        });
    }

    void startProfiles() {