Merge "Handle edge cases for haptic feedback on shade opening." into tm-qpr-dev
This commit is contained in:
@@ -2157,6 +2157,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
}
|
}
|
||||||
ValueAnimator animator = createHeightAnimator(target, overshootAmount);
|
ValueAnimator animator = createHeightAnimator(target, overshootAmount);
|
||||||
if (expand) {
|
if (expand) {
|
||||||
|
maybeVibrateOnOpening(true /* openingWithTouch */);
|
||||||
if (expandBecauseOfFalsing && vel < 0) {
|
if (expandBecauseOfFalsing && vel < 0) {
|
||||||
vel = 0;
|
vel = 0;
|
||||||
}
|
}
|
||||||
@@ -2167,6 +2168,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
animator.setDuration(SHADE_OPEN_SPRING_OUT_DURATION);
|
animator.setDuration(SHADE_OPEN_SPRING_OUT_DURATION);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
mHasVibratedOnOpen = false;
|
||||||
if (shouldUseDismissingAnimation()) {
|
if (shouldUseDismissingAnimation()) {
|
||||||
if (vel == 0) {
|
if (vel == 0) {
|
||||||
animator.setInterpolator(Interpolators.PANEL_CLOSE_ACCELERATED);
|
animator.setInterpolator(Interpolators.PANEL_CLOSE_ACCELERATED);
|
||||||
@@ -6375,7 +6377,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
mShadeLog.logHasVibrated(mHasVibratedOnOpen, mExpandedFraction);
|
mShadeLog.logHasVibrated(mHasVibratedOnOpen, mExpandedFraction);
|
||||||
}
|
}
|
||||||
addMovement(event);
|
addMovement(event);
|
||||||
if (!isFullyCollapsed()) {
|
if (!isFullyCollapsed() && !isOnKeyguard()) {
|
||||||
maybeVibrateOnOpening(true /* openingWithTouch */);
|
maybeVibrateOnOpening(true /* openingWithTouch */);
|
||||||
}
|
}
|
||||||
float h = y - mInitialExpandY;
|
float h = y - mInitialExpandY;
|
||||||
|
|||||||
Reference in New Issue
Block a user