Loading go/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +3 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2; import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE; import android.content.Context; import android.view.View; import com.android.launcher3.DeviceProfile; Loading Loading @@ -115,10 +116,10 @@ public class OverviewState extends LauncherState { } public static float getDefaultSwipeHeight(Launcher launcher) { return getDefaultSwipeHeight(launcher.getDeviceProfile()); return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile()); } public static float getDefaultSwipeHeight(DeviceProfile dp) { public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) { return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx; } Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +8 −3 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE; import android.content.Context; import android.graphics.Rect; import android.view.View; Loading Loading @@ -159,11 +160,15 @@ public class OverviewState extends LauncherState { } public static float getDefaultSwipeHeight(Launcher launcher) { return getDefaultSwipeHeight(launcher.getDeviceProfile()); return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile()); } public static float getDefaultSwipeHeight(DeviceProfile dp) { return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx; public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) { float swipeHeight = dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx; if (SysUINavigationMode.getMode(context) == SysUINavigationMode.Mode.NO_BUTTON) { swipeHeight -= dp.getInsets().bottom; } return swipeHeight; } @Override Loading quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { switch (method) { case TestProtocol.REQUEST_HOME_TO_OVERVIEW_SWIPE_HEIGHT: { final float swipeHeight = OverviewState.getDefaultSwipeHeight(mDeviceProfile); OverviewState.getDefaultSwipeHeight(mContext, mDeviceProfile); response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight); return response; } Loading quickstep/src/com/android/quickstep/views/ShelfScrimView.java +4 −2 Original line number Diff line number Diff line Loading @@ -156,12 +156,14 @@ public class ShelfScrimView extends ScrimView implements NavigationModeChangeLis mDragHandleProgress = 1; mMidAlpha = 0; } else { mMidAlpha = Themes.getAttrInteger(getContext(), R.attr.allAppsInterimScrimAlpha); Context context = getContext(); mMidAlpha = Themes.getAttrInteger(context, R.attr.allAppsInterimScrimAlpha); mMidProgress = OVERVIEW.getVerticalProgress(mLauncher); Rect hotseatPadding = dp.getHotseatLayoutPadding(); int hotseatSize = dp.hotseatBarSizePx + dp.getInsets().bottom - hotseatPadding.bottom - hotseatPadding.top; float dragHandleTop = Math.min(hotseatSize, OverviewState.getDefaultSwipeHeight(dp)); float dragHandleTop = Math.min(hotseatSize, OverviewState.getDefaultSwipeHeight(context, dp)); mDragHandleProgress = 1 - (dragHandleTop / mShiftRange); } mTopOffset = dp.getInsets().top - mShelfOffset; Loading Loading
go/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +3 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2; import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE; import android.content.Context; import android.view.View; import com.android.launcher3.DeviceProfile; Loading Loading @@ -115,10 +116,10 @@ public class OverviewState extends LauncherState { } public static float getDefaultSwipeHeight(Launcher launcher) { return getDefaultSwipeHeight(launcher.getDeviceProfile()); return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile()); } public static float getDefaultSwipeHeight(DeviceProfile dp) { public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) { return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx; } Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +8 −3 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE; import android.content.Context; import android.graphics.Rect; import android.view.View; Loading Loading @@ -159,11 +160,15 @@ public class OverviewState extends LauncherState { } public static float getDefaultSwipeHeight(Launcher launcher) { return getDefaultSwipeHeight(launcher.getDeviceProfile()); return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile()); } public static float getDefaultSwipeHeight(DeviceProfile dp) { return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx; public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) { float swipeHeight = dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx; if (SysUINavigationMode.getMode(context) == SysUINavigationMode.Mode.NO_BUTTON) { swipeHeight -= dp.getInsets().bottom; } return swipeHeight; } @Override Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { switch (method) { case TestProtocol.REQUEST_HOME_TO_OVERVIEW_SWIPE_HEIGHT: { final float swipeHeight = OverviewState.getDefaultSwipeHeight(mDeviceProfile); OverviewState.getDefaultSwipeHeight(mContext, mDeviceProfile); response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight); return response; } Loading
quickstep/src/com/android/quickstep/views/ShelfScrimView.java +4 −2 Original line number Diff line number Diff line Loading @@ -156,12 +156,14 @@ public class ShelfScrimView extends ScrimView implements NavigationModeChangeLis mDragHandleProgress = 1; mMidAlpha = 0; } else { mMidAlpha = Themes.getAttrInteger(getContext(), R.attr.allAppsInterimScrimAlpha); Context context = getContext(); mMidAlpha = Themes.getAttrInteger(context, R.attr.allAppsInterimScrimAlpha); mMidProgress = OVERVIEW.getVerticalProgress(mLauncher); Rect hotseatPadding = dp.getHotseatLayoutPadding(); int hotseatSize = dp.hotseatBarSizePx + dp.getInsets().bottom - hotseatPadding.bottom - hotseatPadding.top; float dragHandleTop = Math.min(hotseatSize, OverviewState.getDefaultSwipeHeight(dp)); float dragHandleTop = Math.min(hotseatSize, OverviewState.getDefaultSwipeHeight(context, dp)); mDragHandleProgress = 1 - (dragHandleTop / mShiftRange); } mTopOffset = dp.getInsets().top - mShelfOffset; Loading