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

Commit e8a057a9 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Remove overly tight constraint on drawn Keyguard." into klp-dev

parents 92128144 4e8a19c7
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -420,6 +420,7 @@ public class KeyguardViewManager {
    public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback) {
        if (DEBUG) Log.d(TAG, "onScreenTurnedOn()");
        mScreenOn = true;
        final IBinder token = mKeyguardHost == null ? null : mKeyguardHost.getWindowToken();
        if (mKeyguardView != null) {
            mKeyguardView.onScreenTurnedOn();

@@ -432,10 +433,6 @@ public class KeyguardViewManager {
                    mKeyguardHost.post(new Runnable() {
                        @Override
                        public void run() {
                            IBinder token = null;
                            if (mKeyguardHost.getVisibility() == View.VISIBLE) {
                                token = mKeyguardHost.getWindowToken();
                            }
                            try {
                                callback.onShown(token);
                            } catch (RemoteException e) {
@@ -445,7 +442,7 @@ public class KeyguardViewManager {
                    });
                } else {
                    try {
                        callback.onShown(null);
                        callback.onShown(token);
                    } catch (RemoteException e) {
                        Slog.w(TAG, "Exception calling onShown():", e);
                    }
@@ -453,7 +450,7 @@ public class KeyguardViewManager {
            }
        } else if (callback != null) {
            try {
                callback.onShown(null);
                callback.onShown(token);
            } catch (RemoteException e) {
                Slog.w(TAG, "Exception calling onShown():", e);
            }
+3 −1
Original line number Diff line number Diff line
@@ -4282,12 +4282,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                })) {
                    return;
                }
                Slog.i(TAG, "No lock screen! waitForWindowDrawn false");

            } catch (RemoteException ex) {
                // Can't happen in system process.
            }
        }

        Slog.i(TAG, "No lock screen!");
        Slog.i(TAG, "No lock screen! windowToken=" + windowToken);
        finishScreenTurningOn(screenOnListener);
    }

+3 −3
Original line number Diff line number Diff line
@@ -9473,9 +9473,8 @@ public class WindowManagerService extends IWindowManager.Stub
                //Slog.i(TAG, "Waiting for drawn " + win + ": removed="
                //        + win.mRemoved + " visible=" + win.isVisibleLw()
                //        + " shown=" + win.mSurfaceShown);
                if (win.mRemoved || !win.isVisibleLw()) {
                    // Window has been removed or made invisible; no draw
                    // will now happen, so stop waiting.
                if (win.mRemoved) {
                    // Window has been removed; no draw will now happen, so stop waiting.
                    Slog.w(TAG, "Aborted waiting for drawn: " + pair.first);
                    try {
                        pair.second.sendResult(null);
@@ -9510,6 +9509,7 @@ public class WindowManagerService extends IWindowManager.Stub
                    checkDrawnWindowsLocked();
                    return true;
                }
                Slog.i(TAG, "waitForWindowDrawn: win null");
            }
        }
        return false;