commit | e8c0f83fb289aeb7ffae97a54bc714374df1eb86 | [log] [tgz] |
---|---|---|
author | Samuel Fufa <sfufa@google.com> | Tue Jun 16 14:24:49 2020 -0700 |
committer | Samuel Fufa <sfufa@google.com> | Tue Jun 16 16:28:37 2020 -0700 |
tree | ef60f676eb9882c67ffa4749b9d3eec1f5a35b94 | |
parent | f2b8c927a90f7e8b7414368002844a06f8c0d79b [diff] |
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
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java index 30a34e4..b34d3cd 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java
@@ -122,7 +122,7 @@ if (mLauncher.getWorkspace().isSwitchingState()) return false; // Start the drag mLauncher.getWorkspace().beginDragShared(v, this, new DragOptions()); - return false; + return true; }; public HotseatPredictionController(Launcher launcher) {