As titled, on newer devices we can avoid having to restart the MediaCodec when switching in and out of fullscreen using this API.
https://developer.android.com/reference/android/media/MediaCodec.html#setOutputSurface(android.view.Surface)
Since DialogSurface and AVDAv2 are a milestone or two away, it makes sense to implement this sooner than later if it's not too complicated (and indeed it turned out not to be).
This results in a much smoother fullscreen transition for users and avoids any audio dropouts during the transition.
Comment 1 by bugdroid1@chromium.org
, Nov 4 2016