Backport critical Media Viewer bugfixes

Bug: 72516
Bug: 73337
Change-Id: Ia114e24db60487ff376c04c52f0bca92e202f0ab
Merge "Backport critical Media Viewer bugfixes" into wmf/1.25wmf9