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

Commit 6d780af4 authored by Brian Isganitis's avatar Brian Isganitis Committed by Android (Google) Code Review
Browse files

Merge "Log taskbar all apps entrypoint, launches, and drags" into tm-dev

parents 70dffbe8 5b89b31b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -76,6 +76,9 @@ message ContainerInfo {

// Represents the apps list sorted alphabetically inside the all-apps view.
message AllAppsContainer {
  oneof ParentContainer {
    TaskBarContainer taskbar_container = 1;
  }
}

message WidgetsContainer {
@@ -83,6 +86,9 @@ message WidgetsContainer {

// Represents the predicted apps row(top row) in the all-apps view.
message PredictionContainer {
  oneof ParentContainer {
    TaskBarContainer taskbar_container = 1;
  }
}

// Represents the apps container within search results.
+9 −0
Original line number Diff line number Diff line
@@ -380,6 +380,14 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
            folderBuilder.clearHotseat();
            itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder()
                    .setFolder(folderBuilder));
        } else if (oldContainer.hasAllAppsContainer()) {
            itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder()
                    .setAllAppsContainer(oldContainer.getAllAppsContainer().toBuilder()
                            .setTaskbarContainer(LauncherAtom.TaskBarContainer.newBuilder())));
        } else if (oldContainer.hasPredictionContainer()) {
            itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder()
                    .setPredictionContainer(oldContainer.getPredictionContainer().toBuilder()
                            .setTaskbarContainer(LauncherAtom.TaskBarContainer.newBuilder())));
        }
    }

@@ -703,6 +711,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
            }
        } else if (tag instanceof AppInfo) {
            startItemInfoActivity((AppInfo) tag);
            mControllers.uiController.onTaskbarIconLaunched((AppInfo) tag);
        } else {
            Log.e(TAG, "Unknown type clicked: " + tag);
        }
+5 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.launcher3.taskbar;
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.Utilities.squaredHypot;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP;
import static com.android.quickstep.AnimatedFloat.VALUE;

import android.annotation.NonNull;
@@ -341,7 +342,10 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
        }

        public View.OnClickListener getAllAppsButtonClickListener() {
            return v -> mControllers.taskbarAllAppsController.show();
            return v -> {
                mActivity.getStatsLogManager().logger().log(LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP);
                mControllers.taskbarAllAppsController.show();
            };
        }

        public View.OnLongClickListener getIconOnLongClickListener() {
+5 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static androidx.core.util.Preconditions.checkNotNull;
import static androidx.core.util.Preconditions.checkState;

import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_NON_ACTIONABLE;
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.ALL_APPS_CONTAINER;
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.EXTENDED_CONTAINERS;
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.FOLDER;
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.SEARCH_RESULT_CONTAINER;
@@ -92,6 +93,7 @@ public class StatsLogCompatManager extends StatsLogManager {
    private static final int FOLDER_HIERARCHY_OFFSET = 100;
    private static final int SEARCH_RESULT_HIERARCHY_OFFSET = 200;
    private static final int EXTENDED_CONTAINERS_HIERARCHY_OFFSET = 300;
    private static final int ALL_APPS_HIERARCHY_OFFSET = 400;

    /**
     * Flags for converting SearchAttribute to integer value.
@@ -632,6 +634,9 @@ public class StatsLogCompatManager extends StatsLogManager {
        } else if (info.getContainerInfo().getContainerCase() == EXTENDED_CONTAINERS) {
            return info.getContainerInfo().getExtendedContainers().getContainerCase().getNumber()
                    + EXTENDED_CONTAINERS_HIERARCHY_OFFSET;
        } else if (info.getContainerInfo().getContainerCase() == ALL_APPS_CONTAINER) {
            return info.getContainerInfo().getAllAppsContainer().getParentContainerCase()
                    .getNumber() + ALL_APPS_HIERARCHY_OFFSET;
        } else {
            return info.getContainerInfo().getContainerCase().getNumber();
        }
+3 −0
Original line number Diff line number Diff line
@@ -586,6 +586,9 @@ public class StatsLogManager implements ResourceBasedOverride {

        @UiEvent(doc = "User clicked on IME quicksearch button.")
        LAUNCHER_ALLAPPS_QUICK_SEARCH_WITH_IME(1047),

        @UiEvent(doc = "User tapped taskbar All Apps button.")
        LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP(1057),
        ;

        // ADD MORE