summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brad Hinegardner <bhinegardner@google.com> 2023-08-23 21:17:11 +0000
committer Brad Hinegardner <bhinegardner@google.com> 2023-09-13 17:07:14 +0000
commit7e1b9365bc1bb0c46ed9d2eeef6d9d97dca16111 (patch)
treebf7ebba3d341c3577484a1ef3647f565c320cab8
parentced7d0ddf0b3f43377ecf5778abb4c8e30bf795f (diff)
Remove bounce "unlock hint" on keyguard
Retain the "Swipe up to open" message on the indication area Bug: 298052922 Change-Id: I2735055775632649c418880322e7e197acfd84e7
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java139
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java61
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java20
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java1
14 files changed, 12 insertions, 263 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
index 44acf4f0fd2d..a9c71adc095d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
@@ -79,12 +79,6 @@ object KeyguardBottomAreaViewBinder {
//If updated, be sure to update [KeyguardQuickAffordanceViewBinder.kt]
@Deprecated("Deprecated as part of b/278057014")
interface Binding {
- /**
- * Returns a collection of [ViewPropertyAnimator] instances that can be used to animate the
- * indication areas.
- */
- fun getIndicationAreaAnimators(): List<ViewPropertyAnimator>
-
/** Notifies that device configuration has changed. */
fun onConfigurationChanged()
@@ -281,10 +275,6 @@ object KeyguardBottomAreaViewBinder {
}
return object : Binding {
- override fun getIndicationAreaAnimators(): List<ViewPropertyAnimator> {
- return listOf(ambientIndicationArea).mapNotNull { it?.animate() }
- }
-
override fun onConfigurationChanged() {
configurationBasedDimensions.value = loadFromResources(view)
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 798687355b41..9f94828259e8 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -140,7 +140,6 @@ import com.android.systemui.keyguard.shared.model.TransitionState;
import com.android.systemui.keyguard.shared.model.TransitionStep;
import com.android.systemui.keyguard.shared.model.WakefulnessModel;
import com.android.systemui.keyguard.ui.binder.KeyguardLongPressViewBinder;
-import com.android.systemui.keyguard.ui.view.KeyguardRootView;
import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel;
import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingLockscreenHostedTransitionViewModel;
import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingTransitionViewModel;
@@ -319,7 +318,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private final NotificationStackScrollLayoutController mNotificationStackScrollLayoutController;
private final LayoutInflater mLayoutInflater;
private final FeatureFlags mFeatureFlags;
- private final PowerManager mPowerManager;
private final AccessibilityManager mAccessibilityManager;
private final NotificationWakeUpCoordinator mWakeUpCoordinator;
private final PulseExpansionHandler mPulseExpansionHandler;
@@ -355,7 +353,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
private final AccessibilityDelegate mAccessibilityDelegate = new ShadeAccessibilityDelegate();
private final NotificationGutsManager mGutsManager;
private final AlternateBouncerInteractor mAlternateBouncerInteractor;
- private final KeyguardRootView mKeyguardRootView;
private final QuickSettingsController mQsController;
private final TouchHandler mTouchHandler = new TouchHandler();
@@ -369,7 +366,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
/** The current squish amount for the predictive back animation */
private float mCurrentBackProgress = 0.0f;
private boolean mTracking;
- private boolean mHintAnimationRunning;
@Deprecated
private KeyguardBottomAreaView mKeyguardBottomArea;
private boolean mExpanding;
@@ -777,8 +773,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
ActivityStarter activityStarter,
SharedNotificationContainerInteractor sharedNotificationContainerInteractor,
KeyguardViewConfigurator keyguardViewConfigurator,
- KeyguardFaceAuthInteractor keyguardFaceAuthInteractor,
- KeyguardRootView keyguardRootView) {
+ KeyguardFaceAuthInteractor keyguardFaceAuthInteractor) {
keyguardStateController.addCallback(new KeyguardStateController.Callback() {
@Override
public void onKeyguardFadingAwayChanged() {
@@ -882,7 +877,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mAnimateBack = mFeatureFlags.isEnabled(Flags.WM_SHADE_ANIMATE_BACK_GESTURE);
mTrackpadGestureFeaturesEnabled = mFeatureFlags.isEnabled(Flags.TRACKPAD_GESTURE_FEATURES);
mFalsingCollector = falsingCollector;
- mPowerManager = powerManager;
mWakeUpCoordinator = coordinator;
mMainDispatcher = mainDispatcher;
mAccessibilityManager = accessibilityManager;
@@ -983,7 +977,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
});
mAlternateBouncerInteractor = alternateBouncerInteractor;
- mKeyguardRootView = keyguardRootView;
dumpManager.registerDumpable(this);
}
@@ -1515,7 +1508,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
private boolean shouldAvoidChangingNotificationsCount() {
- return mHintAnimationRunning || mUnlockedScreenOffAnimationController.isAnimationPlaying();
+ return mUnlockedScreenOffAnimationController.isAnimationPlaying();
}
@Deprecated
@@ -2641,7 +2634,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
&& !mHeadsUpManager.hasPinnedHeadsUp()) {
alpha = getFadeoutAlpha();
}
- if (mBarState == KEYGUARD && !mHintAnimationRunning
+ if (mBarState == KEYGUARD
&& !mKeyguardBypassController.getBypassEnabled()
&& !mQsController.getFullyExpanded()) {
alpha *= mClockPositionResult.clockAlpha;
@@ -2679,7 +2672,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
// change due to "unlock hint animation." In this case, fading out the bottom area
// would also hide the message that says "swipe to unlock," we don't want to do that.
float expansionAlpha = MathUtils.constrainedMap(0f, 1f,
- isUnlockHintRunning() ? 0f : KeyguardBouncerConstants.ALPHA_EXPANSION_THRESHOLD, 1f,
+ KeyguardBouncerConstants.ALPHA_EXPANSION_THRESHOLD, 1f,
getExpandedFraction());
float alpha = Math.min(expansionAlpha, 1 - mQsController.computeExpansionFraction());
@@ -2861,44 +2854,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mView.getHeight(), mNavigationBarBottomHeight);
}
- @VisibleForTesting
- void startUnlockHintAnimation() {
- if (mPowerManager.isPowerSaveMode() || mAmbientState.getDozeAmount() > 0f) {
- onUnlockHintStarted();
- onUnlockHintFinished();
- return;
- }
-
- // We don't need to hint the user if an animation is already running or the user is changing
- // the expansion.
- if (mHeightAnimator != null || mTracking) {
- return;
- }
- notifyExpandingStarted();
- startUnlockHintAnimationPhase1(() -> {
- notifyExpandingFinished();
- onUnlockHintFinished();
- mHintAnimationRunning = false;
- });
- onUnlockHintStarted();
- mHintAnimationRunning = true;
- }
-
- @VisibleForTesting
- void onUnlockHintFinished() {
- // Delay the reset a bit so the user can read the text.
- mKeyguardIndicationController.hideTransientIndicationDelayed(HINT_RESET_DELAY_MS);
- mScrimController.setExpansionAffectsAlpha(true);
- mNotificationStackScrollLayoutController.setUnlockHintRunning(false);
- }
-
- @VisibleForTesting
- void onUnlockHintStarted() {
- mKeyguardIndicationController.showActionToUnlock();
- mScrimController.setExpansionAffectsAlpha(false);
- mNotificationStackScrollLayoutController.setUnlockHintRunning(true);
- }
-
private boolean shouldUseDismissingAnimation() {
return mBarState != StatusBarState.SHADE && (mKeyguardStateController.canDismissLockScreen()
|| !isTracking());
@@ -2985,7 +2940,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
mLockscreenGestureLogger
.log(LockscreenUiEvent.LOCKSCREEN_LOCK_SHOW_HINT);
- startUnlockHintAnimation();
+ mKeyguardIndicationController.showActionToUnlock();
}
}
break;
@@ -3393,7 +3348,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
ipw.print("mOverExpansion="); ipw.println(mOverExpansion);
ipw.print("mExpandedHeight="); ipw.println(mExpandedHeight);
ipw.print("mTracking="); ipw.println(mTracking);
- ipw.print("mHintAnimationRunning="); ipw.println(mHintAnimationRunning);
ipw.print("mExpanding="); ipw.println(mExpanding);
ipw.print("mSplitShadeEnabled="); ipw.println(mSplitShadeEnabled);
ipw.print("mKeyguardNotificationBottomPadding=");
@@ -4052,73 +4006,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mView.removeCallbacks(mFlingCollapseRunnable);
}
- @Override
- public boolean isUnlockHintRunning() {
- return mHintAnimationRunning;
- }
-
- /**
- * Phase 1: Move everything upwards.
- */
- private void startUnlockHintAnimationPhase1(final Runnable onAnimationFinished) {
- float target = Math.max(0, getMaxPanelHeight() - mHintDistance);
- ValueAnimator animator = createHeightAnimator(target);
- animator.setDuration(250);
- animator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
- animator.addListener(new AnimatorListenerAdapter() {
- private boolean mCancelled;
-
- @Override
- public void onAnimationCancel(Animator animation) {
- mCancelled = true;
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- if (mCancelled) {
- setAnimator(null);
- onAnimationFinished.run();
- } else {
- startUnlockHintAnimationPhase2(onAnimationFinished);
- }
- }
- });
- animator.start();
- setAnimator(animator);
-
-
- if (mFeatureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
- final ViewPropertyAnimator mKeyguardRootViewAnimator = mKeyguardRootView.animate();
- mKeyguardRootViewAnimator
- .translationY(-mHintDistance)
- .setDuration(250)
- .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
- .withEndAction(() -> mKeyguardRootViewAnimator
- .translationY(0)
- .setDuration(450)
- .setInterpolator(mBounceInterpolator)
- .start())
- .start();
- } else {
- final List<ViewPropertyAnimator> indicationAnimators =
- mKeyguardBottomArea.getIndicationAreaAnimators();
-
- for (final ViewPropertyAnimator indicationAreaAnimator : indicationAnimators) {
- indicationAreaAnimator
- .translationY(-mHintDistance)
- .setDuration(250)
- .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
- .withEndAction(() -> indicationAreaAnimator
- .translationY(0)
- .setDuration(450)
- .setInterpolator(mBounceInterpolator)
- .start())
- .start();
- }
- }
-
- }
-
private void setAnimator(ValueAnimator animator) {
mHeightAnimator = animator;
if (animator == null && mPanelUpdateWhenAnimatorEnds) {
@@ -4129,7 +4016,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
/** Returns whether a shade or QS expansion animation is running */
private boolean isShadeOrQsHeightAnimationRunning() {
- return mHeightAnimator != null && !mHintAnimationRunning && !mIsSpringBackAnimation;
+ return mHeightAnimator != null && !mIsSpringBackAnimation;
}
/**
@@ -4208,9 +4095,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
/** Called when the user performs a click anywhere in the empty area of the panel. */
private void onEmptySpaceClick() {
- if (!mHintAnimationRunning) {
- onMiddleClicked();
- }
+ onMiddleClicked();
}
@VisibleForTesting
@@ -4810,11 +4695,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
return mStatusBarStateListener;
}
- @VisibleForTesting
- boolean isHintAnimationRunning() {
- return mHintAnimationRunning;
- }
-
private void onStatusBarWindowStateChanged(@StatusBarManager.WindowVisibleState int state) {
if (state != WINDOW_STATE_SHOWING
&& mStatusBarStateController.getState() == StatusBarState.SHADE) {
@@ -4903,12 +4783,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mAnimatingOnDown = mHeightAnimator != null && !mIsSpringBackAnimation;
mMinExpandHeight = 0.0f;
mDownTime = mSystemClock.uptimeMillis();
- if (mAnimatingOnDown && mClosing && !mHintAnimationRunning) {
+ if (mAnimatingOnDown && mClosing) {
cancelHeightAnimator();
mTouchSlopExceeded = true;
mShadeLog.v("NotificationPanelViewController MotionEvent intercepted:"
- + " mAnimatingOnDown: true, mClosing: true, mHintAnimationRunning:"
- + " false");
+ + " mAnimatingOnDown: true, mClosing: true");
return true;
}
if (!mTracking || isFullyCollapsed()) {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
index cdbea8185edd..b3f6e1681ad6 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
@@ -199,12 +199,6 @@ interface ShadeViewController {
/** Animate to expanded shade after a delay in ms. Used for lockscreen to shade transition. */
fun transitionToExpandedShade(delay: Long)
- /**
- * Returns whether the unlock hint animation is running. The unlock hint animation is when the
- * user taps the lock screen, causing the contents of the lock screen visually bounce.
- */
- val isUnlockHintRunning: Boolean
-
/** @see ViewGroupFadeHelper.reset */
fun resetViewGroupFade()
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
index 189375620285..b8a41019419d 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
@@ -73,7 +73,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() : ShadeViewController {
return false
}
override fun transitionToExpandedShade(delay: Long) {}
- override val isUnlockHintRunning: Boolean = false
override fun resetViewGroupFade() {}
override fun setKeyguardTransitionProgress(keyguardAlpha: Float, keyguardTranslationY: Int) {}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 3f37c60bee8d..c760227aa124 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -776,7 +776,7 @@ public class NotificationShelf extends ActivatableNotificationView implements St
}
} else if (viewEnd >= shelfClipStart
- && (!mAmbientState.isUnlockHintRunning() || view.isInShelf())
+ && view.isInShelf()
&& (mAmbientState.isShadeExpanded()
|| (!view.isPinned() && !view.isHeadsUpAnimatingAway()))) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
index 95e74f210c5d..38a368e1fdc8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
@@ -86,7 +86,6 @@ public class AmbientState implements Dumpable {
private boolean mExpansionChanging;
private boolean mIsSmallScreen;
private boolean mPulsing;
- private boolean mUnlockHintRunning;
private float mHideAmount;
private boolean mAppearing;
private float mPulseHeight = MAX_PULSE_HEIGHT;
@@ -592,14 +591,6 @@ public class AmbientState implements Dumpable {
mIsSmallScreen = smallScreen;
}
- public void setUnlockHintRunning(boolean unlockHintRunning) {
- mUnlockHintRunning = unlockHintRunning;
- }
-
- public boolean isUnlockHintRunning() {
- return mUnlockHintRunning;
- }
-
/**
* @return Whether we need to do a fling down after swiping up on lockscreen.
*/
@@ -770,7 +761,6 @@ public class AmbientState implements Dumpable {
pw.println("mPulseHeight=" + mPulseHeight);
pw.println("mTrackedHeadsUpRow.key=" + logKey(mTrackedHeadsUpRow));
pw.println("mMaxHeadsUpTranslation=" + mMaxHeadsUpTranslation);
- pw.println("mUnlockHintRunning=" + mUnlockHintRunning);
pw.println("mDozeAmount=" + mDozeAmount);
pw.println("mDozing=" + mDozing);
pw.println("mFractionToShade=" + mFractionToShade);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index 5e3a67ece4a5..d934f6e3b599 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -1350,8 +1350,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
*/
private boolean shouldSkipHeightUpdate() {
return mAmbientState.isOnKeyguard()
- && (mAmbientState.isUnlockHintRunning()
- || mAmbientState.isSwipingUp()
+ && (mAmbientState.isSwipingUp()
|| mAmbientState.isFlingingAfterSwipeUpOnLockscreen());
}
@@ -5071,14 +5070,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
mAmbientState.setSmallScreen(isFullWidth);
}
- public void setUnlockHintRunning(boolean running) {
- mAmbientState.setUnlockHintRunning(running);
- if (!running) {
- // re-calculate the stack height which was frozen while running this animation
- updateStackPosition();
- }
- }
-
public void setPanelFlinging(boolean flinging) {
mAmbientState.setFlinging(flinging);
if (!flinging) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
index 93b5ff7268e3..80c0c9ed2f12 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -1200,10 +1200,6 @@ public class NotificationStackScrollLayoutController {
mView.setHeadsUpBoundaries(height, bottomBarHeight);
}
- public void setUnlockHintRunning(boolean running) {
- mView.setUnlockHintRunning(running);
- }
-
public void setPanelFlinging(boolean flinging) {
mView.setPanelFlinging(flinging);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
index cdd410e766a2..8fd515ac1362 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
@@ -126,12 +126,6 @@ constructor(
binding?.onConfigurationChanged()
}
- /** Returns a list of animators to use to animate the indication areas. */
- @Deprecated("Deprecated as part of b/278057014")
- val indicationAreaAnimators: List<ViewPropertyAnimator>
- get() = checkNotNull(binding).getIndicationAreaAnimators()
-
-
override fun hasOverlappingRendering(): Boolean {
return false
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 3afbbfddeb8a..e337215089ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -565,7 +565,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
&& !mKeyguardStateController.isOccluded()
&& !mKeyguardStateController.canDismissLockScreen()
&& !bouncerIsAnimatingAway()
- && !mShadeViewController.isUnlockHintRunning()
&& !(mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
index 1c9ec27c6a1b..2d3d4d945f07 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
@@ -655,8 +655,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mActivityStarter,
mSharedNotificationContainerInteractor,
mKeyguardViewConfigurator,
- mKeyguardFaceAuthInteractor,
- mKeyguardRootView);
+ mKeyguardFaceAuthInteractor);
mNotificationPanelViewController.initDependencies(
mCentralSurfaces,
null,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
index 7aeafeb2a752..638c2665cb20 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
@@ -866,37 +866,6 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
- public void testUnlockAnimationDoesNotAffectScrim() {
- mNotificationPanelViewController.onUnlockHintStarted();
- verify(mScrimController).setExpansionAffectsAlpha(false);
- mNotificationPanelViewController.onUnlockHintFinished();
- verify(mScrimController).setExpansionAffectsAlpha(true);
- }
-
- @Test
- public void testUnlockHintAnimation_runs_whenNotInPowerSaveMode_andDozeAmountIsZero() {
- when(mPowerManager.isPowerSaveMode()).thenReturn(false);
- when(mAmbientState.getDozeAmount()).thenReturn(0f);
- mNotificationPanelViewController.startUnlockHintAnimation();
- assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isTrue();
- }
-
- @Test
- public void testUnlockHintAnimation_doesNotRun_inPowerSaveMode() {
- when(mPowerManager.isPowerSaveMode()).thenReturn(true);
- mNotificationPanelViewController.startUnlockHintAnimation();
- assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isFalse();
- }
-
- @Test
- public void testUnlockHintAnimation_doesNotRun_whenDozeAmountNotZero() {
- when(mPowerManager.isPowerSaveMode()).thenReturn(false);
- when(mAmbientState.getDozeAmount()).thenReturn(0.5f);
- mNotificationPanelViewController.startUnlockHintAnimation();
- assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isFalse();
- }
-
- @Test
public void setKeyguardStatusBarAlpha_setsAlphaOnKeyguardStatusBarController() {
float statusBarAlpha = 0.5f;
@@ -1056,36 +1025,6 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
- public void onEmptySpaceClicked_notDozingAndFaceDetectionIsNotRunning_startsUnlockAnimation() {
- StatusBarStateController.StateListener statusBarStateListener =
- mNotificationPanelViewController.getStatusBarStateListener();
- statusBarStateListener.onStateChanged(KEYGUARD);
- mNotificationPanelViewController.setDozing(false, false);
- when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(false);
-
- // This sets the dozing state that is read when onMiddleClicked is eventually invoked.
- mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
- mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
-
- verify(mNotificationStackScrollLayoutController).setUnlockHintRunning(true);
- }
-
- @Test
- public void onEmptySpaceClicked_notDozingAndFaceDetectionIsRunning_doesNotStartUnlockHint() {
- StatusBarStateController.StateListener statusBarStateListener =
- mNotificationPanelViewController.getStatusBarStateListener();
- statusBarStateListener.onStateChanged(KEYGUARD);
- mNotificationPanelViewController.setDozing(false, false);
- when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(true);
-
- // This sets the dozing state that is read when onMiddleClicked is eventually invoked.
- mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
- mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
-
- verify(mNotificationStackScrollLayoutController, never()).setUnlockHintRunning(true);
- }
-
- @Test
public void onEmptySpaceClicked_whenDozingAndOnKeyguard_doesNotRequestFaceAuth() {
StatusBarStateController.StateListener statusBarStateListener =
mNotificationPanelViewController.getStatusBarStateListener();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
index 72fcdec3c44c..eb62391855e8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
@@ -322,26 +322,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
}
@Test
- public void setUnlockHintRunning_updatesStackEndHeightOnlyOnFinish() {
- final float expansionFraction = 0.5f;
- mAmbientState.setStatusBarState(StatusBarState.KEYGUARD);
- mStackScroller.setUnlockHintRunning(true);
-
- // Validate that when the animation is running, we update only the stackHeight
- clearInvocations(mAmbientState);
- mStackScroller.updateStackEndHeightAndStackHeight(expansionFraction);
- verify(mAmbientState, never()).setStackEndHeight(anyFloat());
- verify(mAmbientState).setStackHeight(anyFloat());
-
- // Validate that when the animation ends the stackEndHeight is recalculated immediately
- clearInvocations(mAmbientState);
- mStackScroller.setUnlockHintRunning(false);
- verify(mAmbientState).setUnlockHintRunning(eq(false));
- verify(mAmbientState).setStackEndHeight(anyFloat());
- verify(mAmbientState).setStackHeight(anyFloat());
- }
-
- @Test
public void testNotDimmedOnKeyguard() {
when(mBarState.getState()).thenReturn(StatusBarState.SHADE);
mStackScroller.setDimmed(true /* dimmed */, false /* animate */);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
index 798c3f95b47b..ba4e8d325abc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -268,7 +268,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
@Test
public void onPanelExpansionChanged_neverShowsDuringHintAnimation() {
- when(mShadeViewController.isUnlockHintRunning()).thenReturn(true);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
verify(mPrimaryBouncerInteractor, never()).setPanelExpansion(anyFloat());
}