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

Commit 5cd4333b authored by Winson Chung's avatar Winson Chung
Browse files

Merging ub-launcher3-qt-dev, build 5691374

Test: Manual

Bug:115582915 P2 [Testing] Make all launcher tests gesture-stable
Bug:121280703 P2 Finish implementation of PortraitLandscape annotation for tests
Bug:124524897 P2 Enable some tests in OOP mode
Bug:129158983 P1 Badge bubbles with app icon; use launcher lib for icon, dot, badge rendering
Bug:131116002 P2 Convert tests to TAPL and enable them
Bug:131356741 P1 use transferFocus to implement SWIPE DOWN on homescreen to open noti shade
Bug:131360075 P1 [Gesture Nav] Polish/finish landscape
Bug:132309376 P1 Launcher held ION buffers after clearing all apps in Recent Apps
Bug:132455160 P1 [Gesture Nav] Home to Overview Transition Improvement
Bug:132461400 P1 Fatal exceptions in Launcher3
Bug:132811175 P1 Jump cut if you quickly open an app after going home
Bug:133450867 P1 App window draws outside of icon shape during app to home transition
Bug:133765434 P1 [Flaky test] Launching task didn't open a new window
Bug:133867119 P2 Lab-only flake: want to switch from workspace to all apps; Swipe failed to receive an event for the swipe end
Bug:134609899 P1 Overscrolling on all apps leads to a wrong current task
Bug:135011207 P0 Corner Invocation / Inconsistent - F/C
Bug:135150619 P1 [Launcher] Trigger heapdump on RSS HWM measurements
Bug:135150767 P4 [Launcher] Test reduced resolution snapshots
Bug:135161289 P2 KB3 on qt-dev can't pick Launcher3GoIconRecents from vendor Makefile
Bug:135222111 P1 Major issues with hotseat when predictions are disabled
Bug:135287203 P1 Overview crashes on rotation
Bug:135299165 P1 Configuration changes might result in Launcher ending up in a corrupt state
Bug:135472635 P2 Bad overriden class: java.lang.ClassNotFoundException: com.android.quickstep.QuickstepProcessInitializer
Bug:135473571 P0 Pixel launcher keeps stopping in SuW
Bug:135571566 P4 Search bar is above icons. Even opening and closing launcher does not help
Bug:135686388 P1 Quickswitch sometimes jump
Bug:135687556 P1 Increase assistant gesture touch region on new devices
Bug:135766310 P2 Concerns over config changes during state transitions #2
Bug:135769778 P1 "System navigation changed" notification is shown during P4 setup
parents 5ce8c9f7 1703eb8b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -298,7 +298,7 @@ LOCAL_PROGUARD_ENABLED := full
LOCAL_PACKAGE_NAME := Launcher3GoIconRecents
LOCAL_PRIVILEGED_MODULE := true
LOCAL_PRODUCT_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3Go Launcher3QuickStep Launcher3QuickStepGo
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3Go Launcher3QuickStep
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3

LOCAL_FULL_LIBS_MANIFEST_FILES := \
+2 −19
Original line number Diff line number Diff line
@@ -16,11 +16,6 @@

package com.android.launcher3.uioverrides;

import static android.view.View.VISIBLE;
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;

import android.view.View;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherStateManager.StateHandler;
@@ -43,8 +38,6 @@ import java.util.ArrayList;
public abstract class RecentsUiFactory {

    public static final boolean GO_LOW_RAM_RECENTS_ENABLED = true;
    // Scale recents takes before animating in
    private static final float RECENTS_PREPARE_SCALE = 1.33f;

    public static TouchController[] createTouchControllers(Launcher launcher) {
        ArrayList<TouchController> list = new ArrayList<>();
@@ -76,18 +69,6 @@ public abstract class RecentsUiFactory {
        return new RecentsViewStateController(launcher);
    }

    /**
     * Prepare the recents view to animate in.
     *
     * @param launcher the launcher activity
     */
    public static void prepareToShowOverview(Launcher launcher) {
        View overview = launcher.getOverviewPanel();
        if (overview.getVisibility() != VISIBLE) {
            SCALE_PROPERTY.set(overview, RECENTS_PREPARE_SCALE);
        }
    }

    /**
     * Clean-up logic that occurs when recents is no longer in use/visible.
     *
@@ -108,4 +89,6 @@ public abstract class RecentsUiFactory {
    public static RotationMode getRotationMode(DeviceProfile dp) {
        return RotationMode.NORMAL;
    }

    public static void clearSwipeSharedState(boolean finishAnimation) {}
}
+40 −0
Original line number Diff line number Diff line
@@ -16,15 +16,31 @@

package com.android.launcher3.uioverrides.states;

import static android.view.View.VISIBLE;

import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_FADE;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_TRANSLATE_X;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_FADE;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_SCALE;
import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_TRANSLATE;
import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
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.view.View;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.SysUINavigationMode;
import com.android.quickstep.views.IconRecentsView;

/**
@@ -32,6 +48,9 @@ import com.android.quickstep.views.IconRecentsView;
 */
public class OverviewState extends LauncherState {

    // Scale recents takes before animating in
    private static final float RECENTS_PREPARE_SCALE = 1.33f;

    private static final int STATE_FLAGS = FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED
            | FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI | FLAG_DISABLE_ACCESSIBILITY;

@@ -103,6 +122,27 @@ public class OverviewState extends LauncherState {
        return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
    }

    @Override
    public void prepareForAtomicAnimation(Launcher launcher, LauncherState fromState,
            AnimatorSetBuilder builder) {
        if (fromState == NORMAL && this == OVERVIEW) {
            if (SysUINavigationMode.getMode(launcher) == SysUINavigationMode.Mode.NO_BUTTON) {
                builder.setInterpolator(ANIM_WORKSPACE_SCALE, ACCEL);
                builder.setInterpolator(ANIM_WORKSPACE_TRANSLATE, ACCEL);
            } else {
                builder.setInterpolator(ANIM_WORKSPACE_SCALE, OVERSHOOT_1_2);
            }
            builder.setInterpolator(ANIM_WORKSPACE_FADE, OVERSHOOT_1_2);
            builder.setInterpolator(ANIM_OVERVIEW_SCALE, OVERSHOOT_1_2);
            builder.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, OVERSHOOT_1_7);
            builder.setInterpolator(ANIM_OVERVIEW_FADE, OVERSHOOT_1_2);

            View overview = launcher.getOverviewPanel();
            if (overview.getVisibility() != VISIBLE) {
                SCALE_PROPERTY.set(overview, RECENTS_PREPARE_SCALE);
            }
        }
    }

    public static OverviewState newBackgroundState(int id) {
        return new OverviewState(id);
+43 −8
Original line number Diff line number Diff line
@@ -19,15 +19,21 @@ import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SYS

import android.annotation.TargetApi;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Region;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteException;
import android.util.Log;
import android.view.MotionEvent;

import com.android.launcher3.Utilities;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.systemui.shared.recents.IOverviewProxy;
import com.android.systemui.shared.recents.ISystemUiProxy;

@@ -37,7 +43,16 @@ import com.android.systemui.shared.recents.ISystemUiProxy;
@TargetApi(Build.VERSION_CODES.O)
public class TouchInteractionService extends Service {

    private static final String TAG = "TouchInteractionService";
    private static final String TAG = "GoTouchInteractionService";
    private boolean mIsUserUnlocked;
    private BroadcastReceiver mUserUnlockedReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (Intent.ACTION_USER_UNLOCKED.equals(intent.getAction())) {
                initWhenUserUnlocked();
            }
        }
    };

    private final IBinder mMyBinder = new IOverviewProxy.Stub() {

@@ -53,17 +68,21 @@ public class TouchInteractionService extends Service {

        @Override
        public void onOverviewToggle() {
            if (mIsUserUnlocked) {
                mOverviewCommandHelper.onOverviewToggle();
            }
        }

        @Override
        public void onOverviewShown(boolean triggeredFromAltTab) {
            if (mIsUserUnlocked) {
                mOverviewCommandHelper.onOverviewShown(triggeredFromAltTab);
            }
        }

        @Override
        public void onOverviewHidden(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
            if (triggeredFromAltTab && !triggeredFromHomeKey) {
            if (mIsUserUnlocked && triggeredFromAltTab && !triggeredFromHomeKey) {
                // onOverviewShownFromAltTab hides the overview and ends at the target app
                mOverviewCommandHelper.onOverviewHidden();
            }
@@ -71,8 +90,10 @@ public class TouchInteractionService extends Service {

        @Override
        public void onTip(int actionType, int viewType) {
            if (mIsUserUnlocked) {
                mOverviewCommandHelper.onTip(actionType, viewType);
            }
        }

        @Override
        public void onAssistantAvailable(boolean available) {
@@ -123,17 +144,31 @@ public class TouchInteractionService extends Service {
    @Override
    public void onCreate() {
        super.onCreate();
        if (UserManagerCompat.getInstance(this).isUserUnlocked(Process.myUserHandle())) {
            initWhenUserUnlocked();
        } else {
            mIsUserUnlocked = false;
            registerReceiver(mUserUnlockedReceiver, new IntentFilter(Intent.ACTION_USER_UNLOCKED));
        }

        sConnected = true;
    }

    private void initWhenUserUnlocked() {
        mRecentsModel = RecentsModel.INSTANCE.get(this);
        mOverviewComponentObserver = new OverviewComponentObserver(this);
        mOverviewCommandHelper = new OverviewCommandHelper(this,
                mOverviewComponentObserver);

        sConnected = true;
        mIsUserUnlocked = true;
        Utilities.unregisterReceiverSafely(this, mUserUnlockedReceiver);
    }

    @Override
    public void onDestroy() {
        if (mIsUserUnlocked) {
            mOverviewComponentObserver.onDestroy();
        }
        Utilities.unregisterReceiverSafely(this, mUserUnlockedReceiver);
        sConnected = false;
        super.onDestroy();
    }
+0 −16
Original line number Diff line number Diff line
buildscript {
    repositories {
        mavenCentral()
        google()
    }
    dependencies {
        classpath GRADLE_CLASS_PATH
    }
}

apply plugin: 'com.android.library'

android {
@@ -44,12 +34,6 @@ android {
    }
}


repositories {
    mavenCentral()
    google()
}

dependencies {
    implementation "androidx.core:core:${ANDROID_X_VERSION}"
}
Loading