summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-10-25 08:25:33 -0700
committerLinux Build Service Account <lnxbuild@localhost>2018-10-25 08:25:33 -0700
commit45f68c4bd617ed1f25c116bd6b26c195fa6c9dfb (patch)
tree63144ce7e344c4b5068a48c8c237edc0adeae3b0
parentfe5db2f68046df03b600968045adce0fbcfdcfa4 (diff)
parentd661be8b145151b69ba2db7609acb8cdf31a3a8d (diff)
downloadandroid_packages_apps_Gallery2-45f68c4bd617ed1f25c116bd6b26c195fa6c9dfb.tar.gz
android_packages_apps_Gallery2-45f68c4bd617ed1f25c116bd6b26c195fa6c9dfb.tar.bz2
android_packages_apps_Gallery2-45f68c4bd617ed1f25c116bd6b26c195fa6c9dfb.zip
Merge d661be8b145151b69ba2db7609acb8cdf31a3a8d on remote branch
Change-Id: Ia76d1b310e189105cc25c875f622f1c7349db5ec
-rwxr-xr-xAndroidManifest.xml1
-rwxr-xr-x[-rw-r--r--]src/com/android/gallery3d/app/MovieActivity.java7
2 files changed, 5 insertions, 3 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d59951b98..25371f922 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -45,7 +45,6 @@
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER" />
<uses-permission android:name="android.permission.BLUETOOTH" />
- <uses-permission android:name="android.permission.MODIFY_AUDIO_ROUTING" />
<!-- add for guest to set system property -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
diff --git a/src/com/android/gallery3d/app/MovieActivity.java b/src/com/android/gallery3d/app/MovieActivity.java
index f5e7a65fb..376338863 100644..100755
--- a/src/com/android/gallery3d/app/MovieActivity.java
+++ b/src/com/android/gallery3d/app/MovieActivity.java
@@ -109,6 +109,7 @@ public class MovieActivity extends AbstractPermissionActivity {
private boolean mIsHeadsetOn = false;
private boolean mVirtualizerSupported = false;
private boolean mBassBoostSupported = false;
+ private boolean mUserPresentReceived = false;
static enum Key {
global_enabled, bb_strength, virt_strength
@@ -751,13 +752,15 @@ public class MovieActivity extends AbstractPermissionActivity {
}
if (Intent.ACTION_SCREEN_OFF.equals(intent.getAction())) {
// Only stop video.
- if (mControlResumed) {
+ if (mControlResumed && mUserPresentReceived) {
mPlayer.onStop();
+ mUserPresentReceived = false;
mControlResumed = false;
}
} else if (Intent.ACTION_USER_PRESENT.equals(intent.getAction())) {
- if (!mControlResumed) {
+ if (!mControlResumed && !mUserPresentReceived) {
mPlayer.onResume();
+ mUserPresentReceived = true;
mControlResumed = true;
}
}