Loading src/com/android/launcher3/Launcher.java +1 −0 Original line number Diff line number Diff line Loading @@ -1169,6 +1169,7 @@ public class Launcher extends StatefulActivity<LauncherState> } AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE); DragView.removeAllViews(this); TraceHelper.INSTANCE.endSection(traceToken); } Loading src/com/android/launcher3/dragndrop/DragView.java +15 −0 Original line number Diff line number Diff line Loading @@ -578,4 +578,19 @@ 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); } } } } Loading
src/com/android/launcher3/Launcher.java +1 −0 Original line number Diff line number Diff line Loading @@ -1169,6 +1169,7 @@ public class Launcher extends StatefulActivity<LauncherState> } AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE); DragView.removeAllViews(this); TraceHelper.INSTANCE.endSection(traceToken); } Loading
src/com/android/launcher3/dragndrop/DragView.java +15 −0 Original line number Diff line number Diff line Loading @@ -578,4 +578,19 @@ 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); } } } }