mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Fix indexoutofbounds folder preview
The indexoutofbounds issue came from the fact that folder was being animated open when there are no items in preview. It might be a race condition where we try to open the folder at a time where it's actually being emptied. This check should prevent folders from running animateOpen() if there's <= 1 items, avoiding the outofbounds error Fix: 298740874 Flag: no flag Test: no test Change-Id: I31ed53fbdf22a7f19bc9ec414242312afe7c6cd2
This commit is contained in:
@@ -645,6 +645,11 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
* is played.
|
||||
*/
|
||||
private void animateOpen(List<WorkspaceItemInfo> items, int pageNo) {
|
||||
if (items == null || items.size() <= 1) {
|
||||
Log.d(TAG, "Couldn't animate folder open because items is: " + items);
|
||||
return;
|
||||
}
|
||||
|
||||
Folder openFolder = getOpen(mActivityContext);
|
||||
if (openFolder != null && openFolder != this) {
|
||||
// Close any open folder before opening a folder.
|
||||
|
||||
Reference in New Issue
Block a user