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

Commit 53cb242f authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix issue where keyguard adds widgets before the system is ready" into klp-dev

parents b1f0bba1 e5f910a6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43,4 +43,5 @@ interface IKeyguardService {
    oneway void showAssistant();
    oneway void dispatch(in MotionEvent event);
    oneway void launchCamera();
    oneway void onBootCompleted();
}
+4 −0
Original line number Diff line number Diff line
@@ -141,6 +141,10 @@ public class KeyguardService extends Service {
            checkPermission();
            mKeyguardViewMediator.launchCamera();
        }
        public void onBootCompleted() {
            checkPermission();
            mKeyguardViewMediator.onBootCompleted();
        }
    };

}
+2 −3
Original line number Diff line number Diff line
@@ -635,15 +635,14 @@ public class KeyguardUpdateMonitor {
     * PhoneWindowManager in this case.
     */
    protected void dispatchBootCompleted() {
        if (!mBootCompleted) {
        mHandler.sendEmptyMessage(MSG_BOOT_COMPLETED);
    }
    }

    /**
     * Handle {@link #MSG_BOOT_COMPLETED}
     */
    protected void handleBootCompleted() {
        if (mBootCompleted) return;
        mBootCompleted = true;
        mAudioManager = new AudioManager(mContext);
        mAudioManager.registerRemoteControlDisplay(mRemoteControlDisplay);
+4 −3
Original line number Diff line number Diff line
@@ -530,9 +530,6 @@ public class KeyguardViewMediator {
            mSystemReady = true;
            mUpdateMonitor.registerCallback(mUpdateCallback);

            // Send boot completed message if it hasn't already been sent.
            mUpdateMonitor.dispatchBootCompleted();

            // Suppress biometric unlock right after boot until things have settled if it is the
            // selected security method, otherwise unsuppress it.  It must be unsuppressed if it is
            // not the selected security method for the following reason:  if the user starts
@@ -1366,4 +1363,8 @@ public class KeyguardViewMediator {
        Message msg = mHandler.obtainMessage(LAUNCH_CAMERA);
        mHandler.sendMessage(msg);
    }

    public void onBootCompleted() {
        mUpdateMonitor.dispatchBootCompleted();
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -4668,6 +4668,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {

    /** {@inheritDoc} */
    public void systemBooted() {
        if (mKeyguardDelegate != null) {
            mKeyguardDelegate.onBootCompleted();
        }
        synchronized (mLock) {
            mSystemBooted = true;
        }
Loading