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

Commit b1826d09 authored by Xin Li's avatar Xin Li Committed by Gerrit Code Review
Browse files

Merge "Merge RQ2A.210305.007"

parents 541d0855 66ff39e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@
            android:stateNotNeeded="true"
            android:windowSoftInputMode="adjustPan"
            android:screenOrientation="unspecified"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize"
            android:resizeableActivity="true"
            android:resumeWhilePausing="true"
            android:taskAffinity=""
+9 −2
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ message ContainerInfo {
    SettingsContainer settings_container = 9;
    PredictedHotseatContainer predicted_hotseat_container = 10;
    TaskSwitcherContainer task_switcher_container = 11;
    TaskForegroundContainer task_foreground_container = 12;
  }
}

@@ -92,8 +93,14 @@ message ShortcutsContainer {
message SettingsContainer {
}

message TaskSwitcherContainer {
}
// Container for tasks in the Overview UI.
// Typically entered using either the overview gesture or overview button.
message TaskSwitcherContainer {}

// Container for tasks from another foreground app, when not on launcher screen.
// Typically home gesture or overview gesture can be triggered from
// this container.
message TaskForegroundContainer {}

enum Attribute {
  UNKNOWN = 0;
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@
            android:stateNotNeeded="true"
            android:windowSoftInputMode="adjustPan"
            android:screenOrientation="unspecified"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize"
            android:resizeableActivity="true"
            android:resumeWhilePausing="true"
            android:taskAffinity=""
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@
            android:stateNotNeeded="true"
            android:theme="@style/LauncherTheme"
            android:screenOrientation="unspecified"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize"
            android:resizeableActivity="true"
            android:resumeWhilePausing="true"
            android:taskAffinity="" />
+18 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.PointF;
@@ -62,12 +63,14 @@ import androidx.annotation.UiThread;

import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.logging.UserEventDispatcher;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.statemanager.StatefulActivity;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
@@ -717,6 +720,8 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte
    }

    private void onSettledOnEndTarget() {
        // Fast-finish the attaching animation if it's still running.
        maybeUpdateRecentsAttachedState(false);
        switch (mGestureState.getEndTarget()) {
            case HOME:
                mStateCallback.setState(STATE_SCALED_CONTROLLER_HOME | STATE_CAPTURE_SCREENSHOT);
@@ -928,12 +933,25 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte
            default:
                event = IGNORE;
        }
        ComponentName componentName = mGestureState.getRunningTask().baseActivity;
        StatsLogManager.newInstance(mContext).logger()
                .withSrcState(LAUNCHER_STATE_BACKGROUND)
                .withDstState(StatsLogManager.containerTypeToAtomState(endTarget.containerType))
                .withItemInfo(getItemInfo(componentName))
                .log(event);
    }

    /**
     * Builds proto for logging
     */
    public WorkspaceItemInfo getItemInfo(ComponentName componentName) {
        WorkspaceItemInfo placeholderInfo = new WorkspaceItemInfo();
        placeholderInfo.itemType = LauncherSettings.Favorites.ITEM_TYPE_TASK;
        placeholderInfo.container = LauncherSettings.Favorites.CONTAINER_TASKFOREGROUND;
        placeholderInfo.intent = new Intent().setComponent(componentName);
        return placeholderInfo;
    }

    /** Animates to the given progress, where 0 is the current app and 1 is overview. */
    @UiThread
    private void animateToProgress(float start, float end, long duration, Interpolator interpolator,
Loading