Fixing jank in folder animation.
This continues ag/6410337
Bug: 69236787
Test: Manual
Change-Id: Iac9f7ab21bf3741846b9721d4c8235e8fc49f7fb
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index fe6bbc0..3eb01e6 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -48,6 +48,9 @@
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
+import androidx.annotation.IntDef;
+import androidx.core.view.ViewCompat;
+
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.accessibility.DragAndDropAccessibilityDelegate;
import com.android.launcher3.accessibility.FolderAccessibilityHelper;
@@ -75,9 +78,6 @@
import java.util.Comparator;
import java.util.Stack;
-import androidx.annotation.IntDef;
-import androidx.core.view.ViewCompat;
-
public class CellLayout extends ViewGroup implements Transposable {
public static final int WORKSPACE_ACCESSIBILITY_DRAG = 2;
public static final int FOLDER_ACCESSIBILITY_DRAG = 1;
@@ -360,6 +360,10 @@
mShortcutsAndWidgets.setLayerType(hasLayer ? LAYER_TYPE_HARDWARE : LAYER_TYPE_NONE, sPaint);
}
+ public boolean isHardwareLayerEnabled() {
+ return mShortcutsAndWidgets.getLayerType() == LAYER_TYPE_HARDWARE;
+ }
+
public void setCellDimensions(int width, int height) {
mFixedCellWidth = mCellWidth = width;
mFixedCellHeight = mCellHeight = height;