Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dedfca2a authored by Adam Cohen's avatar Adam Cohen
Browse files

Preventing crash when hovering over folder icon with widget shortcut

issue 13748105

Change-Id: I053f6c7748310ad117ec216655e6147bfe6e4f85
parent 5eed5d8c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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);