Package-level declarations
Types
A launchable app: just what we need to show a name and start it. userSerial identifies which profile the app lives in: 0 = the launcher's own (personal) profile, otherwise the work/private profile's stable serial number — the same package can be installed in both, and they are distinct entries.
Snapshot-backed launcher settings, persisted to SharedPreferences.
Reads real per-app foreground time via UsageStatsManager. Requires the special "usage access" grant (not a normal runtime permission) — the whole point of a minimalist phone: see where the time goes and add friction to the time-sinks.
Properties
Schema version of the settings backup JSON (#11).
Nudge before opening a distracting app once it's over this much today.
Most favorites we allow pinned on the home screen.
Functions
Whether the long-press menu should offer uninstall: personal-profile, non-system apps only (system apps can't be uninstalled, and other profiles' apps are managed from within that profile).
Pulls down the system notification shade (uses the hidden StatusBarManager API).
"2h 15m", "45m", or "3m".
Enumerates launchable apps across all profiles (personal + work + private space) via LauncherApps — plain PackageManager queries only see the personal profile. Locked/quiet profiles simply don't return activities, so their apps disappear while paused, which is the system-consistent behavior.
Fires the system uninstall confirmation for app; the OS does the rest.
Resolves a stored AppEntry.userSerial back to the real profile it names — null if that profile no longer exists (removed, or mid-removal). Shared by every call site that needs a UserHandle for a LauncherApps call (launching an app, loading its icon): each previously reimplemented this same "0L means the personal profile, otherwise look up the serial" check.
'A'–'Z' if label starts with a letter, otherwise '#' — the drawer A–Z rail's overflow bucket for digits, symbols, and non-Latin scripts. The single source of truth for this classification: the sort order above and the rail's own section lookups (LauncherScreen.kt) both call this, so they can't silently drift apart the way two independently-written copies of the same rule eventually do. The sort puts '#' labels after Z on purpose — plain ASCII order would put digits before letters, scattering them at the list's start while the rail shows '#' last, so dragging to '#' would jump to the top instead of wherever those apps actually are.