summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorvadimt <vadimt@google.com>2019-02-14 18:46:36 -0800
committervadimt <vadimt@google.com>2019-05-02 15:40:18 -0700
commit04f356fe175b89c56de98b2a53f11a0b334bd10c (patch)
treea44a783bba5d202c9d8319224a1f7ddc94a561fb /src/com/android/launcher3/CellLayout.java
parenta34072b76b2fbbf8343a9791e35f22971a0d5fd0 (diff)
downloadpackages_apps_Trebuchet-04f356fe175b89c56de98b2a53f11a0b334bd10c.tar.gz
packages_apps_Trebuchet-04f356fe175b89c56de98b2a53f11a0b334bd10c.tar.bz2
packages_apps_Trebuchet-04f356fe175b89c56de98b2a53f11a0b334bd10c.zip
Fixing jank in folder animation.
This continues ag/6410337 Bug: 69236787 Test: Manual Change-Id: Iac9f7ab21bf3741846b9721d4c8235e8fc49f7fb
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r--src/com/android/launcher3/CellLayout.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index fe6bbc08a..3eb01e6c3 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -48,6 +48,9 @@ import android.view.ViewDebug;
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.Collections;
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 @@ public class CellLayout extends ViewGroup implements Transposable {
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;