mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Prediction icons in Taskbar were updating when dragging icon in the same place
When dragging an icon in the Taskbar and dropping it in the same spot it triggers new predictions when it shouldn't. Basically, it was thinking that the icon was moved outside of the taskbar which should trigger new predictions. To fix it, it simply required to change the order of the events, sending the UNPIN event before the PIN event. Bug: 202922907 Test: Have at least two prediction icons in the Taskbar, drag an app icon in the Taskbar, and drop it in the same place the prediction icon shouldn't change Change-Id: I6079ff6eb69d7b1cb3c22bebc84511c0abd61cec
This commit is contained in:
committed by
Sebastián Franco
parent
116b51a999
commit
5a6e08c3cd
@@ -137,12 +137,12 @@ public class AppEventProducer implements StatsLogConsumer {
|
||||
if (mLastDragItem == null) {
|
||||
return;
|
||||
}
|
||||
if (isTrackedForHotseatPrediction(atomInfo)) {
|
||||
sendEvent(atomInfo, ACTION_PIN, CONTAINER_HOTSEAT_PREDICTION);
|
||||
}
|
||||
if (isTrackedForHotseatPrediction(mLastDragItem)) {
|
||||
sendEvent(mLastDragItem, ACTION_UNPIN, CONTAINER_HOTSEAT_PREDICTION);
|
||||
}
|
||||
if (isTrackedForHotseatPrediction(atomInfo)) {
|
||||
sendEvent(atomInfo, ACTION_PIN, CONTAINER_HOTSEAT_PREDICTION);
|
||||
}
|
||||
if (isTrackedForWidgetPrediction(atomInfo)) {
|
||||
sendEvent(atomInfo, ACTION_PIN, CONTAINER_WIDGETS_PREDICTION);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user