PrefsFile

constructor(name: String, prefs: SharedPreferences, policy: ValuePolicy = ValuePolicy.MASK_SENSITIVE, readOnly: Boolean = false, unmasked: Set<String> = emptySet(), masked: Set<String> = emptySet())

Parameters

unmasked

the keys whose values ValuePolicy.MASK_SENSITIVE shows although they look like they hold a secret, such as an oauth_scopes key, which has auth in its name but holds no secret. A name matches a key with exactly that name, in any case: it is no pattern. A JSON value of such a key shows whole, with no field replaced. It changes nothing under ValuePolicy.VISIBLE, which shows every value, or ValuePolicy.KEYS_ONLY, which shows none: the tab ignores it there, so that a change of the policy never shows more than the policy says.

masked

the keys whose values the tab always leaves out, under every policy, also ValuePolicy.VISIBLE: a key whose name the check does not find, such as an account_info key that holds a JSON string with a token in it, or a key that must stay hidden when someone changes the policy. A name matches a key with exactly that name, in any case: it is no pattern. A key in both unmasked and masked is masked.