mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 19:55:33 -04:00
universal7885: parts: fix NullPointerException
* "this" to get current context needs to be done on overriding method
This commit is contained in:
parent
24ff1bae86
commit
b65bfd3ba3
1 changed files with 3 additions and 2 deletions
|
|
@ -21,10 +21,11 @@ import android.service.quicksettings.TileService
|
|||
|
||||
// TODO: Add FPS drawables
|
||||
class FPSTileService : TileService() {
|
||||
private val fpsinfo = Intent(this, FPSInfoService::class.java)
|
||||
private lateinit var fpsinfo : Intent
|
||||
private var isShowing = false
|
||||
override fun onStartListening() {
|
||||
super.onStartListening()
|
||||
fpsinfo = Intent(this, FPSInfoService::class.java)
|
||||
val fpsInfoService = FPSInfoService()
|
||||
isShowing = fpsInfoService.getRunning()
|
||||
updateTile()
|
||||
|
|
@ -42,4 +43,4 @@ class FPSTileService : TileService() {
|
|||
if (isShowing) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE
|
||||
tile.updateTile()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue