summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2022-02-17 20:45:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-02-17 20:45:46 +0000
commit49141ccf2ed535a49c1402e34fec494fb7ec5fd9 (patch)
tree6bee3a61a6c8b64dcd1599c0d91bf08beedc206b /src
parenta2215455da55827947252942a71385b9077a67a4 (diff)
parentbaf1ef55abe488b382281afca611dbe7c0f800b3 (diff)
downloadLauncher3-49141ccf2ed535a49c1402e34fec494fb7ec5fd9.tar.gz
Merge "Revert "Clear all DragView in onSaveInstanceState""
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java2
-rw-r--r--src/com/android/launcher3/dragndrop/DragView.java15
2 files changed, 0 insertions, 17 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index fcd147ffdf..8fb2f53ec6 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -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);
}
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java
index 8bfd774918..b914ae2dac 100644
--- a/src/com/android/launcher3/dragndrop/DragView.java
+++ b/src/com/android/launcher3/dragndrop/DragView.java
@@ -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);
- }
- }
- }
}