Avoid Crash when longpressing disabled predicted item

If a view does not handle its long press and return true, View.java calls getParent().showContextMenuForChild(this). However, in Hybrid hotseat case, predicted icons are removed from the hotseat when user long presses an icon. This will result in getParent() returning null.

Bug: 159064799
Change-Id: I80d8f27cbc20b94b0381e767584a1f6854d17e2c
This commit is contained in:
Samuel Fufa
2020-06-16 14:24:49 -07:00
parent f2b8c927a9
commit e8c0f83fb2
@@ -122,7 +122,7 @@ public class HotseatPredictionController implements DragController.DragListener,
if (mLauncher.getWorkspace().isSwitchingState()) return false;
// Start the drag
mLauncher.getWorkspace().beginDragShared(v, this, new DragOptions());
return false;
return true;
};
public HotseatPredictionController(Launcher launcher) {