Properly handle quick switch between Home button and Gallery app
This change fixes the following bug: 1. Playing a movie (especially Full HD) by Gallery. 2. Press the Home button. 3. Press the Gallery shortcut on Launcher. 4. Very quickly repeat #2 and #3 several times. Result: "Sorry, this video cannot be played" alert is shown. Change-Id: Idf9d222ca1e0bb90bfe06f6dc807dfbc71b6415b Signed-off-by: Yuriy Zabroda <yuriy.zabroda@ti.com>
This commit is contained in:
committed by
Yuriy Zabroda
parent
13a3a87fa7
commit
390e02b6a3
@@ -531,7 +531,7 @@ public class SurfaceView extends View {
|
||||
|
||||
mSurface.transferFrom(mNewSurface);
|
||||
|
||||
if (visible) {
|
||||
if (visible && mSurface.isValid()) {
|
||||
if (!mSurfaceCreated && (surfaceChanged || visibleChanged)) {
|
||||
mSurfaceCreated = true;
|
||||
mIsCreating = true;
|
||||
|
||||
Reference in New Issue
Block a user