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();
|
mFolderRingAnimator.animateToAcceptState();
|
||||||
layout.showFolderAccept(mFolderRingAnimator);
|
layout.showFolderAccept(mFolderRingAnimator);
|
||||||
mOpenAlarm.setOnAlarmListener(mOnOpenListener);
|
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);
|
mOpenAlarm.setAlarm(ON_OPEN_DELAY);
|
||||||
}
|
}
|
||||||
mDragInfo = (ItemInfo) dragInfo;
|
mDragInfo = (ItemInfo) dragInfo;
|
||||||
@@ -362,6 +367,7 @@ public class FolderIcon extends FrameLayout implements FolderListener {
|
|||||||
item.spanX = 1;
|
item.spanX = 1;
|
||||||
item.spanY = 1;
|
item.spanY = 1;
|
||||||
} else {
|
} else {
|
||||||
|
// ShortcutInfo
|
||||||
item = (ShortcutInfo) mDragInfo;
|
item = (ShortcutInfo) mDragInfo;
|
||||||
}
|
}
|
||||||
mFolder.beginExternalDrag(item);
|
mFolder.beginExternalDrag(item);
|
||||||
|
|||||||
Reference in New Issue
Block a user