Loading packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +6 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,12 @@ public interface DozeHost { void onIgnoreTouchWhilePulsing(boolean ignore); /** * If the device was waken up by a passive interrupt that will show the lock screen without * expanding the notification panel/shade. */ void setPassiveInterrupt(boolean lightInterrupt); interface Callback { /** * Called when a high priority notification is added. Loading packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +3 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ public class DozeTriggers implements DozeMachine.Part { mDozeHost.onDoubleTap(screenX, screenY); mMachine.wakeUp(); } else if (isPickup || isWakeLockScreen) { mDozeHost.setPassiveInterrupt(true); mMachine.wakeUp(); } else { mDozeHost.extendPulse(); Loading Loading @@ -210,6 +211,7 @@ public class DozeTriggers implements DozeMachine.Part { case INITIALIZED: mBroadcastReceiver.register(mContext); mDozeHost.addCallback(mHostCallback); mDozeHost.setPassiveInterrupt(false); checkTriggersAtInit(); break; case DOZE: Loading @@ -219,6 +221,7 @@ public class DozeTriggers implements DozeMachine.Part { mDozeSensors.reregisterAllSensors(); } mDozeSensors.setListening(true); mDozeHost.setPassiveInterrupt(false); break; case DOZE_AOD_PAUSED: case DOZE_AOD_PAUSING: Loading packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java +3 −6 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ public class DragDownHelper implements Gefingerpoken { if (!isFalseTouch() && mDragDownCallback.onDraggedDown(mStartingChild, (int) (y - mInitialTouchY))) { if (mStartingChild == null) { mDragDownCallback.setEmptyDragAmount(0f); cancelExpansion(); } else { mCallback.setUserLockedChild(mStartingChild, false); mStartingChild = null; Loading Loading @@ -206,11 +206,8 @@ public class DragDownHelper implements Gefingerpoken { ValueAnimator anim = ValueAnimator.ofFloat(mLastHeight, 0); anim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); anim.setDuration(SPRING_BACK_ANIMATION_LENGTH_MS); anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { anim.addUpdateListener(animation -> { mDragDownCallback.setEmptyDragAmount((Float) animation.getAnimatedValue()); } }); anim.start(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +1 −1 Original line number Diff line number Diff line Loading @@ -793,7 +793,7 @@ public class NotificationShelf extends ActivatableNotificationView implements private void setOpenedAmount(float openedAmount) { mNoAnimationsInThisFrame = openedAmount == 1.0f && mOpenedAmount == 0.0f; mOpenedAmount = openedAmount; if (!mAmbientState.isPanelFullWidth()) { if (!mAmbientState.isPanelFullWidth() || mAmbientState.isDark()) { // We don't do a transformation at all, lets just assume we are fully opened openedAmount = 1.0f; } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +9 −7 Original line number Diff line number Diff line Loading @@ -5654,19 +5654,21 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @Override public boolean onDraggedDown(View startingChild, int dragLengthY) { if (mStatusBarState == StatusBarState.KEYGUARD && hasActiveNotifications() && (!mStatusBar.isDozing() || mStatusBar.isPulsing())) { && hasActiveNotifications()) { mLockscreenGestureLogger.write( MetricsEvent.ACTION_LS_SHADE, (int) (dragLengthY / mDisplayMetrics.density), 0 /* velocityDp - N/A */); if (mNotificationPanel.onDraggedDown() || startingChild != null) { // We have notifications, go to locked shade. mStatusBar.goToLockedShade(startingChild); if (startingChild instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) startingChild; row.onExpandedByGesture(true /* drag down is always an open */); } } return true; } else { // abort gesture. Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +6 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,12 @@ public interface DozeHost { void onIgnoreTouchWhilePulsing(boolean ignore); /** * If the device was waken up by a passive interrupt that will show the lock screen without * expanding the notification panel/shade. */ void setPassiveInterrupt(boolean lightInterrupt); interface Callback { /** * Called when a high priority notification is added. Loading
packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +3 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ public class DozeTriggers implements DozeMachine.Part { mDozeHost.onDoubleTap(screenX, screenY); mMachine.wakeUp(); } else if (isPickup || isWakeLockScreen) { mDozeHost.setPassiveInterrupt(true); mMachine.wakeUp(); } else { mDozeHost.extendPulse(); Loading Loading @@ -210,6 +211,7 @@ public class DozeTriggers implements DozeMachine.Part { case INITIALIZED: mBroadcastReceiver.register(mContext); mDozeHost.addCallback(mHostCallback); mDozeHost.setPassiveInterrupt(false); checkTriggersAtInit(); break; case DOZE: Loading @@ -219,6 +221,7 @@ public class DozeTriggers implements DozeMachine.Part { mDozeSensors.reregisterAllSensors(); } mDozeSensors.setListening(true); mDozeHost.setPassiveInterrupt(false); break; case DOZE_AOD_PAUSED: case DOZE_AOD_PAUSING: Loading
packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java +3 −6 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ public class DragDownHelper implements Gefingerpoken { if (!isFalseTouch() && mDragDownCallback.onDraggedDown(mStartingChild, (int) (y - mInitialTouchY))) { if (mStartingChild == null) { mDragDownCallback.setEmptyDragAmount(0f); cancelExpansion(); } else { mCallback.setUserLockedChild(mStartingChild, false); mStartingChild = null; Loading Loading @@ -206,11 +206,8 @@ public class DragDownHelper implements Gefingerpoken { ValueAnimator anim = ValueAnimator.ofFloat(mLastHeight, 0); anim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); anim.setDuration(SPRING_BACK_ANIMATION_LENGTH_MS); anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { anim.addUpdateListener(animation -> { mDragDownCallback.setEmptyDragAmount((Float) animation.getAnimatedValue()); } }); anim.start(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +1 −1 Original line number Diff line number Diff line Loading @@ -793,7 +793,7 @@ public class NotificationShelf extends ActivatableNotificationView implements private void setOpenedAmount(float openedAmount) { mNoAnimationsInThisFrame = openedAmount == 1.0f && mOpenedAmount == 0.0f; mOpenedAmount = openedAmount; if (!mAmbientState.isPanelFullWidth()) { if (!mAmbientState.isPanelFullWidth() || mAmbientState.isDark()) { // We don't do a transformation at all, lets just assume we are fully opened openedAmount = 1.0f; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +9 −7 Original line number Diff line number Diff line Loading @@ -5654,19 +5654,21 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @Override public boolean onDraggedDown(View startingChild, int dragLengthY) { if (mStatusBarState == StatusBarState.KEYGUARD && hasActiveNotifications() && (!mStatusBar.isDozing() || mStatusBar.isPulsing())) { && hasActiveNotifications()) { mLockscreenGestureLogger.write( MetricsEvent.ACTION_LS_SHADE, (int) (dragLengthY / mDisplayMetrics.density), 0 /* velocityDp - N/A */); if (mNotificationPanel.onDraggedDown() || startingChild != null) { // We have notifications, go to locked shade. mStatusBar.goToLockedShade(startingChild); if (startingChild instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) startingChild; row.onExpandedByGesture(true /* drag down is always an open */); } } return true; } else { // abort gesture. Loading