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

Commit 2bbbc2a3 authored by Anna Zhuravleva's avatar Anna Zhuravleva Committed by Android (Google) Code Review
Browse files

Merge "Log number of apps in Private space" into main

parents c19e3372 b05ceb39
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.launcher3.allapps;
import static com.android.launcher3.allapps.SectionDecorationInfo.ROUND_BOTTOM_LEFT;
import static com.android.launcher3.allapps.SectionDecorationInfo.ROUND_BOTTOM_RIGHT;
import static com.android.launcher3.allapps.SectionDecorationInfo.ROUND_NOTHING;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_PRIVATE_SPACE_PREINSTALLED_APPS_COUNT;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_PRIVATE_SPACE_USER_INSTALLED_APPS_COUNT;

import android.content.Context;

@@ -342,6 +344,20 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
        Map<Boolean, List<AppInfo>> split = mPrivateApps.stream()
                .collect(Collectors.partitioningBy(mPrivateProviderManager
                                .splitIntoUserInstalledAndSystemApps()));

        // TODO(b/329688630): switch to the pulled LayoutStaticSnapshot atom
        mActivityContext
                .getStatsLogManager()
                .logger()
                .withCardinality(split.get(true).size())
                .log(LAUNCHER_PRIVATE_SPACE_USER_INSTALLED_APPS_COUNT);

        mActivityContext
                .getStatsLogManager()
                .logger()
                .withCardinality(split.get(false).size())
                .log(LAUNCHER_PRIVATE_SPACE_PREINSTALLED_APPS_COUNT);

        // Add user installed apps
        position = addAppsWithSections(split.get(true), position);
        // Add system apps separator.
+6 −0
Original line number Diff line number Diff line
@@ -754,6 +754,12 @@ public class StatsLogManager implements ResourceBasedOverride {
        @UiEvent(doc = "User tapped add widget button in widget sheet.")
        LAUNCHER_WIDGET_ADD_BUTTON_TAP(1622),

        @UiEvent(doc = "Number of user installed Private profile apps, shown above separator line")
        LAUNCHER_PRIVATE_SPACE_USER_INSTALLED_APPS_COUNT(1672),

        @UiEvent(doc = "Number of preinstalled Private profile apps, shown under separator line")
        LAUNCHER_PRIVATE_SPACE_PREINSTALLED_APPS_COUNT(1673)

        // ADD MORE
        ;