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

Commit 96bd5cf4 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9084753 from 5227613a to tm-qpr1-release

Change-Id: Icfa18b74993ea5823c3f60f487220f91e9deacc8
parents b69802c5 5227613a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ public interface QuickstepSystemShortcut {

        @Override
        public void onClick(View view) {
            // Initiate splitscreen from the Home screen or Home All Apps
            Bitmap bitmap;
            Intent intent;
            if (mItemInfo instanceof WorkspaceItemInfo) {
+1 −0
Original line number Diff line number Diff line
@@ -270,6 +270,7 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba

        @Override
        public void onClick(View view) {
            // Initiate splitscreen from the in-app Taskbar or Taskbar All Apps
            Pair<InstanceId, com.android.launcher3.logging.InstanceId> instanceIds =
                    LogUtils.getShellShareableInstanceId();
            mTarget.getStatsLogManager().logger()
+12 −10
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import static com.android.launcher3.anim.Interpolators.EMPHASIZED_DECELERATE;
import static com.android.launcher3.anim.Interpolators.FINAL_FRAME;
import static com.android.launcher3.anim.Interpolators.INSTANT;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.Interpolators.OVERSHOOT_0_75;
import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2;
import static com.android.launcher3.anim.Interpolators.clampToProgress;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE;
@@ -62,6 +63,7 @@ import com.android.launcher3.touch.AllAppsSwipeController;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.DisplayController;
import com.android.quickstep.util.RecentsAtomicAnimationFactory;
import com.android.quickstep.util.SplitAnimationTimings;
import com.android.quickstep.views.RecentsView;

/**
@@ -79,14 +81,6 @@ public class QuickstepAtomicAnimationFactory extends
    private static final int PER_PAGE_SCROLL_DURATION = 150;
    private static final int MAX_PAGE_SCROLL_DURATION = 750;

    private static final int OVERVIEW_TO_SPLIT_ACTIONS_FADE_START = 0;
    private static final int OVERVIEW_TO_SPLIT_ACTIONS_FADE_END = 83;

    private static final float OVERVIEW_TO_SPLIT_ACTIONS_FADE_START_OFFSET =
            (float) OVERVIEW_TO_SPLIT_ACTIONS_FADE_START / SplitScreenSelectState.ENTER_DURATION;
    private static final float OVERVIEW_TO_SPLIT_ACTIONS_FADE_END_OFFSET =
            (float) OVERVIEW_TO_SPLIT_ACTIONS_FADE_END / SplitScreenSelectState.ENTER_DURATION;

    // Due to use of physics, duration may differ between devices so we need to calculate and
    // cache the value.
    private int mHintToNormalDuration = -1;
@@ -197,9 +191,17 @@ public class QuickstepAtomicAnimationFactory extends
        } else if (fromState == NORMAL && toState == ALL_APPS) {
            AllAppsSwipeController.applyNormalToAllAppsAnimConfig(mActivity, config);
        } else if (fromState == OVERVIEW && toState == OVERVIEW_SPLIT_SELECT) {
            SplitAnimationTimings timings = SplitAnimationTimings.OVERVIEW_TO_SPLIT;
            config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, clampToProgress(LINEAR,
                    OVERVIEW_TO_SPLIT_ACTIONS_FADE_START_OFFSET,
                    OVERVIEW_TO_SPLIT_ACTIONS_FADE_END_OFFSET));
                    timings.getActionsFadeStartOffset(),
                    timings.getActionsFadeEndOffset()));
        } else if (fromState == NORMAL && toState == OVERVIEW_SPLIT_SELECT) {
            SplitAnimationTimings timings = SplitAnimationTimings.NORMAL_TO_SPLIT;
            config.setInterpolator(ANIM_SCRIM_FADE, clampToProgress(LINEAR,
                    timings.getScrimFadeInStartOffset(),
                    timings.getScrimFadeInEndOffset()));
            config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, OVERSHOOT_0_75);
            config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, OVERSHOOT_0_75);
        }
    }
}
+4 −5
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.launcher3.uioverrides.states;
import android.content.Context;

import com.android.launcher3.Launcher;
import com.android.quickstep.util.SplitAnimationTimings;
import com.android.quickstep.views.RecentsView;

/**
@@ -26,10 +27,6 @@ import com.android.quickstep.views.RecentsView;
 * pinned and user is selecting the second one
 */
public class SplitScreenSelectState extends OverviewState {
    public static final int ENTER_DURATION = 866;
    public static final int EXIT_DURATION = 500;
    // TODO: Add ability to differentiate between Split > Home and Split > Confirmed timings

    public SplitScreenSelectState(int id) {
        super(id);
    }
@@ -47,6 +44,8 @@ public class SplitScreenSelectState extends OverviewState {

    @Override
    public int getTransitionDuration(Context context, boolean isToState) {
        return isToState ? ENTER_DURATION : EXIT_DURATION;
        return isToState
                ? SplitAnimationTimings.ENTER_DURATION
                : SplitAnimationTimings.ABORT_DURATION;
    }
}
+43 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.quickstep.util;

import static com.android.launcher3.anim.Interpolators.LINEAR;

import android.view.animation.Interpolator;

/**
 * Timings for the Normal > OverviewSplitSelect animation.
 */
public class NormalToSplitTimings extends OverviewToSplitTimings implements SplitAnimationTimings {
    @Override
    public Interpolator getStagedRectXInterpolator() { return LINEAR; }
    @Override
    public Interpolator getStagedRectScaleXInterpolator() { return LINEAR; }
    @Override
    public Interpolator getStagedRectScaleYInterpolator() { return LINEAR; }

    public int getScrimFadeInStart() { return 0; }
    public int getScrimFadeInEnd() { return 167; }

    public float getScrimFadeInStartOffset() {
        return (float) getScrimFadeInStart() / getDuration();
    }
    public float getScrimFadeInEndOffset() {
        return (float) getScrimFadeInEnd() / getDuration();
    }
}
Loading