Loading src/com/android/launcher3/Launcher.java +3 −0 Original line number Diff line number Diff line Loading @@ -2497,6 +2497,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche @Override public void bindAllApplications(AppInfo[] apps, int flags) { mAppsView.getAppsStore().setApps(apps, flags); PopupContainerWithArrow.dismissInvalidPopup(this); } /** Loading Loading @@ -2528,6 +2529,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche public void bindWorkspaceItemsChanged(List<WorkspaceItemInfo> updated) { if (!updated.isEmpty()) { mWorkspace.updateShortcuts(updated); PopupContainerWithArrow.dismissInvalidPopup(this); } } Loading @@ -2552,6 +2554,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche public void bindWorkspaceComponentsRemoved(final ItemInfoMatcher matcher) { mWorkspace.removeItemsByMatcher(matcher); mDragController.onAppsRemoved(matcher); PopupContainerWithArrow.dismissInvalidPopup(this); } @Override Loading src/com/android/launcher3/popup/PopupContainerWithArrow.java +11 −0 Original line number Diff line number Diff line Loading @@ -599,6 +599,17 @@ public class PopupContainerWithArrow<T extends BaseDraggingActivity> extends Arr } } /** * Dismisses the popup if it is no longer valid */ public static void dismissInvalidPopup(BaseDraggingActivity activity) { PopupContainerWithArrow popup = getOpen(activity); if (popup != null && (!popup.mOriginalIcon.isAttachedToWindow() || !canShow(popup.mOriginalIcon, (ItemInfo) popup.mOriginalIcon.getTag()))) { popup.animateClose(); } } /** * Handler to control drag-and-drop for popup items */ Loading src/com/android/launcher3/secondarydisplay/SecondaryDisplayLauncher.java +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.LauncherAppWidgetInfo; import com.android.launcher3.model.data.PromiseAppInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.popup.PopupContainerWithArrow; import com.android.launcher3.popup.PopupDataProvider; import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.IntArray; Loading Loading @@ -296,6 +297,7 @@ public class SecondaryDisplayLauncher extends BaseDraggingActivity @Override public void bindAllApplications(AppInfo[] apps, int flags) { mAppsView.getAppsStore().setApps(apps, flags); PopupContainerWithArrow.dismissInvalidPopup(this); } public PopupDataProvider getPopupDataProvider() { Loading Loading
src/com/android/launcher3/Launcher.java +3 −0 Original line number Diff line number Diff line Loading @@ -2497,6 +2497,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche @Override public void bindAllApplications(AppInfo[] apps, int flags) { mAppsView.getAppsStore().setApps(apps, flags); PopupContainerWithArrow.dismissInvalidPopup(this); } /** Loading Loading @@ -2528,6 +2529,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche public void bindWorkspaceItemsChanged(List<WorkspaceItemInfo> updated) { if (!updated.isEmpty()) { mWorkspace.updateShortcuts(updated); PopupContainerWithArrow.dismissInvalidPopup(this); } } Loading @@ -2552,6 +2554,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche public void bindWorkspaceComponentsRemoved(final ItemInfoMatcher matcher) { mWorkspace.removeItemsByMatcher(matcher); mDragController.onAppsRemoved(matcher); PopupContainerWithArrow.dismissInvalidPopup(this); } @Override Loading
src/com/android/launcher3/popup/PopupContainerWithArrow.java +11 −0 Original line number Diff line number Diff line Loading @@ -599,6 +599,17 @@ public class PopupContainerWithArrow<T extends BaseDraggingActivity> extends Arr } } /** * Dismisses the popup if it is no longer valid */ public static void dismissInvalidPopup(BaseDraggingActivity activity) { PopupContainerWithArrow popup = getOpen(activity); if (popup != null && (!popup.mOriginalIcon.isAttachedToWindow() || !canShow(popup.mOriginalIcon, (ItemInfo) popup.mOriginalIcon.getTag()))) { popup.animateClose(); } } /** * Handler to control drag-and-drop for popup items */ Loading
src/com/android/launcher3/secondarydisplay/SecondaryDisplayLauncher.java +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.LauncherAppWidgetInfo; import com.android.launcher3.model.data.PromiseAppInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.popup.PopupContainerWithArrow; import com.android.launcher3.popup.PopupDataProvider; import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.IntArray; Loading Loading @@ -296,6 +297,7 @@ public class SecondaryDisplayLauncher extends BaseDraggingActivity @Override public void bindAllApplications(AppInfo[] apps, int flags) { mAppsView.getAppsStore().setApps(apps, flags); PopupContainerWithArrow.dismissInvalidPopup(this); } public PopupDataProvider getPopupDataProvider() { Loading