Merge "Fix issue that widget drag and drop failed when are off" into main

This commit is contained in:
Shamali Patwa
2024-10-09 22:27:19 +00:00
committed by Android (Google) Code Review
+9 -4
View File
@@ -1872,13 +1872,18 @@ public class Launcher extends StatefulActivity<LauncherState>
}
}
// Exit spring loaded mode if necessary after adding the widget
Runnable onComplete = MULTI_SELECT_EDIT_MODE.get() ? null
: () -> mStateManager.goToState(NORMAL, SPRING_LOADED_EXIT_DELAY);
// Exit spring loaded mode if necessary after adding the widget; unless config activity was
// started.
Runnable onComplete = MULTI_SELECT_EDIT_MODE.get() ? null : () -> mStateManager.goToState(
NORMAL, SPRING_LOADED_EXIT_DELAY);
completeAddAppWidget(appWidgetId, info, boundWidget,
addFlowHandler.getProviderInfo(this), addFlowHandler.needsConfigure(),
false, widgetPreviewBitmap);
mWorkspace.removeExtraEmptyScreenDelayed(delay, false, onComplete);
// Remove extra screen if widget drop concluded. If a config activity was started, extra
// screen will be removed when we get back its result.
if (!isActivityStarted) {
mWorkspace.removeExtraEmptyScreenDelayed(delay, false, onComplete);
}
}
public void addPendingItem(PendingAddItemInfo info, int container, int screenId,