mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Merge "Log number of apps in Private space" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
2bbbc2a37e
@@ -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.
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user