Giter VIP home page Giter VIP logo

Comments (2)

MartinX3 avatar MartinX3 commented on May 27, 2024 2

Same with LineageOS 18.1 (Android 11)

  1. it crashes if the screen is disabled
  2. It crashes if I minimize the app and look at the home screen
    (Switched to homescreen 6 seconds before alarm)
  3. It crashes if I left the app open
01-08 11:37:51.890  7079  7079 D AndroidRuntime: Shutting down VM
--------- beginning of crash
01-08 11:37:51.891  7079  7079 E AndroidRuntime: FATAL EXCEPTION: main
01-08 11:37:51.891  7079  7079 E AndroidRuntime: Process: com.github.ympavlov.minidoro, PID: 7079
01-08 11:37:51.891  7079  7079 E AndroidRuntime: java.lang.SecurityException: Not allowed to change Do Not Disturb state
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:2357)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:2340)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:2282)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.media.IAudioService$Stub$Proxy.setRingerModeExternal(IAudioService.java:2998)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.media.AudioManager.setRingerMode(AudioManager.java:1150)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.github.ympavlov.minidoro.dnd.e.a(Unknown Source:13)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.github.ympavlov.minidoro.dnd.e.a(Unknown Source:18)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.github.ympavlov.minidoro.b.update(Unknown Source:56)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at java.util.Observable.notifyObservers(Observable.java:163)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at java.util.Observable.notifyObservers(Observable.java:115)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.github.ympavlov.minidoro.d.n(Unknown Source:38)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.github.ympavlov.minidoro.d.a(Unknown Source:14)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.github.ympavlov.minidoro.CountDownView.update(Unknown Source:8)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at java.util.Observable.notifyObservers(Observable.java:163)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.github.ympavlov.minidoro.g$1.run(Unknown Source:23)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7664)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at com.android.server.audio.AudioService.setRingerModeExternal(AudioService.java:3485)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.media.IAudioService$Stub.onTransact(IAudioService.java:1322)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Binder.execTransactInternal(Binder.java:1154)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 	at android.os.Binder.execTransact(Binder.java:1123)
01-08 11:37:51.891  7079  7079 E AndroidRuntime: 
01-08 11:37:51.931  7079  7079 I Process : Sending signal. PID: 7079 SIG: 9

The solution is to add the android.permission.ACCESS_NOTIFICATION_POLICY permission in the manifest and to ask and check the permissions at runtime.
https://developer.android.com/training/permissions/requesting

And please start using android jetpack and kotlin instead of java.

from minidoro.

ivanruvalcaba avatar ivanruvalcaba commented on May 27, 2024

Any news on the release of the version that fixes this problem?

from minidoro.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.