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

Commit 19d1f91b authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6893192 from 743fe269 to rvc-qpr2-release

Change-Id: I0001185f10843258f73fd1c159932c59134d6547
parents fd2f276d 743fe269
Loading
Loading
Loading
Loading
+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;
+16 −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;
@@ -928,12 +931,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,
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ public class LauncherSettings {
        public static final int CONTAINER_SHORTCUTS = -107;
        public static final int CONTAINER_SETTINGS = -108;
        public static final int CONTAINER_TASKSWITCHER = -109;
        public static final int CONTAINER_TASKFOREGROUND = -110;

        public static final String containerToString(int container) {
            switch (container) {
+7 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_PREDICT
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_SEARCH_RESULTS;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_SETTINGS;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_SHORTCUTS;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_TASKFOREGROUND;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_TASKSWITCHER;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_WIDGETS_TRAY;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
@@ -51,6 +52,7 @@ import com.android.launcher3.logger.LauncherAtom.PredictionContainer;
import com.android.launcher3.logger.LauncherAtom.SearchResultContainer;
import com.android.launcher3.logger.LauncherAtom.SettingsContainer;
import com.android.launcher3.logger.LauncherAtom.ShortcutsContainer;
import com.android.launcher3.logger.LauncherAtom.TaskForegroundContainer;
import com.android.launcher3.logger.LauncherAtom.TaskSwitcherContainer;
import com.android.launcher3.model.ModelWriter;
import com.android.launcher3.util.ContentWriter;
@@ -392,6 +394,11 @@ public class ItemInfo {
                return ContainerInfo.newBuilder()
                        .setTaskSwitcherContainer(TaskSwitcherContainer.getDefaultInstance())
                        .build();
            case CONTAINER_TASKFOREGROUND:
                return ContainerInfo.newBuilder()
                        .setTaskForegroundContainer(TaskForegroundContainer.getDefaultInstance())
                        .build();


        }
        return ContainerInfo.getDefaultInstance();