LauncherStore

class LauncherStore(context: Context)(source)

Snapshot-backed launcher settings, persisted to SharedPreferences.

Constructors

Link copied to clipboard
constructor(context: Context)

Types

Link copied to clipboard
data class BackupSummary(val favorites: Int, val hidden: Int, val distracting: Int, val aliases: Int, val json: JSONObject)

What an import would restore — shown for confirmation before applyBackup.

Properties

Link copied to clipboard
Link copied to clipboard

Route "ask me" (voice) through the on-device model. On by default.

Link copied to clipboard

User-taught nicknames: alias text (lowercase) → AppEntry.key. These are the highest-confidence resolution tier — "bank" → HDFC opens instantly, before fuzzy matching or any model call.

Link copied to clipboard

Custom daily budgets, package → ms. Apps without one fall back to the global DISTRACTION_THRESHOLD_MS if they're marked distracting.

Link copied to clipboard

Curated background tone (#16); DEFAULT follows the theme.

Link copied to clipboard

Clock style; migrates the old show/hide boolean (hidden → OFF).

Link copied to clipboard

Packages the user treats as time-sinks (seeded with common ones).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Epoch ms when focus ends; 0 = off, Long.MAX_VALUE = until turned off. Persisted, so focus survives a launcher process restart.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Keys of apps hidden from the default drawer browse list.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

First-run onboarding (pitch + default-launcher prompt) shown exactly once.

Link copied to clipboard
Link copied to clipboard

null = never run, otherwise the human-readable self-test outcome.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Launch counts keyed by app key, used to float most-used apps.

Functions

Link copied to clipboard
fun addAlias(alias: String, app: AppEntry)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun bypassActive(packageName: String): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun chooseFont(choice: FontChoice)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Drops the installed model and its saved url/label so setup starts fresh.

Link copied to clipboard
fun cycleLimit(packageName: String)

Cycles none → 15m → 30m → 1h → 2h → none, like the other setting rows.

Link copied to clipboard
suspend fun downloadModel()
Link copied to clipboard
fun endFocus()
Link copied to clipboard

Everything restorable as versioned JSON. Deliberately excludes the HF token.

Link copied to clipboard

The app list as focus allows it: distracting apps vanish while active.

Link copied to clipboard
suspend fun installLocalModel(uri: Uri, displayName: String)

Copies in a model the user already has on-device, picked via SAF.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun limitFor(packageName: String): Long?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun pruneApp(packageName: String, userSerial: Long = 0)

Drops all stored state for a package that was uninstalled from profile userSerial, so favorites/hidden/usage don't accumulate ghosts. The package-only distracting list is touched only for the personal profile.

Link copied to clipboard
fun recordBypass(packageName: String)
Link copied to clipboard
Link copied to clipboard
fun removeAlias(alias: String)
Link copied to clipboard
Link copied to clipboard
fun resetAll()
Link copied to clipboard
suspend fun selfTestModel()

Loads the downloaded model and runs a one-word prompt so setup ends with proof the model actually answers, not just that a file arrived (#2).

Link copied to clipboard
Link copied to clipboard
fun startFocus(durationMs: Long?)

durationMs null = until manually ended.

Link copied to clipboard
fun toggleAi()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun updateHfToken(token: String)
Link copied to clipboard
Link copied to clipboard