Alcatraz323 / audiohq_md2

A tool to control android application volume individually, TRUE adjusting not auto adjust script, for native and more information check the website
https://alcatraz323.github.io/audiohq
MIT License
116 stars 7 forks source link

App Crashing when volume change happens too quick #3

Closed aroguecoder closed 2 years ago

aroguecoder commented 2 years ago

When you change native android volume too quickly, the one that's available when you slide the screen to adjust volume when playing media in vlc, mxplayer, etc this error would happen.

Error log

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.media.VOLUME_CHANGED_ACTION flg=0x14000010 (has extras) } in io.alcatraz.audiohq.services.VolumeChangeObserver$VolumeReceiver@7e24ad7 at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1590) at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7664) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) Caused by: java.lang.IllegalStateException: View android.widget.LinearLayout{1e1dede V.E...... ......ID 0,0-2160,149 #7f09005d app:id/audiohq_float_root} has already been added to the window manager. at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:381) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:109) at io.alcatraz.audiohq.services.FloatPanelService.showFloatWindow_Impl(FloatPanelService.java:418) at io.alcatraz.audiohq.services.FloatPanelService.showFloatingWindow(FloatPanelService.java:409) at io.alcatraz.audiohq.services.FloatPanelService.showPanel(FloatPanelService.java:173) at io.alcatraz.audiohq.services.FloatPanelService$2.onVolumeChange(FloatPanelService.java:151) at io.alcatraz.audiohq.services.VolumeChangeObserver$VolumeReceiver.onReceive(FloatPanelService.java:656) at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1580) ... 8 more

Step to reproduce.

  1. Open app, confirm that it's running by changing current media volume.
  2. Open vlc, plays any media, slide up and down on the right side of the screen to change volume.
  3. App would crash and the audiohq overlay would dissapear too unless you manually reopen the app.
aroguecoder commented 2 years ago

Pardon the rapid editing btw, idk which issue template to follow.

aroguecoder commented 2 years ago

Seem's like there's a change in latest commit tree that resolved this issue, closing.