mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00

Up to now we use a boolean "preventListenerNotification" to suppress updates while other operations are still in progress. This ensures, for example, that only one initial timeline is issued even for multiple child sources. As soon as we allow to reuse the same instance, it becomes increasingly difficult to manage this manual listener notification suppression. Therefore, this change schedules an update as a new message on the playback thread immediately after the current message. This way, we also ensure that all simultaneous updates within one looper message iteration are reported together. Issue:#3498 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=187180342