Closed HyowonHwang closed 3 years ago
Could you kindly let me know if there is what I missed, please?
I think you are expected to pass a non-null context. The change that made the context argument non-null is titled "Make context non-optional for DefaultBandwidthMeter", so I think the compile error is working as intended.
If the question is why there's a null check inside, then the answer is to avoid breaking code without nullability annotation checks which were already passing null, hence the "backward compatibility" comment. Please let me know if I haven't answered your question and I'll reopen the issue.
@AquilesCanta
I meant to pass null context on my kotlin codes. But I couldn't do it by compile error.
I used to pass null value when DefaultBandwidthMeter.Builder(null)
.
Yes, unfortunately I think that's intended. Is there a reason not to pass a context as expected, aside from the potential extra plumbing required?
ExoPlayer Version: 2.12.1 Android Studio 4.1.1 Kotlin Plugin version : 1.4.10
[REQUIRED] Searched documentation and issues
[REQUIRED] Question
I've tried to write below code on my own kotlin codes. Since 2.12.1, null value is not permitted with below builder constructor.
I reckon that builder construct could be nullable.
Could you kindly let me know if there is what I missed, please?