Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Android Q (10) #162

Open
ghost opened this issue Jun 19, 2021 · 0 comments
Open

Android Q (10) #162

ghost opened this issue Jun 19, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 19, 2021

In order to speed up development time, I ask that you use the below text as a template for creating your issue report. While it is not required, issues that do not follow this template may be closed or marked as invalid without an explanation.

[A short description of the issue]
Permission Is Missing allow app to run in foreground causing app crashed on Q
[The error report of the crash, if applicable]
FATAL EXCEPTION: main
Process: com.james.status, PID: 23976
java.lang.RuntimeException: Unable to start service com.james.status.services.StatusServiceCompat@16fb399 with Intent { act=com.james.status.ACTION_UPDATE cmp=com.james.status/.services.StatusServiceCompat (has extras) }: java.lang.SecurityException: Permission Denial: startForeground from pid=23976, uid=10276 requires android.permission.FOREGROUND_SERVICE
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4411)
at android.app.ActivityThread.access$1800(ActivityThread.java:240)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2088)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:238)
at android.app.ActivityThread.main(ActivityThread.java:7853)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:984)
Caused by: java.lang.SecurityException: Permission Denial: startForeground from pid=23976, uid=10276 requires android.permission.FOREGROUND_SERVICE
at android.os.Parcel.createException(Parcel.java:2087)
at android.os.Parcel.readException(Parcel.java:2055)
at android.os.Parcel.readException(Parcel.java:2003)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6396)
at android.app.Service.startForeground(Service.java:707)
at com.james.status.services.StatusServiceImpl.startForeground(StatusServiceImpl.java:226)
at com.james.status.services.StatusServiceImpl.onStartCommand(StatusServiceImpl.java:158)
at com.james.status.services.StatusServiceCompat.onStartCommand(StatusServiceCompat.java:58)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4374)
... 8 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.enforcePermission(ActivityManagerService.java:6568)
at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:1386)
at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1041)
at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:15050)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2896)


[The expected behavior of the app in this situation]
it should work

Affected Device: [A list of the devices that are affected by the issue]
Realme 5i
App Version: [The version of the app that the issue occurs on]
pre release v 3.8
Android Version: [The version of android installed on the device]
Android Q (10)

@fennifith

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants