mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Preventing crash when hovering over folder icon with widget shortcut
issue 13748105 Change-Id: I053f6c7748310ad117ec216655e6147bfe6e4f85
This commit is contained in:
@@ -344,7 +344,12 @@ public class FolderIcon extends FrameLayout implements FolderListener {
|
||||
mFolderRingAnimator.animateToAcceptState();
|
||||
layout.showFolderAccept(mFolderRingAnimator);
|
||||
mOpenAlarm.setOnAlarmListener(mOnOpenListener);
|
||||
if (SPRING_LOADING_ENABLED) {
|
||||
if (SPRING_LOADING_ENABLED &&
|
||||
((dragInfo instanceof AppInfo) || (dragInfo instanceof ShortcutInfo))) {
|
||||
// TODO: we currently don't support spring-loading for PendingAddShortcutInfos even
|
||||
// though widget-style shortcuts can be added to folders. The issue is that we need
|
||||
// to deal with configuration activities which are currently handled in
|
||||
// Workspace#onDropExternal.
|
||||
mOpenAlarm.setAlarm(ON_OPEN_DELAY);
|
||||
}
|
||||
mDragInfo = (ItemInfo) dragInfo;
|
||||
@@ -362,6 +367,7 @@ public class FolderIcon extends FrameLayout implements FolderListener {
|
||||
item.spanX = 1;
|
||||
item.spanY = 1;
|
||||
} else {
|
||||
// ShortcutInfo
|
||||
item = (ShortcutInfo) mDragInfo;
|
||||
}
|
||||
mFolder.beginExternalDrag(item);
|
||||
|
||||
Reference in New Issue
Block a user