Avoid flicker to drop a widget that needs a config activity.

When dropping a widget that requires an config activity, drop a
PendingAppWidgetHostView to workspace

Adb command to try the feature:

adb shell device_config put launcher com.android.launcher3.enable_add_app_widget_via_config_activity_v2 true

Fix: 284236964
Test: manual
Flag: aconfig launcher.enable_add_app_widget_via_config_activity_v2 DISABLED
Change-Id: Ifd0be5c607a388cf8a8f6d77b46c03112e3e599f
This commit is contained in:
Fengjiang Li
2024-01-26 10:00:47 -08:00
parent 8ca8368730
commit 8bd66ee82d
6 changed files with 165 additions and 34 deletions
+1 -1
View File
@@ -2988,7 +2988,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
}
public void animateWidgetDrop(ItemInfo info, CellLayout cellLayout, final DragView dragView,
final Runnable onCompleteRunnable, int animationType, final View finalView,
final Runnable onCompleteRunnable, int animationType, @Nullable final View finalView,
boolean external) {
int[] finalPos = new int[2];
float scaleXY[] = new float[2];