Use name as fallback of displayName

Bug: 244122804
Test: unit-test & build gallery
Change-Id: Ia683892900f78362fd66acc7189a57b0e51a4517
This commit is contained in:
Zekan Qian
2022-11-11 12:12:26 +08:00
parent a51725bcbf
commit 5b018c5c74

View File

@@ -30,14 +30,14 @@ interface SettingsPageProvider {
val name: String
/** The display name of this page provider, for better readability. */
val displayName: String?
get() = null
val displayName: String
get() = name
/** The page parameters, default is no parameters. */
val parameter: List<NamedNavArgument>
get() = emptyList()
fun getTitle(arguments: Bundle?): String = displayName ?: name
fun getTitle(arguments: Bundle?): String = displayName
fun buildEntry(arguments: Bundle?): List<SettingsEntry> = emptyList()