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

Commit a7a1b57b authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Merging ub-launcher3-qt-qpr1-dev, build 5872416

Test: Manual

Bug:121280703 P2 Finish implementation of PortraitLandscape annotation for tests
Bug:135633159 P3 [QPR] Promise icons on home screen
Bug:135638690 P1 [QPR] On-device app search
Bug:137106918 P2 UX: Accidental NGA triggering when hitting Undo actions in apps
Bug:137200188 P3 Home screen app title disappears during animation
Bug:138195597 P2 Wrong icon animated on return to home screen
Bug:138396187 P1 Swipe and hold from an app no longer uses spring to animate adjacent task
Bug:138729157 P1 [Flaky test] java.lang.AssertionError: http://go/tapl : want to fling backwards in widgets, flung back, but the current state is not WIDGETS; Unexpected launcher object visible: workspace
Bug:138729456 P1 [Flaky test] java.lang.AssertionError: http://go/tapl : Can't find an object with selector: BySelector [CLASS='\Qandroid.widget.TextView\E', PKG='\Qcom.google.android.apps.nexuslauncher\E', TEXT='\QShortcut 3\E'] (visible state: Workspace)
Bug:138964490 P1 Support DeviceConfig to drive ToggleableFlags
Bug:139021165 P2 [TEST TRACKER] [QPR] Promise icons on home screen
Bug:139137636 P2 Create memory tests for Launcher
Bug:139551306 P4 [Polish] Reduce shelf paddings in Overview
Bug:139885365 P3 App open animation different between launcher suggested apps and launcher home screen/drawer
Bug:139918680 P2 [a11y] Talkback shouldn't keep focusing on the background item and speak the description of the background item again after entering Widget list.
Bug:140076379 P1 Launcher ub-launcher3-qt-qpr1-dev Branch Build Keeps Crashing due to Exception
Bug:140252951 P2 Add widget launch test.
Bug:140308849 P2 Jank during swipe up to home, especially noticeable after pausing first
Bug:140311911 P2 Flake in Launcher tests: java.lang.AssertionError: Stable state != state: OverviewState, LauncherState
Bug:140405990 P2 [a11y] Unable to add shortcut to Home screen by Voice access or Switch access.
Bug:140819614 P1 If an install session is abandoned for an already installed app, the corresponding icon is removed
Bug:140823188 P1 AppPredictionsUITests failing
Bug:140837771 P1 Failing test: AddConfigWidgetTests and AddWidgetTests are failing
Change-Id: I1efae6216c53b1fee3e105c9356ed43c4bf46c6e
parents 241cd902 39216c15
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10,3 +10,6 @@ mrcasey@google.com
sunnygoyal@google.com
twickham@google.com
winsonc@google.com

per-file FeatureFlags.java = sunnygoyal@google.com, adamcohen@google.com
per-file BaseFlags.java = sunnygoyal@google.com, adamcohen@google.com
+3 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2;
import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;

import android.content.Context;
import android.view.View;

import com.android.launcher3.DeviceProfile;
@@ -115,10 +116,10 @@ public class OverviewState extends LauncherState {
    }

    public static float getDefaultSwipeHeight(Launcher launcher) {
        return getDefaultSwipeHeight(launcher.getDeviceProfile());
        return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile());
    }

    public static float getDefaultSwipeHeight(DeviceProfile dp) {
    public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) {
        return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
    }

+9 −12
Original line number Diff line number Diff line
@@ -18,16 +18,11 @@ package com.android.launcher3;

import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS;
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.quickstep.TaskViewUtils.findTaskViewToLaunch;
import static com.android.quickstep.TaskViewUtils.getRecentsWindowAnimator;

import static androidx.dynamicanimation.animation.DynamicAnimation.MIN_VISIBLE_CHANGE_PIXELS;
import static androidx.dynamicanimation.animation.SpringForce.DAMPING_RATIO_MEDIUM_BOUNCY;
import static androidx.dynamicanimation.animation.SpringForce.STIFFNESS_MEDIUM;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -35,18 +30,17 @@ import android.animation.ObjectAnimator;
import android.content.Context;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.anim.SpringObjectAnimator;
import com.android.launcher3.anim.SpringAnimationBuilder;
import com.android.quickstep.util.ClipAnimationHelper;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * A {@link QuickstepAppTransitionManagerImpl} that also implements recents transitions from
 * {@link RecentsView}.
@@ -156,8 +150,11 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti
                return ObjectAnimator.ofFloat(mLauncher.getOverviewPanel(),
                        RecentsView.CONTENT_ALPHA, values);
            case INDEX_RECENTS_TRANSLATE_X_ANIM:
                return new SpringObjectAnimator<>(mLauncher.getOverviewPanel(),
                        VIEW_TRANSLATE_X, MIN_VISIBLE_CHANGE_PIXELS, 0.8f, 250, values);
                return new SpringAnimationBuilder<>(mLauncher.getOverviewPanel(), VIEW_TRANSLATE_X)
                        .setDampingRatio(0.8f)
                        .setStiffness(250)
                        .setValues(values)
                        .build(mLauncher);
            default:
                return super.createStateElementAnimation(index, values);
        }
+11 −7
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.app.prediction.AppPredictor;
import android.app.prediction.AppTarget;
import android.content.ComponentName;
import android.content.Context;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;

import com.android.launcher3.AppInfo;
import com.android.launcher3.InvariantDeviceProfile;
@@ -32,6 +31,8 @@ import com.android.launcher3.InvariantDeviceProfile.OnIDPChangeListener;
import com.android.launcher3.ItemInfoWithIcon;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherState;
import com.android.launcher3.LauncherStateManager.StateListener;
import com.android.launcher3.Utilities;
import com.android.launcher3.allapps.AllAppsContainerView;
import com.android.launcher3.allapps.AllAppsStore.OnUpdateListener;
@@ -58,7 +59,7 @@ import java.util.List;
 * 4) Maintains the current active client id (for the predictions) and all updates are performed on
 * that client id.
 */
public class PredictionUiStateManager implements OnGlobalLayoutListener, ItemInfoUpdateReceiver,
public class PredictionUiStateManager implements StateListener, ItemInfoUpdateReceiver,
        OnIDPChangeListener, OnUpdateListener {

    public static final String LAST_PREDICTION_ENABLED_STATE = "last_prediction_enabled_state";
@@ -153,7 +154,10 @@ public class PredictionUiStateManager implements OnGlobalLayoutListener, ItemInf
    public void reapplyItemInfo(ItemInfoWithIcon info) { }

    @Override
    public void onGlobalLayout() {
    public void onStateTransitionStart(LauncherState toState) { }

    @Override
    public void onStateTransitionComplete(LauncherState state) {
        if (mAppsView == null) {
            return;
        }
@@ -162,7 +166,8 @@ public class PredictionUiStateManager implements OnGlobalLayoutListener, ItemInf
            mPendingState = null;
        }
        if (mPendingState == null) {
            mAppsView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            Launcher.getLauncher(mAppsView.getContext()).getStateManager()
                    .removeStateListener(this);
        }
    }

@@ -170,9 +175,8 @@ public class PredictionUiStateManager implements OnGlobalLayoutListener, ItemInf
        boolean registerListener = mPendingState == null;
        mPendingState = state;
        if (registerListener) {
            // OnGlobalLayoutListener is called whenever a view in the view tree changes
            // visibility. Add a listener and wait until appsView is invisible again.
            mAppsView.getViewTreeObserver().addOnGlobalLayoutListener(this);
            // Add a listener and wait until appsView is invisible again.
            Launcher.getLauncher(mAppsView.getContext()).getStateManager().addStateListener(this);
        }
    }

+8 −3
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;

import android.content.Context;
import android.graphics.Rect;
import android.view.View;

@@ -159,11 +160,15 @@ public class OverviewState extends LauncherState {
    }

    public static float getDefaultSwipeHeight(Launcher launcher) {
        return getDefaultSwipeHeight(launcher.getDeviceProfile());
        return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile());
    }

    public static float getDefaultSwipeHeight(DeviceProfile dp) {
        return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
    public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) {
        float swipeHeight = dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
        if (SysUINavigationMode.getMode(context) == SysUINavigationMode.Mode.NO_BUTTON) {
            swipeHeight -= dp.getInsets().bottom;
        }
        return swipeHeight;
    }

    @Override
Loading