Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +12 −0 Original line number Diff line number Diff line Loading @@ -83,4 +83,16 @@ public class BackgroundAppState extends OverviewState { public int getVisibleElements(Launcher launcher) { return super.getVisibleElements(launcher) & ~RECENTS_CLEAR_ALL_BUTTON; } @Override public ScaleAndTranslation getHotseatScaleAndTranslation(Launcher launcher) { if ((getVisibleElements(launcher) & HOTSEAT_ICONS) != 0) { // Translate hotseat offscreen if we show it in overview. ScaleAndTranslation scaleAndTranslation = super.getHotseatScaleAndTranslation(launcher); scaleAndTranslation.translationY = LayoutUtils.getShelfTrackingDistance(launcher, launcher.getDeviceProfile()); return scaleAndTranslation; } return super.getHotseatScaleAndTranslation(launcher); } } quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +4 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,10 @@ public class OverviewState extends LauncherState { // We have no all apps content, so we're still at the fully down progress. return super.getVerticalProgress(launcher); } return getDefaultVerticalProgress(launcher); } public static float getDefaultVerticalProgress(Launcher launcher) { return 1 - (getDefaultSwipeHeight(launcher) / launcher.getAllAppsController().getShiftRange()); } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +5 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.quickstep; import static android.view.View.TRANSLATION_Y; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.NORMAL; Loading Loading @@ -62,6 +61,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.AnimatorSetBuilder; import com.android.launcher3.anim.SpringObjectAnimator; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.uioverrides.states.OverviewState; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.views.FloatingIconView; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -260,8 +260,11 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe } float shelfHiddenProgress = BACKGROUND_APP.getVerticalProgress(activity); float shelfOverviewProgress = OVERVIEW.getVerticalProgress(activity); // Peek based on default overview progress so we can see hotseat if we're showing // that instead of predictions in overview. float defaultOverviewProgress = OverviewState.getDefaultVerticalProgress(activity); float shelfPeekingProgress = shelfHiddenProgress - (shelfHiddenProgress - shelfOverviewProgress) * 0.25f; - (shelfHiddenProgress - defaultOverviewProgress) * 0.25f; float toProgress = mShelfState == ShelfAnimState.HIDE ? shelfHiddenProgress : mShelfState == ShelfAnimState.PEEK Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +14 −0 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ import android.graphics.Canvas; import android.graphics.Rect; import android.os.Build; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Hotseat; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager.StateListener; Loading Loading @@ -250,4 +252,16 @@ public class LauncherRecentsView extends RecentsView<Launcher> implements StateL setDisallowScrollToClearAll(!hasClearAllButton); } } @Override protected boolean shouldStealTouchFromSiblingsBelow(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { // Allow touches to go through to the hotseat. Hotseat hotseat = mActivity.getHotseat(); boolean touchingHotseat = hotseat.isShown() && mActivity.getDragLayer().isEventOverView(hotseat, ev, this); return !touchingHotseat; } return super.shouldStealTouchFromSiblingsBelow(ev); } } quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -521,6 +521,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl // Do not let touch escape to siblings below this view. return isHandlingTouch() || shouldStealTouchFromSiblingsBelow(ev); } protected boolean shouldStealTouchFromSiblingsBelow(MotionEvent ev) { return true; } Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +12 −0 Original line number Diff line number Diff line Loading @@ -83,4 +83,16 @@ public class BackgroundAppState extends OverviewState { public int getVisibleElements(Launcher launcher) { return super.getVisibleElements(launcher) & ~RECENTS_CLEAR_ALL_BUTTON; } @Override public ScaleAndTranslation getHotseatScaleAndTranslation(Launcher launcher) { if ((getVisibleElements(launcher) & HOTSEAT_ICONS) != 0) { // Translate hotseat offscreen if we show it in overview. ScaleAndTranslation scaleAndTranslation = super.getHotseatScaleAndTranslation(launcher); scaleAndTranslation.translationY = LayoutUtils.getShelfTrackingDistance(launcher, launcher.getDeviceProfile()); return scaleAndTranslation; } return super.getHotseatScaleAndTranslation(launcher); } }
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +4 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,10 @@ public class OverviewState extends LauncherState { // We have no all apps content, so we're still at the fully down progress. return super.getVerticalProgress(launcher); } return getDefaultVerticalProgress(launcher); } public static float getDefaultVerticalProgress(Launcher launcher) { return 1 - (getDefaultSwipeHeight(launcher) / launcher.getAllAppsController().getShiftRange()); } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +5 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.quickstep; import static android.view.View.TRANSLATION_Y; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.NORMAL; Loading Loading @@ -62,6 +61,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.AnimatorSetBuilder; import com.android.launcher3.anim.SpringObjectAnimator; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.uioverrides.states.OverviewState; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.views.FloatingIconView; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -260,8 +260,11 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe } float shelfHiddenProgress = BACKGROUND_APP.getVerticalProgress(activity); float shelfOverviewProgress = OVERVIEW.getVerticalProgress(activity); // Peek based on default overview progress so we can see hotseat if we're showing // that instead of predictions in overview. float defaultOverviewProgress = OverviewState.getDefaultVerticalProgress(activity); float shelfPeekingProgress = shelfHiddenProgress - (shelfHiddenProgress - shelfOverviewProgress) * 0.25f; - (shelfHiddenProgress - defaultOverviewProgress) * 0.25f; float toProgress = mShelfState == ShelfAnimState.HIDE ? shelfHiddenProgress : mShelfState == ShelfAnimState.PEEK Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +14 −0 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ import android.graphics.Canvas; import android.graphics.Rect; import android.os.Build; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Hotseat; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager.StateListener; Loading Loading @@ -250,4 +252,16 @@ public class LauncherRecentsView extends RecentsView<Launcher> implements StateL setDisallowScrollToClearAll(!hasClearAllButton); } } @Override protected boolean shouldStealTouchFromSiblingsBelow(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { // Allow touches to go through to the hotseat. Hotseat hotseat = mActivity.getHotseat(); boolean touchingHotseat = hotseat.isShown() && mActivity.getDragLayer().isEventOverView(hotseat, ev, this); return !touchingHotseat; } return super.shouldStealTouchFromSiblingsBelow(ev); } }
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -521,6 +521,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl // Do not let touch escape to siblings below this view. return isHandlingTouch() || shouldStealTouchFromSiblingsBelow(ev); } protected boolean shouldStealTouchFromSiblingsBelow(MotionEvent ev) { return true; } Loading