Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
                }