1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
time: 1550919948215
msg: java.lang.SecurityException: Remote stack trace:
	at com.android.server.am.ActivityManagerService.enforcePermission(ActivityManagerService.java:9208)
	at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:1189)
	at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:870)
	at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:20507)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:977)

stacktrace: java.lang.RuntimeException: Unable to create service pl.qus.xenoamp.xenoservice.MusicService: java.lang.SecurityException: Permission Denial: startForeground from pid=26056, uid=10151 requires android.permission.FOREGROUND_SERVICE
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:3582)
	at android.app.ActivityThread.access$1300(ActivityThread.java:200)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6718)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.SecurityException: Permission Denial: startForeground from pid=26056, uid=10151 requires android.permission.FOREGROUND_SERVICE
	at android.os.Parcel.createException(Parcel.java:1950)
	at android.os.Parcel.readException(Parcel.java:1918)
	at android.os.Parcel.readException(Parcel.java:1868)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:5202)
	at android.app.Service.startForeground(Service.java:695)
	at pl.qus.xenoamp.xenoservice.MusicService.onCreate(MusicService.kt:144)
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:3570)
	... 8 more
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.am.ActivityManagerService.enforcePermission(ActivityManagerService.java:9208)
	at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:1189)
	at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:870)
	at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:20507)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:977)