Loading src/com/android/launcher3/Launcher.java +18 −3 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ import com.android.launcher3.DropTarget.DragObject; import com.android.launcher3.accessibility.BaseAccessibilityDelegate.LauncherAction; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.allapps.ActivityAllAppsContainerView; import com.android.launcher3.allapps.AllAppsRecyclerView; import com.android.launcher3.allapps.AllAppsStore; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.allapps.BaseAllAppsContainerView; Loading Loading @@ -196,6 +197,7 @@ import com.android.launcher3.util.TraceHelper; import com.android.launcher3.util.UiThreadHelper; import com.android.launcher3.util.ViewOnDrawExecutor; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.FloatingIconView; import com.android.launcher3.views.FloatingSurfaceView; import com.android.launcher3.views.OptionsPopupView; import com.android.launcher3.views.ScrimView; Loading Loading @@ -2757,8 +2759,8 @@ public class Launcher extends StatefulActivity<LauncherState> * @param supportsAllAppsState If true and we are in All Apps state, looks for view in All Apps. * Else we only looks on the workspace. */ public View getFirstMatchForAppClose(int preferredItemId, String packageName, UserHandle user, boolean supportsAllAppsState) { public @Nullable View getFirstMatchForAppClose(int preferredItemId, String packageName, UserHandle user, boolean supportsAllAppsState) { final Predicate<ItemInfo> preferredItem = info -> info != null && info.id == preferredItemId; final Predicate<ItemInfo> packageAndUserAndApp = info -> Loading @@ -2770,8 +2772,21 @@ public class Launcher extends StatefulActivity<LauncherState> packageName); if (supportsAllAppsState && isInState(LauncherState.ALL_APPS)) { return getFirstMatch(Collections.singletonList(mAppsView.getActiveRecyclerView()), AllAppsRecyclerView activeRecyclerView = mAppsView.getActiveRecyclerView(); View v = getFirstMatch(Collections.singletonList(activeRecyclerView), preferredItem, packageAndUserAndApp); if (activeRecyclerView.getCurrentScrollY() > 0) { RectF locationBounds = new RectF(); FloatingIconView.getLocationBoundsForView(this, v, false, locationBounds, new Rect()); if (locationBounds.top < mAppsView.getHeaderBottom()) { // Icon is covered by scrim, return null to play fallback animation. return null; } } return v; } else { List<ViewGroup> containers = new ArrayList<>(mWorkspace.getPanelCount() + 1); containers.add(mWorkspace.getHotseat().getShortcutsAndWidgets()); Loading src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +1 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ public class ActivityAllAppsContainerView<T extends Context & AppLauncher } @Override protected int getHeaderBottom() { public int getHeaderBottom() { if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) { return super.getHeaderBottom(); } Loading src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +1 −1 Original line number Diff line number Diff line Loading @@ -761,7 +761,7 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte protected abstract BaseAllAppsAdapter<T> createAdapter(AlphabeticalAppsList<T> mAppsList, BaseAdapterProvider[] adapterProviders); protected int getHeaderBottom() { public int getHeaderBottom() { return (int) getTranslationY(); } Loading Loading
src/com/android/launcher3/Launcher.java +18 −3 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ import com.android.launcher3.DropTarget.DragObject; import com.android.launcher3.accessibility.BaseAccessibilityDelegate.LauncherAction; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.allapps.ActivityAllAppsContainerView; import com.android.launcher3.allapps.AllAppsRecyclerView; import com.android.launcher3.allapps.AllAppsStore; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.allapps.BaseAllAppsContainerView; Loading Loading @@ -196,6 +197,7 @@ import com.android.launcher3.util.TraceHelper; import com.android.launcher3.util.UiThreadHelper; import com.android.launcher3.util.ViewOnDrawExecutor; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.FloatingIconView; import com.android.launcher3.views.FloatingSurfaceView; import com.android.launcher3.views.OptionsPopupView; import com.android.launcher3.views.ScrimView; Loading Loading @@ -2757,8 +2759,8 @@ public class Launcher extends StatefulActivity<LauncherState> * @param supportsAllAppsState If true and we are in All Apps state, looks for view in All Apps. * Else we only looks on the workspace. */ public View getFirstMatchForAppClose(int preferredItemId, String packageName, UserHandle user, boolean supportsAllAppsState) { public @Nullable View getFirstMatchForAppClose(int preferredItemId, String packageName, UserHandle user, boolean supportsAllAppsState) { final Predicate<ItemInfo> preferredItem = info -> info != null && info.id == preferredItemId; final Predicate<ItemInfo> packageAndUserAndApp = info -> Loading @@ -2770,8 +2772,21 @@ public class Launcher extends StatefulActivity<LauncherState> packageName); if (supportsAllAppsState && isInState(LauncherState.ALL_APPS)) { return getFirstMatch(Collections.singletonList(mAppsView.getActiveRecyclerView()), AllAppsRecyclerView activeRecyclerView = mAppsView.getActiveRecyclerView(); View v = getFirstMatch(Collections.singletonList(activeRecyclerView), preferredItem, packageAndUserAndApp); if (activeRecyclerView.getCurrentScrollY() > 0) { RectF locationBounds = new RectF(); FloatingIconView.getLocationBoundsForView(this, v, false, locationBounds, new Rect()); if (locationBounds.top < mAppsView.getHeaderBottom()) { // Icon is covered by scrim, return null to play fallback animation. return null; } } return v; } else { List<ViewGroup> containers = new ArrayList<>(mWorkspace.getPanelCount() + 1); containers.add(mWorkspace.getHotseat().getShortcutsAndWidgets()); Loading
src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +1 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ public class ActivityAllAppsContainerView<T extends Context & AppLauncher } @Override protected int getHeaderBottom() { public int getHeaderBottom() { if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) { return super.getHeaderBottom(); } Loading
src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +1 −1 Original line number Diff line number Diff line Loading @@ -761,7 +761,7 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte protected abstract BaseAllAppsAdapter<T> createAdapter(AlphabeticalAppsList<T> mAppsList, BaseAdapterProvider[] adapterProviders); protected int getHeaderBottom() { public int getHeaderBottom() { return (int) getTranslationY(); } Loading