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

Commit af47d751 authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

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

* commit 'e8a057a9':
  Remove overly tight constraint on drawn Keyguard.
parents 4f241a29 e8a057a9
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;