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
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java
index c56ac5b..61b038e 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 @@
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;
}