create

fun create(context: Context, files: List<PrefsFile> = emptyList(), dataStores: List<PrefsDataStore> = emptyList(), discover: Boolean = true, discoveredReadOnly: Boolean = true): PrefsDebugTab

Creates a PrefsDebugTab.

Parameters

context

a context of the app. The tab keeps its application context, to find the files on disk and open them.

files

the SharedPreferences files to show with a policy of their own, in this order, before the discovered ones.

dataStores

the Preferences DataStores to show with a policy of their own, in this order, after files and before the discovered ones.

discover

whether to show the other files in the app's shared_prefs and files/datastore directories too, such as the files of the app's libraries.

discoveredReadOnly

whether the discovered SharedPreferences files are read-only. An edit to a library's file can break that library. Lustro's own file, lustro_debug, which holds the token, is read-only either way, and so is a discovered data store.

Throws

when two of files, or two of dataStores, have the same name.