Correct color extraction on App Widget drop.
Disable color extraction on drop until the workspace is back to its normal size, then re-enable it and force re-coloring. This needs to happen if the drop is on the workspace, but also if the drop is on the secondary target. Fix: 192354264 Test: Manual, see bug for details. Change-Id: I79203f68843d59384503aa76f4813d886e98afa3 Merged-In: If573641e4bb5a98ed6b5008e00f70f4bbe492c24
This commit is contained in:
1 parent
0f3053ceae
commit
43e17301c4
4 files changed
+68
-13
No files matched your search
@@ -1786,8 +1786,11 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
onDropExternal(touchXY, dropTargetLayout, d);
|
||||
} else {
|
||||
final View cell = mDragInfo.cell;
|
||||
final DragView dragView = d.dragView;
|
||||
boolean droppedOnOriginalCellDuringTransition = false;
|
||||
Runnable onCompleteRunnable = null;
|
||||
Runnable onCompleteRunnable = dragView::resumeColorExtraction;
|
||||
|
||||
dragView.disableColorExtraction();
|
||||
|
||||
if (dropTargetLayout != null && !d.cancelled) {
|
||||
// Move internally
|
||||
@@ -1898,7 +1901,9 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
AppWidgetProviderInfo pInfo = hostView.getAppWidgetInfo();
|
||||
if (pInfo != null && pInfo.resizeMode != AppWidgetProviderInfo.RESIZE_NONE
|
||||
&& !options.isAccessibleDrag) {
|
||||
final Runnable previousRunnable = onCompleteRunnable;
|
||||
onCompleteRunnable = () -> {
|
||||
previousRunnable.run();
|
||||
if (!isPageInTransition()) {
|
||||
AppWidgetResizeFrame.showForWidget(hostView, cellLayout);
|
||||
}
|
||||
@@ -1967,7 +1972,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
parent.onDropChild(cell);
|
||||
|
||||
mLauncher.getStateManager().goToState(NORMAL, SPRING_LOADED_EXIT_DELAY,
|
||||
onCompleteRunnable == null ? null : forSuccessCallback(onCompleteRunnable));
|
||||
forSuccessCallback(onCompleteRunnable));
|
||||
mStatsLogManager.logger().withItemInfo(d.dragInfo).withInstanceId(d.logInstanceId)
|
||||
.log(LauncherEvent.LAUNCHER_ITEM_DROP_COMPLETED);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user