Commit 25eaa5b7 authored by zhuw's avatar zhuw Committed by Arne Coucheron

SnapdragonGallery: Fix multithread synchronization in screenReceiver

add judgement condition when receive intent about screen off and on.

Change-Id: I32b288ed29261999284df5d6d6857cf3573bc5e6
CRs-Fixed: 2158799
parent 46bbfc87
......@@ -475,12 +475,12 @@ public class MovieActivity extends AbstractPermissionActivity {
}
if (Intent.ACTION_SCREEN_OFF.equals(intent.getAction())) {
// Only stop video.
if (mControlResumed) {
if (mControlResumed && !mResumed) {
mPlayer.onStop();
mControlResumed = false;
}
} else if (Intent.ACTION_USER_PRESENT.equals(intent.getAction())) {
if (!mControlResumed) {
if (!mControlResumed && mResumed) {
mPlayer.onResume();
mControlResumed = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment