Avoid playing taskbar haptic when swiping up from home
Only play the haptic if the stashed value actually changed. In the case of home-to-overview, taskbar is unstashed already. Fixes: 314311118 Flag: none Test: Manual, feel for haptics during home-to-overview Change-Id: I36f70740d35bd98feafbb3980f861db16705b1da
This commit is contained in:
1 parent
50ae58df57
commit
d1915657cc
1 file changed
+5
-1
@@ -1320,8 +1320,12 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
* Called when we want to unstash taskbar when user performs swipes up gesture.
|
||||
*/
|
||||
public void onSwipeToUnstashTaskbar() {
|
||||
VibratorWrapper.INSTANCE.get(this).vibrateForTaskbarUnstash();
|
||||
boolean wasStashed = mControllers.taskbarStashController.isStashed();
|
||||
mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(/* stash= */ false);
|
||||
boolean isStashed = mControllers.taskbarStashController.isStashed();
|
||||
if (isStashed != wasStashed) {
|
||||
VibratorWrapper.INSTANCE.get(this).vibrateForTaskbarUnstash();
|
||||
}
|
||||
mControllers.taskbarEduTooltipController.hide();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user