Fix task bar crashing in small screen with task bar / nav bar unification on

A few params are not set in device profile when task bar (in large screen) is not present, and hence the calculation below causes a crash

Test: Make sure that it doesn't crash in small screen gesture nav mode
Bug: 274517647
Change-Id: I3a61a64ac931fac4aee1a3c40ed54ab9ded298a7
This commit is contained in:
Tracy Zhou
2023-10-05 16:37:47 -07:00
parent d45403ee2d
commit 0812a9495c

View File

@@ -458,7 +458,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
*/
private AnimatorPlaybackController createIconAlignmentController(DeviceProfile launcherDp) {
PendingAnimation setter = new PendingAnimation(100);
if (TaskbarManager.isPhoneButtonNavMode(mActivity)) {
if (TaskbarManager.isPhoneMode(launcherDp)) {
// No animation for icons in small-screen
return setter.createPlaybackController();
}