chenxiaolong / BCR

A Basic Call Recorder for rooted Android devices
GNU General Public License v3.0
1.67k stars 109 forks source link

[Bug] "Delete" notification button does nothing #388

Closed KaKi87 closed 1 year ago

KaKi87 commented 1 year ago

Hello,

Clicking "delete" on "Successfully recorded call" notification does nothing : it does not delete the file(s) and it does not dismiss the notification.

Thanks

chenxiaolong commented 1 year ago

Can you grab a logcat right after clicking the delete button and upload that?

Also, does clicking delete a second time work? (I personally run into an issue where sometimes the delete button only works on the second try because Android didn't tell BCR it was clicked. I have no idea why yet.)

KaKi87 commented 1 year ago

Can you grab a logcat right after clicking the delete button and upload that?

Do you mean like this ?

In the meantime I dismissed the notification and manually deleted the files, I don't know when's the next time I'll need to use that feature, but I'll try whenever that is.

Also, does clicking delete a second time work?

I did try several times.

Thanks

chenxiaolong commented 1 year ago

Do you mean like this ?

Yep, an app like that would work. Or if you're familiar with adb, you could run adb logcat -d > logcat.txt too. Either way will produce the same logs.

I did try several times.

Good to know. This might be a different issue from what I'm experiencing then.

KaKi87 commented 1 year ago

Wow, this produces so much logs even when doing nothing...

I think I found what you're looking for though :

Failed to handle intent: Intent { act=com.chiller3.bcr.NotificationActionService.delete_uri dat=redacted: flg=0x10000000 cmp=com.chiller3.bcr/.NotificationActionService (has extras) }
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Class.isInterface()' on a null object reference
    at java.lang.Class.isAssignableFrom(Class.java:589)
    at android.os.Parcel.readParcelableCreatorInternal(Parcel.java:4900)
    at android.os.Parcel.readParcelableInternal(Parcel.java:4807)
    at android.os.Parcel.readValue(Parcel.java:4567)
    at android.os.Parcel.readValue(Parcel.java:4347)
    at android.os.Parcel.readListInternal(Parcel.java:5329)
    at android.os.Parcel.readArrayListInternal(Parcel.java:5348)
    at android.os.Parcel.readValue(Parcel.java:4597)
    at android.os.Parcel.readValue(Parcel.java:4347)
    at android.os.Parcel.-$$Nest$mreadValue(Unknown Source:0)
    at android.os.Parcel$LazyValue.apply(Parcel.java:4445)
    at android.os.Parcel$LazyValue.apply(Parcel.java:4404)
    at android.os.BaseBundle.getValueAt(BaseBundle.java:394)
    at android.os.BaseBundle.getValue(BaseBundle.java:374)
    at android.os.BaseBundle.getArrayList(BaseBundle.java:1486)
    at android.os.Bundle.getParcelableArrayList(Bundle.java:1090)
    at android.content.Intent.getParcelableArrayListExtra(Intent.java:9039)
    at com.chiller3.bcr.NotificationActionService$$ExternalSyntheticApiModelOutline0.m(SourceFile:13)
    at com.chiller3.bcr.NotificationActionService.parseDeleteUriIntent(Unknown Source:6)
    at com.chiller3.bcr.NotificationActionService.onStartCommand(Unknown Source:21)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4653)
    at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2177)
    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:7925)
    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:942)

Thanks

chenxiaolong commented 1 year ago

Thanks for the log. Which version of Android are you running? It looks like the crash is happening at a spot where the behavior is different for Android <=12 and >=13.

Wow, this produces so much logs even when doing nothing...

:slightly_smiling_face: Some devices, like Samsung, are especially bad. On my old Galaxy S8+ from a few years ago, there was a bug in one of Samsung's system apps that caused logs to be produced at multiple megabytes per second.

KaKi87 commented 1 year ago

Which version of Android are you running?

13.

there was a bug in one of Samsung's system apps that caused logs to be produced at multiple megabytes per second.

Ouch.

My device is Xiaomi Mi 8, although I'm not running the stock ROM (MIUI) but a less bloated one.

chenxiaolong commented 1 year ago

I believe this is caused by this Android 13 bug: https://issuetracker.google.com/issues/274185314. It's fixed in Android 14, but looks like it will never be fixed in 13. I didn't encounter this because I do all my testing on debug builds and this bug only affects release builds.

I'll look into some of the workarounds later this week.

chenxiaolong commented 1 year ago

This is fixed in #396, which will be included in the next version of BCR.