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

Commit b6af1d0e authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Merging ub-launcher3-master, build 5945220

Test: Manual
Bug:123904290 P2 Remove magic constants from TAPL
Bug:130294785 P3 Can no longer long press to open settings in hotseat area
Bug:131115553 P2 Enable CacheDataUpdatedTaskTest tests
Bug:134712476 P4 Add Duo contact to home screen, icon froze and vanished while over home screen
Bug:136278866 P2 Temporary workarounds to make tests pass on Cuttlefish
Bug:136829198 P2 Scrolling Overview During Quickswitch causes switch with weird animation
Bug:137568159 P4 Refactor LauncherCallback to support multiple clients
Bug:137777105 P1 Make clearcut launcher logging feature parity with westworld logging
Bug:137851409 P4 Jank during swipe up due to inflation
Bug:138620399 P1 Quick switch flicker / artifacts
Bug:139016518 P2 [PinnedStackController] Move shelf offset into sysui
Bug:139137636 P2 Create memory tests for Launcher
Bug:139258979 P2 Switch to the screenshot mode when then system passes ThumbnailData back upon RecentsAnimation cancelation
Bug:139259253 P2 Transform multiple app surfaces during app open animation from overview
Bug:139439373 P2 Live tile should switch to screenshot before finishing recents animation
Bug:139828243 P2 Create a prototype for Overview screenshot actions with a SystemUI plugin
Bug:139888225 P2 Convert custom widget into plugins
Bug:139913027 P2 [a11y] App title in Widget list shouldn't be actionable by a11y methods. (It would cause Pixel launcher crash.)
Bug:139917483 P1 [B1C1][Dec19_QPR][CTS_Verifier_10_r1]Pixel launcher crash observed in Device owner test-> Lock Task UI
Bug:139941530 P2 Lab-only Flake: Launcher switches to All Apps after pressing Recents button
Bug:140212732 P2 [PO Cable] Strange launcher behavior after restore
Bug:140242324 P2 Cache shortcutInfo icons in Launcher
Bug:140246642 P4 Add binder tests for launcher interactions
Bug:140311911 P2 Flake in Launcher tests: java.lang.AssertionError: Stable state != state: OverviewState, LauncherState
Bug:140406263 P2 [a11y] Unable to scroll to the left of the main Home screen to Display google app by Voice access or Switch access.
Bug:140539007 P3 After apply the wallpaper on wallpaper picker, the screen will stay on wallpaper picker about 2 second
Bug:140626334 P4 Pass wallpaper SC to launcher for animation during launch and swipe up
Bug:140635319 P1 [Flaky test] testPromiseIcon_addedFromEligibleSession failing due to NPE on Launcher#getStateManager
Bug:140786694 P2 [A11y]No talkback feedback when long pressing on an app at home screen
Bug:140935140 P1 Launcher force close observed while accessing app info shortcuts.
Bug:141260670 P3 Drag and drop preview doesn't match the destination grid size
Bug:141262820 P3 [Grid] icon badge size should scale as the grid size changes
Bug:141265063 P2 Long press on homescreen in between icons doesn't bring up home settings
Bug:141275518 P2 Test WellbeingTests.testPauseAppFromOverview flakes on Cuttlefish
Bug:141315387 P1 [Failing test] 3P launchers + 2 button mode: failed goToOverviewFromHome and goToOverviewFromApp
Bug:141376165 P2 Remove static initializations in Launcher
Bug:141390432 P1 [Failing test] TaplTestsLauncher3 in 2-button mode
Bug:141517004 P1 FallbackRecentsTest.goToOverviewFromHome Failure
Bug:141522764 P1 DefaultLayoutProviderTest failures
Bug:141523101 P1 TaplTestsQuickstep#testAllAppsFromHome,testAllAppsFromOverview failures
Bug:141524555 P1 FallbackRecentsTest.testOverview flake
Bug:141576561 P2 Fix FlagOverrideSampleTest inside robolectric test
Bug:141576665 P2 AddWorkspaceItemsTaskTest broken
Bug:141577881 P2 FileLogTest broken
Bug:141579810 P1 ViewInflationDuringSwipeUp test failures
Bug:141580748 P2 FallbackRecentsTest#testOverview failure
Bug:141697444 P1 TaplTestsLauncher3#testWidgets test failure
Bug:141770616 P2 Flake: Can't find a launcher object; selector: BySelector [RES='\Qcom.google.android.apps.nexuslauncher:id/deep_shortcuts_container\E'] (visible state: AllApps),
Bug:141772190 P2 Flake: Context menu is still visible afterswiping up to home
Bug:141864547 P2 calendar-stable sometimes fails dialog dismissal on cuttlefish
Bug:141886704 P2 Use app targets to determine input consumer instead of launcher state
Bug:141934188 P2 Automation Test for adding widget automatically
Bug:141939911 P3 Clean up SwipeDetector
Bug:141986013 P2 Update all apps fade interpolators
Bug:142068081 P1 Quick Switch touch swipe dropped, flicker ensues
Bug:142120338 P2 Gmail app (work profile) icon not drawing
Bug:142148773 P2 grid size should not affect widget padding in WidgetsRecyclerView
Bug:142351228 P1 public void testSwipeUp_with_list_widgets() is failing for merge CL
Bug:79868152 P3 Fade out caret with workspace and back in when in Overview
Bug:136282913 P1 Swipe up from Assistant Fulfillment Card Jank
Bug:138473688 P4 Home settings can't be dismissed by swipe up
Bug:140252765 P2 Audit Gesture Nav tests (including Back and Quick Switch)
Bug:141568904 P1 NPE: Pixel launcher crash is observed when adding Directions widget
Bug:142514365 P1 Failing test AddWidgetTest.testDragIcon
Bug:142803200 P1 Broken binder tests

Change-Id: I811537cc8d406f0acd9fa45daddae4da79ffff12
parent b67a15dd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ LOCAL_USE_AAPT2 := true
LOCAL_AAPT2_ONLY := true
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := SystemUISharedLib launcherprotosnano
LOCAL_STATIC_JAVA_LIBRARIES := SystemUISharedLibLauncherWrapper launcherprotosnano
ifneq (,$(wildcard frameworks/base))
  LOCAL_PRIVATE_PLATFORM_APIS := true
else
@@ -216,7 +216,7 @@ include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := SystemUISharedLib launcherprotosnano
LOCAL_STATIC_JAVA_LIBRARIES := SystemUISharedLibLauncherWrapper launcherprotosnano
ifneq (,$(wildcard frameworks/base))
  LOCAL_PRIVATE_PLATFORM_APIS := true
else
@@ -262,7 +262,7 @@ include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := SystemUISharedLib launcherprotosnano
LOCAL_STATIC_JAVA_LIBRARIES := SystemUISharedLibLauncherWrapper launcherprotosnano
ifneq (,$(wildcard frameworks/base))
  LOCAL_PRIVATE_PLATFORM_APIS := true
else
+9 −5
Original line number Diff line number Diff line
@@ -40,7 +40,9 @@ public final class GoLauncherAppTransitionManagerImpl extends QuickstepAppTransi

    @Override
    protected void composeRecentsLaunchAnimator(AnimatorSet anim, View v,
            RemoteAnimationTargetCompat[] targets, boolean launcherClosing) {
            RemoteAnimationTargetCompat[] appTargets,
            RemoteAnimationTargetCompat[] wallpaperTargets,
            boolean launcherClosing) {
        // Stubbed. Recents launch animation will come from the recents view itself and will not
        // use remote animations.
    }
@@ -74,21 +76,23 @@ public final class GoLauncherAppTransitionManagerImpl extends QuickstepAppTransi
        }

        @Override
        public void onCreateAnimation(RemoteAnimationTargetCompat[] targetCompats,
        public void onCreateAnimation(RemoteAnimationTargetCompat[] appTargets,
                RemoteAnimationTargetCompat[] wallpaperTargets,
                AnimationResult result) {
            boolean isGoingToRecents =
                    taskIsATargetWithMode(targetCompats, mLauncher.getTaskId(), MODE_OPENING)
                    taskIsATargetWithMode(appTargets, mLauncher.getTaskId(), MODE_OPENING)
                    && (mLauncher.getStateManager().getState() == LauncherState.OVERVIEW);
            if (isGoingToRecents) {
                IconRecentsView recentsView = mLauncher.getOverviewPanel();
                if (!recentsView.isReadyForRemoteAnim()) {
                    recentsView.setOnReadyForRemoteAnimCallback(() ->
                        postAsyncCallback(mHandler, () -> onCreateAnimation(targetCompats, result))
                        postAsyncCallback(mHandler, () -> onCreateAnimation(appTargets,
                                wallpaperTargets, result))
                    );
                    return;
                }
            }
            super.onCreateAnimation(targetCompats, result);
            super.onCreateAnimation(appTargets, wallpaperTargets, result);
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -89,5 +89,5 @@ public abstract class RecentsUiFactory {
        return RotationMode.NORMAL;
    }

    public static void clearSwipeSharedState(boolean finishAnimation) {}
    public static void clearSwipeSharedState(Launcher launcher, boolean finishAnimation) { }
}
+15 −14
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import android.util.Log;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.LauncherAnimationRunner;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.quickstep.util.RemoteAnimationTargetSet;
import com.android.quickstep.views.IconRecentsView;
import com.android.systemui.shared.system.ActivityOptionsCompat;
import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
@@ -47,12 +46,12 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple
        RemoteAnimationProvider {
    private static final String TAG = "AppToOverviewAnimationProvider";

    private final ActivityControlHelper<T> mHelper;
    private final BaseActivityInterface<T> mHelper;
    private final int mTargetTaskId;
    private IconRecentsView mRecentsView;
    private AppToOverviewAnimationListener mAnimationReadyListener;

    AppToOverviewAnimationProvider(ActivityControlHelper<T> helper, int targetTaskId) {
    AppToOverviewAnimationProvider(BaseActivityInterface<T> helper, int targetTaskId) {
        mHelper = helper;
        mTargetTaskId = targetTaskId;
    }
@@ -76,7 +75,7 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple
        if (mAnimationReadyListener != null) {
            mAnimationReadyListener.onActivityReady(activity);
        }
        ActivityControlHelper.AnimationFactory factory =
        BaseActivityInterface.AnimationFactory factory =
                mHelper.prepareRecentsUI(activity, wasVisible,
                        false /* animate activity */, (controller) -> {
                            controller.dispatchOnStart();
@@ -86,7 +85,7 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple
                            anim.start();
                        });
        factory.onRemoteAnimationReceived(null);
        factory.createActivityController(getRecentsLaunchDuration());
        factory.createActivityInterface(getRecentsLaunchDuration());
        mRecentsView = activity.getOverviewPanel();
        return false;
    }
@@ -95,11 +94,12 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple
     * Create remote window animation from the currently running app to the overview panel. Should
     * be called after {@link #onActivityReady}.
     *
     * @param targetCompats the target apps
     * @param appTargets the target apps
     * @return animation from app to overview
     */
    @Override
    public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] targetCompats) {
    public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets,
            RemoteAnimationTargetCompat[] wallpaperTargets) {
        if (mAnimationReadyListener != null) {
            mAnimationReadyListener.onWindowAnimationCreated();
        }
@@ -112,14 +112,14 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple
            return anim;
        }

        RemoteAnimationTargetSet targetSet =
                new RemoteAnimationTargetSet(targetCompats, MODE_CLOSING);
        mRecentsView.setTransitionedFromApp(!targetSet.isAnimatingHome());
        RemoteAnimationTargets targets =
                new RemoteAnimationTargets(appTargets, wallpaperTargets, MODE_CLOSING);
        mRecentsView.setTransitionedFromApp(!targets.isAnimatingHome());

        RemoteAnimationTargetCompat recentsTarget = null;
        RemoteAnimationTargetCompat closingAppTarget = null;

        for (RemoteAnimationTargetCompat target : targetCompats) {
        for (RemoteAnimationTargetCompat target : appTargets) {
            if (target.mode == MODE_OPENING) {
                recentsTarget = target;
            } else if (target.mode == MODE_CLOSING && target.taskId == mTargetTaskId) {
@@ -157,16 +157,17 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> imple
                false /* startAtFrontOfQueue */) {

            @Override
            public void onCreateAnimation(RemoteAnimationTargetCompat[] targetCompats,
            public void onCreateAnimation(RemoteAnimationTargetCompat[] appTargets,
                    RemoteAnimationTargetCompat[] wallpaperTargets,
                    AnimationResult result) {
                IconRecentsView recentsView = mRecentsView;
                if (!recentsView.isReadyForRemoteAnim()) {
                    recentsView.setOnReadyForRemoteAnimCallback(() -> postAsyncCallback(handler,
                            () -> onCreateAnimation(targetCompats, result))
                            () -> onCreateAnimation(appTargets, wallpaperTargets, result))
                    );
                    return;
                }
                result.setAnimation(createWindowAnimation(targetCompats), context);
                result.setAnimation(createWindowAnimation(appTargets, wallpaperTargets), context);
            }
        };
        return ActivityOptionsCompat.makeRemoteAnimation(
+10 −10
Original line number Diff line number Diff line
@@ -26,21 +26,21 @@ import androidx.annotation.Nullable;

import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.util.RemoteAnimationTargetSet;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.views.IconRecentsView;

import java.util.function.BiPredicate;
import java.util.function.Consumer;

/**
 * {@link ActivityControlHelper} for recents when the default launcher is different than the
 * {@link BaseActivityInterface} for recents when the default launcher is different than the
 * currently running one and apps should interact with the {@link RecentsActivity} as opposed
 * to the in-launcher one.
 */
public final class FallbackActivityControllerHelper extends
        GoActivityControlHelper<RecentsActivity> {
public final class FallbackActivityInterface extends
        GoActivityInterface<RecentsActivity> {

    public FallbackActivityControllerHelper() { }
    public FallbackActivityInterface() { }

    @Override
    public AnimationFactory prepareRecentsUI(RecentsActivity activity, boolean activityVisible,
@@ -58,17 +58,17 @@ public final class FallbackActivityControllerHelper extends
            boolean isAnimatingToRecents = false;

            @Override
            public void onRemoteAnimationReceived(RemoteAnimationTargetSet targets) {
            public void onRemoteAnimationReceived(RemoteAnimationTargets targets) {
                isAnimatingToRecents = targets != null && targets.isAnimatingHome();
                if (!isAnimatingToRecents) {
                    rv.setAlpha(1);
                }
                createActivityController(getSwipeUpDestinationAndLength(
                createActivityInterface(getSwipeUpDestinationAndLength(
                        activity.getDeviceProfile(), activity, new Rect()));
            }

            @Override
            public void createActivityController(long transitionLength) {
            public void createActivityInterface(long transitionLength) {
                if (!isAnimatingToRecents) {
                    return;
                }
@@ -85,13 +85,13 @@ public final class FallbackActivityControllerHelper extends
    @Override
    public ActivityInitListener createActivityInitListener(
            BiPredicate<RecentsActivity, Boolean> onInitListener) {
        return new RecentsActivityTracker(onInitListener);
        return new ActivityInitListener(onInitListener, RecentsActivity.ACTIVITY_TRACKER);
    }

    @Nullable
    @Override
    public RecentsActivity getCreatedActivity() {
        return RecentsActivityTracker.getCurrentActivity();
        return RecentsActivity.ACTIVITY_TRACKER.getCreatedActivity();
    }

    @Nullable
Loading