Allow BaseState.getTransitionDuration to read DeviceProfile

- Changed handheld duration to AllApps to 600

Bug: 227745955
Test: manual
Change-Id: I6f6642440dda3e39947231c2d38e8b60d152e08f
This commit is contained in:
Alex Chau
2022-05-05 13:34:09 +01:00
parent 21ea6828d8
commit a717d1621d
5 changed files with 19 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp
PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED));
mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE);
mOpenCloseAnimator.setDuration(
ALL_APPS.getTransitionDuration(mContext, true /* isToState */)).start();
ALL_APPS.getTransitionDuration(mActivityContext, true /* isToState */)).start();
} else {
mTranslationShift = TRANSLATION_SHIFT_OPENED;
}
@@ -81,7 +81,8 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp
@Override
protected void handleClose(boolean animate) {
Optional.ofNullable(mOnCloseBeginListener).ifPresent(OnCloseListener::onSlideInViewClosed);
handleClose(animate, ALL_APPS.getTransitionDuration(mContext, false /* isToState */));
handleClose(animate,
ALL_APPS.getTransitionDuration(mActivityContext, false /* isToState */));
}
@Override