From c18a13d97f516de914181ccd8c6565970354af16 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 1 Jun 2017 17:55:05 -0700 Subject: [PATCH] AmbientIndication: Add tap again hint Adds a hint for tapping the ambient indication again to open. Also fixes an issue where the indication bottom padding was not correctly updated if the indication was shown while the panel is collapsed. Bug: 38387500 Test: tap indication, verify it shows the tap-again-to-open hint. Also verify that if the indication gets set while the phone is unlocked that sufficient space is reserved after transitioning to the lockscreen. Change-Id: Ie9a152b0bd86807958376fd278ef9502c03af6b2 --- .../android/systemui/statusbar/phone/StatusBar.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 3906e402b0131..5597979b25de9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -4647,6 +4647,11 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void onActivated(ActivatableNotificationView view) { + onActivated((View)view); + mStackScroller.setActivatedChild(view); + } + + public void onActivated(View view) { mLockscreenGestureLogger.write( MetricsEvent.ACTION_LS_NOTE, 0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */); @@ -4655,7 +4660,6 @@ public class StatusBar extends SystemUI implements DemoMode, if (previousView != null) { previousView.makeInactive(true /* animate */); } - mStackScroller.setActivatedChild(view); } /** @@ -4689,11 +4693,15 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void onActivationReset(ActivatableNotificationView view) { if (view == mStackScroller.getActivatedChild()) { - mKeyguardIndicationController.hideTransientIndication(); mStackScroller.setActivatedChild(null); + onActivationReset((View)view); } } + public void onActivationReset(View view) { + mKeyguardIndicationController.hideTransientIndication(); + } + public void onTrackingStarted() { runPostCollapseRunnables(); }