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

Commit 9aac07e8 authored by thiruram's avatar thiruram Committed by Thiru Ramasamy
Browse files

[AA+] Add LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB & LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB events.

Bug: 178562918
Change-Id: I6ae1e034dc8fbbca6fa046104ab69c1ec9f4e6da
parent dffbdf86
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@
package com.android.launcher3.allapps;

import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_KEYBOARD_CLOSED;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB;

import android.content.Context;
import android.graphics.Rect;
@@ -88,6 +90,14 @@ public class LauncherAllAppsContainerView extends AllAppsContainerView {
    public void onTabChanged(int pos) {
        super.onTabChanged(pos);
        if (mUsingTabs) {

            // Log tab switches only when the launcher is in AllApps state
            if (mLauncher.getStateManager().getCurrentStableState() == LauncherState.ALL_APPS) {
                mLauncher.getLiveSearchManager().allAppsLogger()
                        .log(pos == AdapterHolder.WORK ? LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB
                                : LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB);
            }

            if (pos == AdapterHolder.WORK) {
                WorkEduView.showWorkEduIfNeeded(mLauncher);
            } else {
+6 −0
Original line number Diff line number Diff line
@@ -353,6 +353,12 @@ public class StatsLogManager implements ResourceBasedOverride {

        @UiEvent(doc = "User closed the AllApps keyboard.")
        LAUNCHER_ALLAPPS_KEYBOARD_CLOSED(694),

        @UiEvent(doc = "User switched to Main tab in AllApps screen.")
        LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB(695),

        @UiEvent(doc = "User switched to Work tab in AllApps screen.")
        LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB(696),
        ;

        // ADD MORE