-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Huawei device failed crashed when displaying media notification #903
Comments
Hello @MrWhhh, The information you provided is not enough to make it actionable for us. It would be useful to see what device you used and clear steps to reproduce the issue. It would also be useful to see the bug report. If you're unable to share bug reports or test content publicly, please send them to [email protected] using a subject "Issue #903". Please also update this issue to indicate you’ve done this. |
@oceanjules The device I use is Huawei mate60pro, the system is Hongmeng4, and the music playing service is inherited from MediaLibraryService(). When I call exoplayer to play, other devices can normally send notifications and play, but there is a crash on Huawei mate60pro. Error log as above |
I have also encountered this error. It appears on the Huawei P40, and HarmonyOS 4 must appear. |
When I turn off all notification permissions of the APP, there will be no crash, so this error should be a crash caused by the notification. |
@MrWhhh Please provide repro steps with the demo app if you want us look into this. If we don't know how to repro we probably work on other issues first that are more actionable. I'm not sure when and whether we get such a Huawei device in our hands, but if we do and we don't have the repro steps with the demo app, it would be unfortunate. Regarding this happening on Huawei only: while being not a politician nor a prophet - I'd also try to talk to Huawei directly. Personally, I have taken notice of |
serivce inherits from MediaLibraryService() in the same way as Demo
|
@MrWhhh Please provide repro steps with the demo app if you want us look into this. |
I myself pull the source code in the HarmonyOS 4 phone debugging found that the following code may cause long overflow exception.
getPlaybackStartTimeEpochMs method returns the value Long.MIN_VALUE + 1 and then sets the setWhen method to have a long overflow exception. I tried to divide the value by 2 and it was normal. |
@WXFY Thanks for investigation and reporting.
I think It looks like this isn't a problem on other devices, I have tested the code below with API 28 and API 34 on Pixels and I can not repro the crash:
If you wanna do me a favor and you have the source already available, you can test the proposed fix above and test with the HarmonyOS 4 device to verify this actually helps. |
When the 'when' timer of the notification is disabled `DefaultMediaNotificationProvider` may set `C.TIME_UNSET` as the time. Users reported problems on some devices with this and the docs ask for an event time that probably shouldn't be a negative number. This change sets `0L` instead of `C.TIME_UNSET` when the timer is disabled. Issue: #903 #minor-release PiperOrigin-RevId: 594451074
I tested the Huawei P40 HarmonyOS 4 with your modified code and it works normally. |
Thanks for confirming. I'm closing this issue as the fix seems to work. |
When the 'when' timer of the notification is disabled `DefaultMediaNotificationProvider` may set `C.TIME_UNSET` as the time. Users reported problems on some devices with this and the docs ask for an event time that probably shouldn't be a negative number. This change sets `0L` instead of `C.TIME_UNSET` when the timer is disabled. Issue: #903 #minor-release PiperOrigin-RevId: 594451074 (cherry picked from commit 426bc94)
Version
Media3 1.2.0
More version details
Devices that reproduce the issue
Huawei
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
lay
Expected result
Media playback success
Actual result
Media
all meida
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: