Fix bugs with hotseat in overview

- Allow touches to go through recents to the hotseat.
- Translate the hotseat with the all apps shelf when swiping
  up in background app state.

Bug: 135222111
Change-Id: Ib887fc25ccfeb406a44074198c11f7b1d245443c
This commit is contained in:
Tony
2019-06-14 20:26:12 -07:00
committed by Tony Wickham
parent e1abaa64c2
commit 32cb616fab
7 changed files with 65 additions and 6 deletions

View File

@@ -2,6 +2,8 @@ package com.android.launcher3.allapps;
import static com.android.launcher3.LauncherState.ALL_APPS_CONTENT;
import static com.android.launcher3.LauncherState.ALL_APPS_HEADER_EXTRA;
import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.VERTICAL_SWIPE_INDICATOR;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_ALL_APPS_FADE;
@@ -28,15 +30,12 @@ import com.android.launcher3.ProgressInterface;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.anim.SpringObjectAnimator;
import com.android.launcher3.anim.PropertySetter;
import com.android.launcher3.anim.SpringObjectAnimator;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ScrimView;
import androidx.dynamicanimation.animation.FloatPropertyCompat;
/**
* Handles AllApps view transition.
* 1) Slides all apps view using direct manipulation
@@ -139,6 +138,15 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
} else {
mLauncher.getSystemUiController().updateUiState(UI_STATE_ALL_APPS, 0);
}
if ((OVERVIEW.getVisibleElements(mLauncher) & HOTSEAT_ICONS) != 0) {
// Translate hotseat with the shelf until reaching overview.
float overviewProgress = OVERVIEW.getVerticalProgress(mLauncher);
if (progress >= overviewProgress || mLauncher.isInState(BACKGROUND_APP)) {
float hotseatShift = (progress - overviewProgress) * mShiftRange;
mLauncher.getHotseat().setTranslationY(hotseatShift);
}
}
}
@Override