mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 18:07:55 +00:00
Fix crash
This commit is contained in:
parent
dea0bb4e1f
commit
16067d7523
@ -49,7 +49,7 @@ class PresenterActivity : AppCompatActivity(), SensorEventListener {
|
|||||||
if (offScreenControlsSupported) MediaSessionCompat(this, "kdeconnect") else null
|
if (offScreenControlsSupported) MediaSessionCompat(this, "kdeconnect") else null
|
||||||
}
|
}
|
||||||
private val powerManager by lazy { getSystemService(POWER_SERVICE) as PowerManager }
|
private val powerManager by lazy { getSystemService(POWER_SERVICE) as PowerManager }
|
||||||
private val plugin: PresenterPlugin = KdeConnect.getInstance().getDevicePlugin(intent.getStringExtra("deviceId"), PresenterPlugin::class.java)!!
|
private lateinit var plugin : PresenterPlugin
|
||||||
|
|
||||||
//TODO: make configurable
|
//TODO: make configurable
|
||||||
private val sensitivity = 0.03f
|
private val sensitivity = 0.03f
|
||||||
@ -69,6 +69,7 @@ class PresenterActivity : AppCompatActivity(), SensorEventListener {
|
|||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
plugin = KdeConnect.getInstance().getDevicePlugin(intent.getStringExtra("deviceId"), PresenterPlugin::class.java)!!
|
||||||
setContent { PresenterScreen() }
|
setContent { PresenterScreen() }
|
||||||
createMediaSession()
|
createMediaSession()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user