Merge "Revert "Clear all DragView in onSaveInstanceState""

This commit is contained in:
TreeHugger Robot
2022-02-17 20:45:46 +00:00
committed by Android (Google) Code Review
2 changed files with 0 additions and 17 deletions
-2
View File
@@ -1682,8 +1682,6 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
AbstractFloatingView.closeOpenViews(this, false, TYPE_ALL & ~TYPE_REBIND_SAFE);
finishAutoCancelActionMode();
DragView.removeAllViews(this);
if (mPendingRequestArgs != null) {
outState.putParcelable(RUNTIME_STATE_PENDING_REQUEST_ARGS, mPendingRequestArgs);
}
@@ -565,19 +565,4 @@ public abstract class DragView<T extends Context & ActivityContext> extends Fram
iv.setImageDrawable(drawable);
return iv;
}
/**
* Removes any stray DragView from the DragLayer.
*/
public static void removeAllViews(ActivityContext activity) {
BaseDragLayer dragLayer = activity.getDragLayer();
// Iterate in reverse order. DragView is added later to the dragLayer,
// and will be one of the last views.
for (int i = dragLayer.getChildCount() - 1; i >= 0; i--) {
View child = dragLayer.getChildAt(i);
if (child instanceof DragView) {
dragLayer.removeView(child);
}
}
}
}