fix restart service crash
This commit is contained in:
parent
660d6ff230
commit
be2fa3e444
1 changed files with 1 additions and 0 deletions
|
|
@ -278,6 +278,7 @@ class MainService : Service() {
|
|||
Log.d("whichService", "this service: ${Thread.currentThread()}")
|
||||
super.onStartCommand(intent, flags, startId)
|
||||
if (intent?.action == ACT_INIT_MEDIA_PROJECTION_AND_SERVICE) {
|
||||
createForegroundNotification()
|
||||
Log.d(logTag, "service starting: ${startId}:${Thread.currentThread()}")
|
||||
val mediaProjectionManager =
|
||||
getSystemService(MEDIA_PROJECTION_SERVICE) as MediaProjectionManager
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue