theme / projekt.commons.theme / ThemeApp
ThemeApp¶
object ThemeApp
Main class of this library.
Types¶
| Name | Summary |
|---|---|
| InitResult | sealed class InitResultThis class represents the result of Backend initialization. |
| OverlayState | object OverlayStateUsed to represent status of the installed overlay |
Properties¶
| Name | Summary |
|---|---|
| isAndromeda | val isAndromeda:BooleanReturns true if the active Backend uses Andromeda Server. |
| isAndromedaSamsung | val isAndromedaSamsung:BooleanReturns true if the active Backend uses Andromeda Backend and if Build.VERSION.SDK_INT < Build.VERSION_CODES.P |
| isPieRoot | val isPieRoot:BooleanReturns true if the active Backend uses root and if Build.VERSION.SDK_INT >= Build.VERSION_CODES.P. |
| isRoot | val isRoot:BooleanReturns true if the active Backend uses root. |
| isSubstratumOms | val isSubstratumOms:BooleanReturns true if the host OS runs modified version of OMS. Usually custom ROMs. |
| isSubstratumService | val isSubstratumService:BooleanReturns true if the active Backend uses Substratum Service. |
| isSupportCustomFonts | val isSupportCustomFonts:BooleanThis checks exists because custom fonts support is kind of broken on P+ |
| isSynergy | val isSynergy:BooleanReturns true if the active Backend uses Synergy |
| magiskInstalledOverlay | val magiskInstalledOverlay:List<OverlayPackageInfo>Returns list of overlays in form of OverlayPackageInfo in the magisk install location. |
| OVERLAY_PERMISSION | val OVERLAY_PERMISSION:StringAny overlays generated by this library will always have this “permission”. |
| SAMSUNG_OVERLAY_PERMISSION | const val SAMSUNG_OVERLAY_PERMISSION:StringAny overlays generated by this library will always have this permission if the host device runs Samsung OS. |
Functions¶
| Name | Summary |
|---|---|
| canUseSamsungExposure | fun canUseSamsungExposure():BooleanChecks whether the Samsung theme exposures can be used. |
| getBackend | fun getBackend(options:ThemeAppOptions):Backend?Get theme application backend with specified options. If the backend is uninitialized, this method will try silently initialize it, assuming all the requirements (permissions etc) for supported backend are fulfilled. If not, then null will be returned. |
| getInitIntent | fun getInitIntent(context:Context, options:ThemeAppOptions):IntentReturns an activity Intent to initialize the Backend for the theme app. |
| getOverlayPackageInfo | fun getOverlayPackageInfo(overlayPackageName:String):OverlayPackageInfo?Reads details of an installed overlay. |
| getResultFromIntent | fun getResultFromIntent(intent:Intent):ThemeApp.InitResultReturns InitResult from init result intent. |
| isSamsungExposureAvailable | fun isSamsungExposureAvailable():BooleanChecks whether the Samsung theme exposures is available to use. |
| isSamsungExposureEnabled | fun isSamsungExposureEnabled():BooleanChecks whether the Samsung exposures is enabled. |
| setSamsungExposureEnabled | fun setSamsungExposureEnabled(enabled:Boolean):UnitEnables or disables the available Samsung exposures. If it can’t be used this method will fail silently. |