JonasBernard / FakeStandby

An Android app for turning the screen off while keeping apps running.
https://fakestandby.jonasbernard.de
GNU General Public License v3.0
420 stars 25 forks source link

[BUG] Not working, seemingly due to permission error #59

Open Iey4iej3 opened 1 year ago

Iey4iej3 commented 1 year ago

Describe the bug FakeStandby does not work.

To Reproduce Steps to reproduce the behavior:

  1. Enable every permission hinted in app.
  2. Enable the button in quick tiles.
  3. Click that button.

Expected behavior Enter the FakeStandby mode

Logcat

FATAL EXCEPTION: main
Process: android.jonas.fakestandby, PID: 32691
java.lang.RuntimeException: Unable to start service android.jonas.fakestandby.service.AccessibilityOverlayService@d841b with Intent { cmp=android.jonas.fakestandby/.service.AccessibilityOverlayService (has extras) }: java.lang.SecurityException: Permission Denial: android.intent.action.CLOSE_SYSTEM_DIALOGS broadcast from android.jonas.fakestandby (pid=32691, uid=10203) requires android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS.
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4724)
    at android.app.ActivityThread.access$2000(ActivityThread.java:256)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2129)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7870)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.SecurityException: Permission Denial: android.intent.action.CLOSE_SYSTEM_DIALOGS broadcast from android.jonas.fakestandby (pid=32691, uid=10203) requires android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS.
    at android.os.Parcel.createExceptionOrNull(Parcel.java:2426)
    at android.os.Parcel.createException(Parcel.java:2410)
    at android.os.Parcel.readException(Parcel.java:2393)
    at android.os.Parcel.readException(Parcel.java:2335)
    at android.app.IActivityManager$Stub$Proxy.broadcastIntentWithFeature(IActivityManager.java:5727)
    at android.app.ContextImpl.sendBroadcast(ContextImpl.java:1185)
    at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:479)
    at android.jonas.fakestandby.service.AccessibilityOverlayService.g(SourceFile:4)
    at android.jonas.fakestandby.service.AccessibilityOverlayService.onStartCommand(SourceFile:7)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4706)
    ... 9 more
Caused by: android.os.RemoteException: Remote stack trace:
    at com.android.server.wm.ActivityTaskManagerService.checkCanCloseSystemDialogs(ActivityTaskManagerService.java:3021)
    at com.android.server.wm.ActivityTaskManagerService.access$1100(ActivityTaskManagerService.java:299)
    at com.android.server.wm.ActivityTaskManagerService$LocalService.checkCanCloseSystemDialogs(ActivityTaskManagerService.java:5476)
    at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:13237)
    at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:12805)

Device information:

MikuDroid commented 1 year ago

Screenshot_20230222-132700_Chrome Entering fakestandby from the app crashes the app, entering it from quicksettings resulting this pop-up.

PeterKW commented 1 year ago

I think that I'm also getting this error