sommd / auto-mute

Automatically mute or unmute your media volume based on the type of audio playing for Android 8.0 and up.
GNU General Public License v3.0
15 stars 1 forks source link

Crash report after optimization of GrapheneOS #12

Open JanWaldhorn opened 3 months ago

JanWaldhorn commented 3 months ago

I use GrapheneOS on my Pixel 6. After each system update, the apps are optimized in the background (ahead-of-time compilation, more here). Afterwards the optimized apps have to be restarted. This works without problems for all apps, only from Automute I get an error message like "App closed repeatedly". Here is an excerpt from the log file:

type: crash
osVersion: google/oriole/oriole:14/AP2A.240805.005.F1/2024080600:user/release-keys
package: xyz.sommd.automute:105002000
process: xyz.sommd.automute
processUptime: 169 + 812 ms
installer: com.android.vending

java.lang.RuntimeException: Unable to create service xyz.sommd.automute.service.AutoMuteService: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service xyz.sommd.automute/.service.AutoMuteService
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:4942)
    at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2414)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8623)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ExecInit.main(ExecInit.java:50)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service xyz.sommd.automute/.service.AutoMuteService
    at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
    at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
    at android.os.Parcel.readParcelableInternal(Parcel.java:5036)
    at android.os.Parcel.readParcelable(Parcel.java:5018)
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3187)
    at android.os.Parcel.createException(Parcel.java:3176)
    at android.os.Parcel.readException(Parcel.java:3152)
    at android.os.Parcel.readException(Parcel.java:3094)
    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6975)
    at android.app.Service.startForeground(Service.java:778)
    at xyz.sommd.automute.service.AutoMuteService.onCreate(SourceFile:12)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:4929)
    ... 11 more