Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08057e70 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9432151 from eef0b164 to tm-qpr2-release

Change-Id: I8722da9d432e0da121b2286040650cfae1200cd1
parents e852f81a eef0b164
Loading
Loading
Loading
Loading
+19 −9
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@ package com.android.launcher3.taskbar
import android.graphics.Insets
import android.graphics.Region
import android.view.InsetsFrameProvider
import android.view.InsetsState.ITYPE_BOTTOM_MANDATORY_GESTURES
import android.view.InsetsState
import android.view.InsetsState.ITYPE_BOTTOM_MANDATORY_GESTURES
import android.view.InsetsState.ITYPE_BOTTOM_TAPPABLE_ELEMENT
import android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR
import android.view.ViewTreeObserver
@@ -82,31 +82,41 @@ class TaskbarInsetsController(val context: TaskbarActivityContext): LoggableTask
        val contentHeight = controllers.taskbarStashController.contentHeightToReportToApps
        val tappableHeight = controllers.taskbarStashController.tappableHeightToReportToApps
        for (provider in windowLayoutParams.providedInsets) {
            if (provider.type == ITYPE_EXTRA_NAVIGATION_BAR) {
                provider.insetsSize = getInsetsByNavMode(contentHeight)
            } else if (provider.type == ITYPE_BOTTOM_TAPPABLE_ELEMENT
            if (provider.type == ITYPE_EXTRA_NAVIGATION_BAR
                    || provider.type == ITYPE_BOTTOM_MANDATORY_GESTURES) {
                provider.insetsSize = getInsetsByNavMode(contentHeight)
            } else if (provider.type == ITYPE_BOTTOM_TAPPABLE_ELEMENT) {
                provider.insetsSize = getInsetsByNavMode(tappableHeight)
            }
        }

        val imeInsetsSize = getInsetsByNavMode(taskbarHeightForIme)
        // Use 0 insets for the VoiceInteractionWindow (assistant) when gesture nav is enabled.
        val visInsetsSize = getInsetsByNavMode(if (context.isGestureNav) 0 else tappableHeight)
        val insetsSizeOverride = arrayOf(
            InsetsFrameProvider.InsetsSizeOverride(
                TYPE_INPUT_METHOD,
                imeInsetsSize
            ),
        )
        // Use 0 tappableElement insets for the VoiceInteractionWindow when gesture nav is enabled.
        val visInsetsSizeForGestureNavTappableElement = getInsetsByNavMode(0)
        val insetsSizeOverrideForGestureNavTappableElement = arrayOf(
            InsetsFrameProvider.InsetsSizeOverride(
                TYPE_INPUT_METHOD,
                imeInsetsSize
            ),
            InsetsFrameProvider.InsetsSizeOverride(
                TYPE_VOICE_INTERACTION,
                visInsetsSize
            )
                visInsetsSizeForGestureNavTappableElement
            ),
        )
        for (provider in windowLayoutParams.providedInsets) {
            if (context.isGestureNav && provider.type == ITYPE_BOTTOM_TAPPABLE_ELEMENT) {
                provider.insetsSizeOverrides = insetsSizeOverrideForGestureNavTappableElement
            } else {
                provider.insetsSizeOverrides = insetsSizeOverride
            }
        }
    }

    /**
     * @return [Insets] where the [bottomInset] is either used as a bottom inset or
+5 −1
Original line number Diff line number Diff line
@@ -937,7 +937,11 @@ public class QuickstepLauncher extends Launcher {
        // When changing screens, force moving to rest state similar to StatefulActivity.onStop, as
        // StatefulActivity isn't called consistently.
        if ((flags & CHANGE_ACTIVE_SCREEN) != 0) {
            getStateManager().moveToRestState();
            // Do not animate moving to rest state, as it can clash with Launcher#onIdpChanged
            // where reapplyUi calls StateManager's reapplyState during the state change animation,
            // and cancel the state change unexpectedly. The screen will be off during screen
            // transition, hiding the unanimated transition.
            getStateManager().moveToRestState(/* isAnimated = */false);
        }

        if ((flags & CHANGE_NAVIGATION_MODE) != 0) {
+2 −2
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.Utilities.EDGE_NAV_BAR;
import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback;
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
import static com.android.quickstep.util.VibratorWrapper.OVERVIEW_HAPTIC;
import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ONE_HANDED_ACTIVE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;

@@ -42,11 +42,11 @@ import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.taskbar.LauncherTaskbarUIController;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.VibratorWrapper;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.util.AnimatorControllerWithResistance;
import com.android.quickstep.util.MotionPauseDetector;
import com.android.quickstep.util.OverviewToHomeAnim;
import com.android.quickstep.util.VibratorWrapper;
import com.android.quickstep.views.RecentsView;

/**
+2 −2
Original line number Diff line number Diff line
@@ -41,8 +41,8 @@ import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW;
import static com.android.launcher3.states.StateAnimationConfig.SKIP_SCRIM;
import static com.android.launcher3.touch.BothAxesSwipeDetector.DIRECTION_RIGHT;
import static com.android.launcher3.touch.BothAxesSwipeDetector.DIRECTION_UP;
import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC;
import static com.android.launcher3.util.window.RefreshRateTracker.getSingleFrameMs;
import static com.android.quickstep.util.VibratorWrapper.OVERVIEW_HAPTIC;
import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET;
import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA;
import static com.android.quickstep.views.RecentsView.FULLSCREEN_PROGRESS;
@@ -70,11 +70,11 @@ import com.android.launcher3.touch.BaseSwipeDetector;
import com.android.launcher3.touch.BothAxesSwipeDetector;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.TouchController;
import com.android.launcher3.util.VibratorWrapper;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.util.AnimatorControllerWithResistance;
import com.android.quickstep.util.LayoutUtils;
import com.android.quickstep.util.MotionPauseDetector;
import com.android.quickstep.util.VibratorWrapper;
import com.android.quickstep.util.WorkspaceRevealAnim;
import com.android.quickstep.views.LauncherRecentsView;
import com.android.quickstep.views.RecentsView;
+3 −2
Original line number Diff line number Diff line
@@ -41,8 +41,9 @@ import com.android.launcher3.touch.SingleAxisSwipeDetector;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.FlingBlockCheck;
import com.android.launcher3.util.TouchController;
import com.android.launcher3.util.VibratorWrapper;
import com.android.launcher3.views.BaseDragLayer;
import com.android.quickstep.util.VibratorWrapper;
import com.android.quickstep.util.VibrationConstants;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;

@@ -61,7 +62,7 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
            Utilities.ATLEAST_R ? VibrationEffect.Composition.PRIMITIVE_TICK : -1;
    public static final float TASK_DISMISS_VIBRATION_PRIMITIVE_SCALE = 1f;
    public static final VibrationEffect TASK_DISMISS_VIBRATION_FALLBACK =
            VibratorWrapper.EFFECT_TEXTURE_TICK;
            VibrationConstants.EFFECT_TEXTURE_TICK;

    protected final T mActivity;
    private final SingleAxisSwipeDetector mDetector;
Loading