From b65bfd3ba37ca401c04b7fee793e0dac14111dd6 Mon Sep 17 00:00:00 2001 From: Soo-Hwan Na <69458352+roynatech2544@users.noreply.github.com> Date: Thu, 2 Dec 2021 06:43:33 +0900 Subject: [PATCH] universal7885: parts: fix NullPointerException * "this" to get current context needs to be done on overriding method --- .../src/com/eurekateam/samsungextras/fps/FPSTileService.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/universal7885-common/apps/SamsungParts/src/com/eurekateam/samsungextras/fps/FPSTileService.kt b/universal7885-common/apps/SamsungParts/src/com/eurekateam/samsungextras/fps/FPSTileService.kt index 52f45d1..f33dc4e 100644 --- a/universal7885-common/apps/SamsungParts/src/com/eurekateam/samsungextras/fps/FPSTileService.kt +++ b/universal7885-common/apps/SamsungParts/src/com/eurekateam/samsungextras/fps/FPSTileService.kt @@ -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() } -} \ No newline at end of file +}