mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Pause expensive view updates before setting hw/sw layers.
Prevents widgets from updating mid animation. Also pauses view updates during app close animation. Bug: 220939231 Bug: 230617085 Bug: 226171754 Test: manual Change-Id: I0138d57e6a7b2c22fd9a029e971b3e27c7e9f22e
This commit is contained in:
@@ -3265,7 +3265,11 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
}
|
||||
}
|
||||
|
||||
private View mapOverCellLayout(CellLayout layout, ItemOperator op) {
|
||||
/**
|
||||
* Perform {param operator} over all the items in a given {param layout}.
|
||||
* @return The first item that satisfies the operator or null.
|
||||
*/
|
||||
public View mapOverCellLayout(CellLayout layout, ItemOperator operator) {
|
||||
// TODO(b/128460496) Potential race condition where layout is not yet loaded
|
||||
if (layout == null) {
|
||||
return null;
|
||||
@@ -3275,7 +3279,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
final int itemCount = container.getChildCount();
|
||||
for (int itemIdx = 0; itemIdx < itemCount; itemIdx++) {
|
||||
View item = container.getChildAt(itemIdx);
|
||||
if (op.evaluate((ItemInfo) item.getTag(), item)) {
|
||||
if (operator.evaluate((ItemInfo) item.getTag(), item)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user