Closed RamV13 closed 6 years ago
Thanks, I like it but it looks like a more scalable solution would be to use this: https://kotlinlang.org/docs/reference/compiler-plugins.html#sam-with-receiver-compiler-plugin (we would have to annotated Android APIs but it wouldn't require new implementations/tests/etc. for every SAM we want to improve this way).
Makes sense!
If you're planning on including extensions for the
android.media
package, I'd like to propose the extensions ofdoOnControlStatusChange
anddoOnEnableStatusChange
toAudioEffect
. The advantage here is leveraging the receiver parameter to avoid explicitly naming theeffect
parameter. Further, parameters can even be omitted altogether by simply utilizing theit
syntax.Before
After
* test convention for waiting on asynchronous callbacks adapted from AOSP