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

Commit cc008494 authored by Danesh M's avatar Danesh M
Browse files

Lockscreen : Ensure window bounds change after view animations

Changing window bounds when a view inside the window is performing
animations, causes flickers. Ensure we change window bounds
only after all the animations have completed.

Change-Id: I2143d3d15cdfe660d864e1af902267b0903b2afa
parent 6b5b45bf
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -465,6 +465,10 @@ public class NotificationPanelView extends PanelView implements
                    } else {
                        intercept = NotificationPanelView.this.onTouchEvent(e);
                    }
                } else {
                    // Ensure we expand as early as possible
                    // to avoid any simultaneous animations on the views
                    mKeyguardBottomArea.expand(true);
                }
                return intercept;
            }
@@ -2317,14 +2321,22 @@ public class NotificationPanelView extends PanelView implements
        requestDisallowInterceptTouchEvent(true);
        mOnlyAffordanceInThisMotion = true;
        mQsTracking = false;
        mKeyguardBottomArea.expand(true);
    }

    @Override
    public void onSwipingAborted() {
        mKeyguardBottomArea.unbindCameraPrewarmService(false /* launched */);
        mKeyguardBottomArea.animate().setListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                mKeyguardBottomArea.expand(false);
            }
            @Override
            public void onAnimationCancel(Animator animation) {
                mKeyguardBottomArea.expand(false);
            }
        });
    }

    @Override
    public void onIconClicked(boolean rightIcon) {
+11 −1
Original line number Diff line number Diff line
@@ -4761,9 +4761,19 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
    public void onHintFinished() {
        // Delay the reset a bit so the user can read the text.
        mKeyguardIndicationController.hideTransientIndicationDelayed(HINT_RESET_DELAY_MS);
        mKeyguardBottomArea.animate().setListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                mKeyguardBottomArea.expand(false);
            }

            @Override
            public void onAnimationCancel(Animator animation) {
                mKeyguardBottomArea.expand(false);
            }
        });
    }

    public void onCameraHintStarted(String hint) {
        mKeyguardIndicationController.showTransientIndication(hint);
    }