Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardPageSwipeHelper.java +8 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,7 @@ public class KeyguardPageSwipeHelper { return; } if (!animate) { view.animate().cancel(); view.setAlpha(alpha); view.setScaleX(scale); view.setScaleY(scale); Loading Loading @@ -465,6 +466,13 @@ public class KeyguardPageSwipeHelper { } public void reset() { if (mSwipeAnimator != null) { mSwipeAnimator.cancel(); } ArrayList<View> targetViews = mCallback.getTranslationViews(); for (View view : targetViews) { view.animate().cancel(); } setTranslation(0.0f, true); mSwipingInProgress = false; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +47 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.ViewConfiguration; import android.view.ViewTreeObserver; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.widget.FrameLayout; Loading Loading @@ -67,6 +68,11 @@ public abstract class PanelView extends FrameLayout { private VelocityTrackerInterface mVelocityTracker; private FlingAnimationUtils mFlingAnimationUtils; /** * Whether an instant expand request is currently pending and we are just waiting for layout. */ private boolean mInstantExpanding; PanelBar mBar; protected int mMaxPanelHeight = -1; Loading Loading @@ -128,6 +134,9 @@ public abstract class PanelView extends FrameLayout { @Override public boolean onTouchEvent(MotionEvent event) { if (mInstantExpanding) { return false; } /* * We capture touch events here and update the expand height here in case according to Loading Loading @@ -263,6 +272,9 @@ public abstract class PanelView extends FrameLayout { @Override public boolean onInterceptTouchEvent(MotionEvent event) { if (mInstantExpanding) { return false; } /* * If the user drags anywhere inside the panel we intercept it if he moves his finger Loading Loading @@ -556,6 +568,41 @@ public abstract class PanelView extends FrameLayout { } } public void instantExpand() { mInstantExpanding = true; abortAnimations(); if (mTracking) { onTrackingStopped(true /* expands */); // The panel is expanded after this call. onExpandingFinished(); } setVisibility(VISIBLE); // Wait for window manager to pickup the change, so we know the maximum height of the panel // then. getViewTreeObserver().addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (mStatusBar.getStatusBarWindow().getHeight() != mStatusBar.getStatusBarHeight()) { getViewTreeObserver().removeOnGlobalLayoutListener(this); setExpandedFraction(1f); mInstantExpanding = false; } } }); // Make sure a layout really happens. requestLayout(); } private void abortAnimations() { cancelPeek(); if (mHeightAnimator != null) { mHeightAnimator.cancel(); } } protected void startUnlockHintAnimation() { // We don't need to hint the user if an animation is already running or the user is changing Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +6 −15 Original line number Diff line number Diff line Loading @@ -828,6 +828,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return mStatusBarView; } public StatusBarWindowView getStatusBarWindow() { return mStatusBarWindow; } @Override protected WindowManager.LayoutParams getSearchLayoutParams(LayoutParams layoutParams) { boolean opaque = false; Loading Loading @@ -2983,22 +2987,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private void instantExpandNotificationsPanel() { // Make our window larger and the panel visible. // Make our window larger and the panel expanded. makeExpandedVisible(true); mNotificationPanel.setVisibility(View.VISIBLE); // Wait for window manager to pickup the change, so we know the maximum height of the panel // then. mNotificationPanel.getViewTreeObserver().addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (mStatusBarWindow.getHeight() != getStatusBarHeight()) { mNotificationPanel.getViewTreeObserver().removeOnGlobalLayoutListener(this); mNotificationPanel.setExpandedFraction(1); } } }); mNotificationPanel.instantExpand(); } private void instantCollapseNotificationPanel() { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardPageSwipeHelper.java +8 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,7 @@ public class KeyguardPageSwipeHelper { return; } if (!animate) { view.animate().cancel(); view.setAlpha(alpha); view.setScaleX(scale); view.setScaleY(scale); Loading Loading @@ -465,6 +466,13 @@ public class KeyguardPageSwipeHelper { } public void reset() { if (mSwipeAnimator != null) { mSwipeAnimator.cancel(); } ArrayList<View> targetViews = mCallback.getTranslationViews(); for (View view : targetViews) { view.animate().cancel(); } setTranslation(0.0f, true); mSwipingInProgress = false; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +47 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.ViewConfiguration; import android.view.ViewTreeObserver; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.widget.FrameLayout; Loading Loading @@ -67,6 +68,11 @@ public abstract class PanelView extends FrameLayout { private VelocityTrackerInterface mVelocityTracker; private FlingAnimationUtils mFlingAnimationUtils; /** * Whether an instant expand request is currently pending and we are just waiting for layout. */ private boolean mInstantExpanding; PanelBar mBar; protected int mMaxPanelHeight = -1; Loading Loading @@ -128,6 +134,9 @@ public abstract class PanelView extends FrameLayout { @Override public boolean onTouchEvent(MotionEvent event) { if (mInstantExpanding) { return false; } /* * We capture touch events here and update the expand height here in case according to Loading Loading @@ -263,6 +272,9 @@ public abstract class PanelView extends FrameLayout { @Override public boolean onInterceptTouchEvent(MotionEvent event) { if (mInstantExpanding) { return false; } /* * If the user drags anywhere inside the panel we intercept it if he moves his finger Loading Loading @@ -556,6 +568,41 @@ public abstract class PanelView extends FrameLayout { } } public void instantExpand() { mInstantExpanding = true; abortAnimations(); if (mTracking) { onTrackingStopped(true /* expands */); // The panel is expanded after this call. onExpandingFinished(); } setVisibility(VISIBLE); // Wait for window manager to pickup the change, so we know the maximum height of the panel // then. getViewTreeObserver().addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (mStatusBar.getStatusBarWindow().getHeight() != mStatusBar.getStatusBarHeight()) { getViewTreeObserver().removeOnGlobalLayoutListener(this); setExpandedFraction(1f); mInstantExpanding = false; } } }); // Make sure a layout really happens. requestLayout(); } private void abortAnimations() { cancelPeek(); if (mHeightAnimator != null) { mHeightAnimator.cancel(); } } protected void startUnlockHintAnimation() { // We don't need to hint the user if an animation is already running or the user is changing Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +6 −15 Original line number Diff line number Diff line Loading @@ -828,6 +828,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return mStatusBarView; } public StatusBarWindowView getStatusBarWindow() { return mStatusBarWindow; } @Override protected WindowManager.LayoutParams getSearchLayoutParams(LayoutParams layoutParams) { boolean opaque = false; Loading Loading @@ -2983,22 +2987,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private void instantExpandNotificationsPanel() { // Make our window larger and the panel visible. // Make our window larger and the panel expanded. makeExpandedVisible(true); mNotificationPanel.setVisibility(View.VISIBLE); // Wait for window manager to pickup the change, so we know the maximum height of the panel // then. mNotificationPanel.getViewTreeObserver().addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (mStatusBarWindow.getHeight() != getStatusBarHeight()) { mNotificationPanel.getViewTreeObserver().removeOnGlobalLayoutListener(this); mNotificationPanel.setExpandedFraction(1); } } }); mNotificationPanel.instantExpand(); } private void instantCollapseNotificationPanel() { Loading