|
16 | 16 |
|
17 | 17 | package com.android.launcher3.uioverrides.touchcontrollers;
|
18 | 18 |
|
| 19 | +import static com.android.launcher3.LauncherAppTransitionManagerImpl.INDEX_PAUSE_TO_OVERVIEW_ANIM; |
19 | 20 | import static com.android.launcher3.LauncherState.ALL_APPS;
|
20 |
| -import static com.android.launcher3.LauncherState.HOTSEAT_ICONS; |
21 | 21 | import static com.android.launcher3.LauncherState.NORMAL;
|
22 | 22 | import static com.android.launcher3.LauncherState.OVERVIEW;
|
23 | 23 | import static com.android.launcher3.LauncherState.OVERVIEW_PEEK;
|
24 |
| -import static com.android.launcher3.LauncherStateManager.ANIM_ALL; |
25 | 24 | import static com.android.launcher3.LauncherStateManager.ATOMIC_OVERVIEW_PEEK_COMPONENT;
|
26 | 25 | import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_ALL_APPS_FADE;
|
27 | 26 | import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_ALL_APPS_HEADER_FADE;
|
28 |
| -import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_HOTSEAT_SCALE; |
29 |
| -import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_HOTSEAT_TRANSLATE; |
30 |
| -import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_VERTICAL_PROGRESS; |
31 | 27 | import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_FADE;
|
32 | 28 | import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_SCALE;
|
33 | 29 | import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_TRANSLATE;
|
34 | 30 | import static com.android.launcher3.anim.Interpolators.ACCEL;
|
35 | 31 | import static com.android.launcher3.anim.Interpolators.DEACCEL;
|
36 | 32 | import static com.android.launcher3.anim.Interpolators.DEACCEL_3;
|
37 |
| -import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2; |
38 | 33 | import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC;
|
39 | 34 | import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
|
40 | 35 |
|
|
46 | 41 | import android.view.ViewConfiguration;
|
47 | 42 |
|
48 | 43 | import com.android.launcher3.Launcher;
|
| 44 | +import com.android.launcher3.LauncherAppTransitionManagerImpl; |
49 | 45 | import com.android.launcher3.LauncherState;
|
50 | 46 | import com.android.launcher3.anim.AnimatorSetBuilder;
|
51 | 47 | import com.android.launcher3.anim.Interpolators;
|
@@ -79,7 +75,7 @@ public FlingAndHoldTouchController(Launcher l) {
|
79 | 75 |
|
80 | 76 | @Override
|
81 | 77 | protected long getAtomicDuration() {
|
82 |
| - return 300; |
| 78 | + return LauncherAppTransitionManagerImpl.ATOMIC_DURATION_FROM_PAUSED_TO_OVERVIEW; |
83 | 79 | }
|
84 | 80 |
|
85 | 81 | @Override
|
@@ -179,15 +175,8 @@ public void onDragEnd(float velocity) {
|
179 | 175 | mPeekAnim.cancel();
|
180 | 176 | }
|
181 | 177 |
|
182 |
| - AnimatorSetBuilder builder = new AnimatorSetBuilder(); |
183 |
| - builder.setInterpolator(ANIM_VERTICAL_PROGRESS, OVERSHOOT_1_2); |
184 |
| - builder.setInterpolator(ANIM_ALL_APPS_FADE, DEACCEL_3); |
185 |
| - if ((OVERVIEW.getVisibleElements(mLauncher) & HOTSEAT_ICONS) != 0) { |
186 |
| - builder.setInterpolator(ANIM_HOTSEAT_SCALE, OVERSHOOT_1_2); |
187 |
| - builder.setInterpolator(ANIM_HOTSEAT_TRANSLATE, OVERSHOOT_1_2); |
188 |
| - } |
189 |
| - AnimatorSet overviewAnim = mLauncher.getStateManager().createAtomicAnimation( |
190 |
| - NORMAL, OVERVIEW, builder, ANIM_ALL, ATOMIC_DURATION); |
| 178 | + Animator overviewAnim = mLauncher.getAppTransitionManager().createStateElementAnimation( |
| 179 | + INDEX_PAUSE_TO_OVERVIEW_ANIM); |
191 | 180 | overviewAnim.addListener(new AnimatorListenerAdapter() {
|
192 | 181 | @Override
|
193 | 182 | public void onAnimationEnd(Animator animation) {
|
|
0 commit comments