Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +7 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,9 @@ public class KeyguardBouncer { public void show() { ensureView(); if (mRoot.getVisibility() == View.VISIBLE) { return; } // Try to dismiss the Keyguard. If no security pattern is set, this will dismiss the whole // Keyguard. If we need to authenticate, show the bouncer. Loading Loading @@ -109,6 +112,10 @@ public class KeyguardBouncer { return mRoot != null && mRoot.getVisibility() == View.VISIBLE; } public void prepare() { ensureView(); } private void ensureView() { if (mRoot == null) { inflateView(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java +8 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.view.View; import android.widget.TextView; /** Loading Loading @@ -50,8 +52,13 @@ public class KeyguardIndicationTextView extends TextView { public void switchIndication(CharSequence text) { // TODO: Animation, make sure that we will show one indication long enough. if (TextUtils.isEmpty(text)) { setVisibility(View.INVISIBLE); } else { setVisibility(View.VISIBLE); setText(text); } } /** * See {@link #switchIndication}. Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +2 −2 Original line number Diff line number Diff line Loading @@ -664,8 +664,8 @@ public class NotificationPanelView extends PanelView implements } @Override protected void onTrackingStopped() { super.onTrackingStopped(); protected void onTrackingStopped(boolean expand) { super.onTrackingStopped(expand); mOverExpansion = 0.0f; mNotificationStackScroller.setOverScrolledPixels(0.0f, true /* onTop */, true /* animate */); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +5 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,11 @@ public class PanelBar extends FrameLayout { } } public void onTrackingStopped(PanelView panel) { public void onTrackingStopped(PanelView panel, boolean expand) { mTracking = false; } public void onExpandingFinished() { } } packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +14 −5 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class PanelView extends FrameLayout { private float mInitialTouchX; protected void onExpandingFinished() { mBar.onExpandingFinished(); } protected void onExpandingStarted() { Loading Loading @@ -184,9 +185,9 @@ public class PanelView extends FrameLayout { case MotionEvent.ACTION_CANCEL: mTracking = false; mTrackingPointer = -1; onTrackingStopped(); trackMovement(event); flingWithCurrentVelocity(); boolean expand = flingWithCurrentVelocity(); onTrackingStopped(expand); if (mVelocityTracker != null) { mVelocityTracker.recycle(); mVelocityTracker = null; Loading @@ -196,8 +197,8 @@ public class PanelView extends FrameLayout { return true; } protected void onTrackingStopped() { mBar.onTrackingStopped(PanelView.this); protected void onTrackingStopped(boolean expand) { mBar.onTrackingStopped(PanelView.this, expand); } protected void onTrackingStarted() { Loading Loading @@ -303,7 +304,10 @@ public class PanelView extends FrameLayout { mMaxPanelHeight = -1; } private void flingWithCurrentVelocity() { /** * @return whether the panel will be expanded after the animation */ private boolean flingWithCurrentVelocity() { float vel = getCurrentVelocity(); boolean expand; if (Math.abs(vel) < mFlingAnimationUtils.getMinVelocityPxPerSecond()) { Loading @@ -312,11 +316,16 @@ public class PanelView extends FrameLayout { expand = vel > 0; } fling(vel, expand); return expand; } protected void fling(float vel, boolean expand) { cancelPeek(); float target = expand ? getMaxPanelHeight() : 0.0f; if (target == mExpandedHeight) { onExpandingFinished(); return; } ValueAnimator animator = ValueAnimator.ofFloat(mExpandedHeight, target); if (expand) { mFlingAnimationUtils.apply(animator, mExpandedHeight, target, vel, getHeight()); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +7 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,9 @@ public class KeyguardBouncer { public void show() { ensureView(); if (mRoot.getVisibility() == View.VISIBLE) { return; } // Try to dismiss the Keyguard. If no security pattern is set, this will dismiss the whole // Keyguard. If we need to authenticate, show the bouncer. Loading Loading @@ -109,6 +112,10 @@ public class KeyguardBouncer { return mRoot != null && mRoot.getVisibility() == View.VISIBLE; } public void prepare() { ensureView(); } private void ensureView() { if (mRoot == null) { inflateView(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java +8 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.view.View; import android.widget.TextView; /** Loading Loading @@ -50,8 +52,13 @@ public class KeyguardIndicationTextView extends TextView { public void switchIndication(CharSequence text) { // TODO: Animation, make sure that we will show one indication long enough. if (TextUtils.isEmpty(text)) { setVisibility(View.INVISIBLE); } else { setVisibility(View.VISIBLE); setText(text); } } /** * See {@link #switchIndication}. Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +2 −2 Original line number Diff line number Diff line Loading @@ -664,8 +664,8 @@ public class NotificationPanelView extends PanelView implements } @Override protected void onTrackingStopped() { super.onTrackingStopped(); protected void onTrackingStopped(boolean expand) { super.onTrackingStopped(expand); mOverExpansion = 0.0f; mNotificationStackScroller.setOverScrolledPixels(0.0f, true /* onTop */, true /* animate */); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +5 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,11 @@ public class PanelBar extends FrameLayout { } } public void onTrackingStopped(PanelView panel) { public void onTrackingStopped(PanelView panel, boolean expand) { mTracking = false; } public void onExpandingFinished() { } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +14 −5 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class PanelView extends FrameLayout { private float mInitialTouchX; protected void onExpandingFinished() { mBar.onExpandingFinished(); } protected void onExpandingStarted() { Loading Loading @@ -184,9 +185,9 @@ public class PanelView extends FrameLayout { case MotionEvent.ACTION_CANCEL: mTracking = false; mTrackingPointer = -1; onTrackingStopped(); trackMovement(event); flingWithCurrentVelocity(); boolean expand = flingWithCurrentVelocity(); onTrackingStopped(expand); if (mVelocityTracker != null) { mVelocityTracker.recycle(); mVelocityTracker = null; Loading @@ -196,8 +197,8 @@ public class PanelView extends FrameLayout { return true; } protected void onTrackingStopped() { mBar.onTrackingStopped(PanelView.this); protected void onTrackingStopped(boolean expand) { mBar.onTrackingStopped(PanelView.this, expand); } protected void onTrackingStarted() { Loading Loading @@ -303,7 +304,10 @@ public class PanelView extends FrameLayout { mMaxPanelHeight = -1; } private void flingWithCurrentVelocity() { /** * @return whether the panel will be expanded after the animation */ private boolean flingWithCurrentVelocity() { float vel = getCurrentVelocity(); boolean expand; if (Math.abs(vel) < mFlingAnimationUtils.getMinVelocityPxPerSecond()) { Loading @@ -312,11 +316,16 @@ public class PanelView extends FrameLayout { expand = vel > 0; } fling(vel, expand); return expand; } protected void fling(float vel, boolean expand) { cancelPeek(); float target = expand ? getMaxPanelHeight() : 0.0f; if (target == mExpandedHeight) { onExpandingFinished(); return; } ValueAnimator animator = ValueAnimator.ofFloat(mExpandedHeight, target); if (expand) { mFlingAnimationUtils.apply(animator, mExpandedHeight, target, vel, getHeight()); Loading