universal7885: parts: fix fps overlay on quicksettings

* mRunning should be static (in companion object) to correctly get it

Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
roynatech2544 2021-12-01 13:32:48 +09:00
commit de4c5c6d8e
No known key found for this signature in database
GPG key ID: 9675C32163D88D30
6 changed files with 17 additions and 3 deletions

7
a20/derp_a20.mk Normal file
View file

@ -0,0 +1,7 @@
# Auto-Generated by device/samsung/a20/setup.sh
$(call inherit-product, device/samsung/a20/full_a20.mk)
$(call inherit-product, vendor/derp/config/common_full_phone.mk)
PRODUCT_NAME := derp_a20
# Additional Props
TARGET_FACE_UNLOCK_SUPPORTED := true
TARGET_BOOT_ANIMATION_RES := 720

8
a20e/derp_a20e.mk Normal file
View file

@ -0,0 +1,8 @@
# Auto-Generated by device/samsung/a20e/setup.sh
$(call inherit-product, device/samsung/a20e/full_a20e.mk)
$(call inherit-product, vendor/derp/config/common_full_phone.mk)
PRODUCT_NAME := derp_a20e
# Additional Props
TARGET_FACE_UNLOCK_SUPPORTED := true
TARGET_BOOT_ANIMATION_RES := 720

View file

@ -37,7 +37,6 @@ open class FPSInfoService : Service() {
private val TAG = "FPSInfoService"
private var fPSInfoString: String? = null
private var mDreamManager: IDreamManager? = null
private var mRunning : Boolean = false
private inner class FPSView(c: Context) : View(c) {
private val mOnlinePaint: Paint?
@ -245,5 +244,6 @@ open class FPSInfoService : Service() {
}
companion object {
private var surfaceFlingerFPS: SurfaceFlingerFPS? = null
private var mRunning : Boolean = false
}
}

View file

@ -21,6 +21,7 @@ import android.service.quicksettings.TileService
// TODO: Add FPS drawables
class FPSTileService : TileService() {
private val fpsinfo = Intent(this, FPSInfoService::class.java)
private var isShowing = false
override fun onStartListening() {
super.onStartListening()
@ -30,7 +31,6 @@ class FPSTileService : TileService() {
}
override fun onClick() {
val fpsinfo = Intent(this, FPSInfoService::class.java)
if (!isShowing) startService(fpsinfo) else stopService(fpsinfo)
isShowing = !isShowing
updateTile()

View file

View file

@ -1 +0,0 @@
derp