summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-11-18 18:09:46 +0800
committerkaiyiz <kaiyiz@codeaurora.org>2014-11-18 18:09:46 +0800
commitac7318705c825a9ce6199c301b3fda7a4d25ee6d (patch)
tree32bc4a5eb4ae6f71e276eeb647367c81c8c6de1b /src/com/android
parentfa5038cc597a133c1ac56fcc80355df0b5864a4d (diff)
downloadandroid_packages_apps_Gallery2-ac7318705c825a9ce6199c301b3fda7a4d25ee6d.tar.gz
android_packages_apps_Gallery2-ac7318705c825a9ce6199c301b3fda7a4d25ee6d.tar.bz2
android_packages_apps_Gallery2-ac7318705c825a9ce6199c301b3fda7a4d25ee6d.zip
Gallery2: Set default value for server timeout
The timeout of server is not set when read from flag of SERVER_TIMEOUT, the value will stay to be -1, as a result there will be no resume dialog Set a default value of 3 min for resume timeout CRs-Fixed: 753834 Change-Id: Icd4640c4b56a64857dfade1bb8d7a3581494d404
Diffstat (limited to 'src/com/android')
-rwxr-xr-xsrc/com/android/gallery3d/app/MoviePlayer.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/MoviePlayer.java b/src/com/android/gallery3d/app/MoviePlayer.java
index f35d172fc..65a485009 100755
--- a/src/com/android/gallery3d/app/MoviePlayer.java
+++ b/src/com/android/gallery3d/app/MoviePlayer.java
@@ -1262,6 +1262,7 @@ public class MoviePlayer implements
private long mLastDisconnectTime;
private boolean mIsShowDialog = false;
private AlertDialog mServerTimeoutDialog;
+ private int RESUME_DIALOG_TIMEOUT = 3 * 60 * 1000; // 3 mins
// check whether disconnect from server timeout or not.
// if timeout, return false. otherwise, return true.
@@ -1384,8 +1385,12 @@ public class MoviePlayer implements
}
public void setVideoInfo(Metadata data) {
+ mServerTimeout = RESUME_DIALOG_TIMEOUT;
if (data.has(SERVER_TIMEOUT)) {
mServerTimeout = data.getInt(SERVER_TIMEOUT);
+ if (mServerTimeout == 0) {
+ mServerTimeout = RESUME_DIALOG_TIMEOUT;
+ }
if (LOG) {
Log.v(TAG, "get server timeout from metadata. mServerTimeout="
+ mServerTimeout);