From b93f59719ab0a21355b5f8df1e226a20c98821cf Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Sun, 12 Jun 2022 22:13:54 -0700 Subject: [PATCH] Fix "software rendering doesn't support hardware bitmaps" from task bar all apps The issue is that there is a delay between when the task bar all apps view is removed and another task bar dispatching draw of an all apps icon. When the window is removed, isHardwareAcceleration() returns false, causing the crash. This crash further restarts launcher, causing launcher to be in the wrong state for a number of things. And hence, this fix should make all the other crashes moot. Fixes: 234617317 Test: Keep dragging all apps icons to split Change-Id: Ifc272d82c1deac8485801473919602563bb3caf0 --- .../launcher3/taskbar/allapps/TaskbarAllAppsController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java index c56ac5b3d0..61b038ed28 100644 --- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java @@ -187,7 +187,7 @@ public final class TaskbarAllAppsController { TaskStackChangeListeners.getInstance().unregisterTaskStackListener(mTaskStackListener); Optional.ofNullable(mAllAppsContext) .map(c -> c.getSystemService(WindowManager.class)) - .ifPresent(m -> m.removeView(mAllAppsContext.getDragLayer())); + .ifPresent(m -> m.removeViewImmediate(mAllAppsContext.getDragLayer())); mAllAppsContext = null; }