Missing permissions issue should not crash the app
apolunar opened this issue · 1 comments
apolunar commented
current behavior: setting a reminder does not ask for the "alarms and reminders" permission which I had to find and turn on manually in settings
expected behavior: the app asks for this permission
possible cause: running graphene which may have more granular permission control than is expected
logcat output:
type: crash
osVersion: google/cheetah/cheetah:14/UP1A.231105.003/2023112900:user/release-keys
package: com.maltaisn.notes.sync:10503
process: com.maltaisn.notes.sync
processUptime: 217 + 199 ms
installer: com.android.packageinstaller
java.lang.SecurityException: Caller com.maltaisn.notes.sync needs to hold android.permission.SCHEDULE_EXACT_ALARM or android.permission.USE_EXACT_ALARM to set exact alarms.
at android.os.Parcel.createExceptionOrNull(Parcel.java:3066)
at android.os.Parcel.createException(Parcel.java:3050)
at android.os.Parcel.readException(Parcel.java:3026)
at android.os.Parcel.readException(Parcel.java:2968)
at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:311)
at android.app.AlarmManager.setImpl(AlarmManager.java:1093)
at android.app.AlarmManager.setImpl(AlarmManager.java:1045)
at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:1321)
at androidx.appcompat.widget.r0.j(SourceFile:1)
at c3.d1.c(SourceFile:123)
at c3.d1.e(SourceFile:109)
at c3.c1.l(SourceFile:1)
at r4.a.p(SourceFile:1)
at h5.y.run(SourceFile:1)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8199)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Suppressed: m5.f: [f1{Cancelling}@f63c78a, Dispatchers.Main.immediate]
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.alarm.AlarmManagerService$5.set(AlarmManagerService.java:2981)
at android.app.IAlarmManager$Stub.onTransact(IAlarmManager.java:181)
at android.os.Binder.execTransactInternal(Binder.java:1368)
at android.os.Binder.execTransact(Binder.java:1299)
maltaisn commented
Fixed in v1.5.4