PrefsFile
class PrefsFile @JvmOverloads constructor(val name: String, val prefs: SharedPreferences, val policy: ValuePolicy = ValuePolicy.MASK_SENSITIVE, val readOnly: Boolean = false, unmasked: Set<String> = emptySet(), masked: Set<String> = emptySet())
A SharedPreferences file that the app registers with PrefsDebugTab.create (no-op build).
Mirrors the :lustro-prefs PrefsFile: it holds what the app passes, and the no-op tab never reads prefs. The name is checked as in the runtime, so that a name the runtime rejects fails in release too.
Parameters
unmasked
the keys whose values the runtime tab shows under ValuePolicy.MASK_SENSITIVE although they look like they hold a secret.
masked
the keys whose values the runtime tab always leaves out, under every policy.
Throws
when name is empty or contains / or \.
Constructors
Link copied to clipboard
constructor(name: String, prefs: SharedPreferences, policy: ValuePolicy = ValuePolicy.MASK_SENSITIVE, readOnly: Boolean = false, unmasked: Set<String> = emptySet(), masked: Set<String> = emptySet())
Properties
Link copied to clipboard
what the runtime tab shows of the values.
Link copied to clipboard
the instance that the runtime tab reads and edits.
Link copied to clipboard
The keys whose values the runtime tab shows under ValuePolicy.MASK_SENSITIVE, as the app passed them.