Screen

interface Screen

Provide a interface for screen

  • Manipulate screen settings such as brightness and on/off state

  • Get settings for screen

Types

Link copied to clipboard
data class Settings(var isOn: Boolean, var brightness: Long)

Functions

Link copied to clipboard
abstract fun getSettings(): Screen.Settings

Return a current setting of screen.

Link copied to clipboard
abstract fun setBrightness(brightness: Long): Boolean

Set the brightness of screen.

Link copied to clipboard
abstract fun turnOff(): Boolean

Turn off the screen.

Link copied to clipboard
abstract fun turnOn(brightness: Long): Boolean

Turn on the screen with given brightness.