Merge "Make sure resume() and flush() are handled appropriately even if the codec" into jb-mr2-dev