Loading packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsPage.kt +2 −3 Original line number Diff line number Diff line Loading @@ -77,9 +77,8 @@ data class SettingsPage( return true } fun isEnabled(): Boolean { return getPageProvider(sppName)?.isEnabled(arguments) ?: false } fun isEnabled(): Boolean = SpaEnvironment.IS_DEBUG || getPageProvider(sppName)?.isEnabled(arguments) ?: false fun getTitle(): String { return getPageProvider(sppName)?.getTitle(arguments) ?: "" Loading packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SpaEnvironment.kt +9 −0 Original line number Diff line number Diff line Loading @@ -88,4 +88,13 @@ abstract class SpaEnvironment(context: Context) { open val sliceProviderAuthorities: String? = null // TODO: add other environment setup here. companion object { /** * Whether debug mode is on or off. * * If set to true, this will also enable all the pages under development (allows browsing * and searching). */ const val IS_DEBUG = false } } Loading
packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsPage.kt +2 −3 Original line number Diff line number Diff line Loading @@ -77,9 +77,8 @@ data class SettingsPage( return true } fun isEnabled(): Boolean { return getPageProvider(sppName)?.isEnabled(arguments) ?: false } fun isEnabled(): Boolean = SpaEnvironment.IS_DEBUG || getPageProvider(sppName)?.isEnabled(arguments) ?: false fun getTitle(): String { return getPageProvider(sppName)?.getTitle(arguments) ?: "" Loading
packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SpaEnvironment.kt +9 −0 Original line number Diff line number Diff line Loading @@ -88,4 +88,13 @@ abstract class SpaEnvironment(context: Context) { open val sliceProviderAuthorities: String? = null // TODO: add other environment setup here. companion object { /** * Whether debug mode is on or off. * * If set to true, this will also enable all the pages under development (allows browsing * and searching). */ const val IS_DEBUG = false } }