summaryrefslogtreecommitdiff
path: root/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep/src/com/android/quickstep/LauncherActivityInterface.java')
-rw-r--r--quickstep/src/com/android/quickstep/LauncherActivityInterface.java40
1 files changed, 19 insertions, 21 deletions
diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
index c13b95f2ab..fb1391a309 100644
--- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
@@ -44,9 +44,8 @@ import com.android.launcher3.statehandlers.DepthController.ClampedDepthProperty;
import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.taskbar.LauncherTaskbarUIController;
import com.android.launcher3.touch.PagedOrientationHandler;
-import com.android.launcher3.util.DisplayController;
-import com.android.launcher3.util.DisplayController.NavigationMode;
import com.android.quickstep.GestureState.GestureEndTarget;
+import com.android.quickstep.SysUINavigationMode.Mode;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.AnimatorControllerWithResistance;
import com.android.quickstep.util.LayoutUtils;
@@ -72,9 +71,8 @@ public final class LauncherActivityInterface extends
@Override
public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect,
PagedOrientationHandler orientationHandler) {
- calculateTaskSize(context, dp, outRect);
- if (dp.isVerticalBarLayout()
- && DisplayController.getNavigationMode(context) != NavigationMode.NO_BUTTON) {
+ calculateTaskSize(context, dp, outRect, orientationHandler);
+ if (dp.isVerticalBarLayout() && SysUINavigationMode.getMode(context) != Mode.NO_BUTTON) {
return dp.isSeascape() ? outRect.left : (dp.widthPx - outRect.right);
} else {
return LayoutUtils.getShelfTrackingDistance(context, dp, orientationHandler);
@@ -132,10 +130,11 @@ public final class LauncherActivityInterface extends
pa.addFloat(getDepthController(),
new ClampedDepthProperty(fromDepthRatio, toDepthRatio),
fromDepthRatio, toDepthRatio, LINEAR);
+
}
};
- BaseQuickstepLauncher launcher = factory.initBackgroundStateUI();
+ BaseQuickstepLauncher launcher = factory.initUI();
// Since all apps is not visible, we can safely reset the scroll position.
// This ensures then the next swipe up to all-apps starts from scroll 0.
launcher.getAppsView().reset(false /* animate */);
@@ -174,8 +173,7 @@ public final class LauncherActivityInterface extends
}
@Nullable
- @Override
- public LauncherTaskbarUIController getTaskbarController() {
+ private LauncherTaskbarUIController getTaskbarController() {
BaseQuickstepLauncher launcher = getCreatedActivity();
if (launcher == null) {
return null;
@@ -191,7 +189,7 @@ public final class LauncherActivityInterface extends
launcher != null && launcher.getStateManager().getState().overviewUi
? launcher.getOverviewPanel() : null;
if (recentsView == null || (!launcher.hasBeenResumed()
- && recentsView.getRunningTaskViewId() == -1)) {
+ && recentsView.getRunningTaskId() == -1)) {
// If live tile has ended, return null.
return null;
}
@@ -280,7 +278,6 @@ public final class LauncherActivityInterface extends
@Override
public void closeOverlay() {
- super.closeOverlay();
Launcher launcher = getCreatedActivity();
if (launcher == null) {
return;
@@ -291,23 +288,25 @@ public final class LauncherActivityInterface extends
} else {
om.hideOverlay(150);
}
- LauncherTaskbarUIController taskbarController = getTaskbarController();
- if (taskbarController != null) {
- taskbarController.hideEdu();
- }
+ }
+
+ @Override
+ void onOverviewServiceBound() {
+ final BaseQuickstepLauncher activity = getCreatedActivity();
+ if (activity == null) return;
+ activity.getAppTransitionManager().registerRemoteTransitions();
}
@Override
public @Nullable Animator getParallelAnimationToLauncher(GestureEndTarget endTarget,
- long duration, RecentsAnimationCallbacks callbacks) {
+ long duration) {
LauncherTaskbarUIController uiController = getTaskbarController();
- Animator superAnimator = super.getParallelAnimationToLauncher(
- endTarget, duration, callbacks);
- if (uiController == null || callbacks == null) {
+ Animator superAnimator = super.getParallelAnimationToLauncher(endTarget, duration);
+ if (uiController == null) {
return superAnimator;
}
LauncherState toState = stateFromGestureEndTarget(endTarget);
- Animator taskbarAnimator = uiController.createAnimToLauncher(toState, callbacks, duration);
+ Animator taskbarAnimator = uiController.createAnimToLauncher(toState, duration);
if (superAnimator == null) {
return taskbarAnimator;
} else {
@@ -329,8 +328,7 @@ public final class LauncherActivityInterface extends
if (uiController == null) {
return super.deferStartingActivity(deviceState, ev);
}
- return uiController.isEventOverAnyTaskbarItem(ev)
- || super.deferStartingActivity(deviceState, ev);
+ return uiController.isEventOverAnyTaskbarItem(ev);
}
@Override