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

Commit 56d8cc10 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru
Browse files

Merge into jb-mr1-dev

Change-Id: I6504b000be7e3b6e770af99c5a922fd1e9ec73de
parents ecfc9ca5 187f3f94
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -869,8 +869,22 @@ public final class ScreenMagnifier implements EventStreamTransformation {
            mDisplayContentChangeListener = new IDisplayContentChangeListener.Stub() {
                @Override
                public void onWindowTransition(int displayId, int transition, WindowInfo info) {
                    mHandler.obtainMessage(MESSAGE_ON_WINDOW_TRANSITION, transition, 0,
                            WindowInfo.obtain(info)).sendToTarget();
                    Message message = mHandler.obtainMessage(MESSAGE_ON_WINDOW_TRANSITION,
                            transition, 0, WindowInfo.obtain(info));
                    // TODO: This makes me quite unhappy but for the time being the
                    //       least risky fix for cases where the keyguard is removed but
                    //       the windows it force hides are not made visible yet. Hence,
                    //       we would compute the magnified frame before we have a stable
                    //       state. One more reason to move the magnified frame computation
                    //       in the window manager!
                    if (info.type == WindowManager.LayoutParams.TYPE_KEYGUARD
                                || info.type == WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG
                            && (transition == WindowManagerPolicy.TRANSIT_EXIT
                                || transition == WindowManagerPolicy.TRANSIT_HIDE)) {
                        mHandler.sendMessageDelayed(message, mLongAnimationDuration);
                    } else {
                        message.sendToTarget();
                    }
                }

                @Override