theme / projekt.commons.theme.backend / Backend

Backend

interface Backend

Interface to do overlay related operations.

See Also

getBackend

Properties

Name Summary
overlayState abstract val overlayState:Map<String,Int>
Returns map of installed overlay package name and its state.
targetWithMultipleOverlay abstract val targetWithMultipleOverlay:List<String>
Returns list of target packages that overlaid by multiple overlays.

Functions

Name Summary
applyFonts abstract fun applyFonts(themePid:String, name:String):Unit
Applies custom fonts to the system.
getEnabledOverlayWithTarget abstract fun getEnabledOverlayWithTarget(targetPackage:String):List<String>
Returns list of enabled overlay package names for a target.
installOverlay abstract fun installOverlay(paths:List<String>):Unit
Installs overlay to the system.
restartSystemUi abstract fun restartSystemUi():Unit
Restarts SystemUI
restoreFonts abstract fun restoreFonts():Unit
Restores fonts to system default.
setPriority abstract fun setPriority(packages:List<String>, restartUi:Boolean):Unit
Sets priority of overlays.
switchOverlay abstract fun switchOverlay(packages:List<String>, state:Boolean, restartUi:Boolean):Unit
Switches overlay state.
uninstallOverlay abstract fun uninstallOverlay(packages:List<String>, restartUi:Boolean):Unit
Uninstalls overlay from the system.

Extension Functions

Name Summary
isOverlayNewest funBackend.isOverlayNewest(name:String, timeStamp:Long):Boolean
Checks whether the installed overlay is the intended ones. This is checked against timestamp in the overlay metadata.
setPriority funBackend.setPriority(overlays:List<String>):Unit
Sets priority of overlays.
switchOverlay funBackend.switchOverlay(overlay:String, state:Boolean):Unit
funBackend.switchOverlay(overlays:List<String>, state:Boolean):Unit
Switches overlay state.
uninstallOverlay funBackend.uninstallOverlay(overlays:List<String>):Unit
Uninstalls overlay from the system.