Add more debug information.

Add page's isEnabled data in DebugActivity
Add entry's attribution data in DebugActivity

Bug: 244122804
Test: unit-test & local build gallery
Change-Id: I1abd0ec87a44d947599e21185dd0c7a63f4ab0af
This commit is contained in:
Zekan Qian
2023-01-31 11:27:22 +08:00
parent a2df5eddef
commit 2c89f0465e
2 changed files with 6 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ class DebugActivity : ComponentActivity() {
RegularScaffold(title = "Page - ${page.debugBrief()}") {
Text(text = "id = ${page.id}")
Text(text = page.debugArguments())
Text(text = "enabled = ${page.isEnabled()}")
Text(text = "Entry size: ${pageWithEntry.entries.size}")
Preference(model = object : PreferenceModel {
override val title = "open page"

View File

@@ -66,6 +66,11 @@ fun SettingsEntry.debugContent(entryRepository: SettingsEntryRepository): String
"linkFrom = ${fromPage?.debugBrief()} ${fromPage?.debugArguments()}",
"linkTo = ${toPage?.debugBrief()} ${toPage?.debugArguments()}",
"hierarchy_path = $entryPathWithName",
"------ ATTRIBUTION ------",
"allowSearch = $isAllowSearch",
"isSearchDynamic = $isSearchDataDynamic",
"isSearchMutable = $hasMutableStatus",
"hasSlice = $hasSliceSupport",
"------ SEARCH ------",
"search_path = $entryPathWithTitle",
searchData?.debugContent() ?: "no search data",