Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12d68eea authored by Chaohui Wang's avatar Chaohui Wang Committed by Automerger Merge Worker
Browse files

Merge "Add IS_DEBUG to SpaEnvironment" into udc-dev am: e58cc567

parents 4e762c22 e58cc567
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -77,9 +77,8 @@ data class SettingsPage(
        return true
        return true
    }
    }


    fun isEnabled(): Boolean {
    fun isEnabled(): Boolean =
        return getPageProvider(sppName)?.isEnabled(arguments) ?: false
        SpaEnvironment.IS_DEBUG || getPageProvider(sppName)?.isEnabled(arguments) ?: false
    }


    fun getTitle(): String {
    fun getTitle(): String {
        return getPageProvider(sppName)?.getTitle(arguments) ?: ""
        return getPageProvider(sppName)?.getTitle(arguments) ?: ""
+9 −0
Original line number Original line Diff line number Diff line
@@ -88,4 +88,13 @@ abstract class SpaEnvironment(context: Context) {
    open val sliceProviderAuthorities: String? = null
    open val sliceProviderAuthorities: String? = null


    // TODO: add other environment setup here.
    // 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
    }
}
}