summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/PhotoPage.java
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2011-11-17 15:26:56 +0800
committerOwen Lin <owenlin@google.com>2011-11-17 15:26:56 +0800
commitc907c3215c63402348599e532e2ea74caa9b95fc (patch)
tree87a90d05ccf948ba5794300e7915fa09557a8682 /src/com/android/gallery3d/app/PhotoPage.java
parent606931461adcccaa0c906fd8ba31c472321e5d99 (diff)
downloadandroid_packages_apps_Snap-c907c3215c63402348599e532e2ea74caa9b95fc.tar.gz
android_packages_apps_Snap-c907c3215c63402348599e532e2ea74caa9b95fc.tar.bz2
android_packages_apps_Snap-c907c3215c63402348599e532e2ea74caa9b95fc.zip
Make sure startAnimation won't be called after onPause.
Change-Id: I6c5238394b2ad64e22fbcb250ecd1534da7e8d03 fix: 5629252
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index ec7d16175..5d0fd15c7 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -17,8 +17,8 @@
package com.android.gallery3d.app;
import android.app.ActionBar;
-import android.app.Activity;
import android.app.ActionBar.OnMenuVisibilityListener;
+import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -30,8 +30,8 @@ import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
-import android.view.WindowManager;
import android.view.View.MeasureSpec;
+import android.view.WindowManager;
import android.widget.ShareActionProvider;
import android.widget.Toast;
@@ -344,6 +344,7 @@ public class PhotoPage extends ActivityState
}
}
+ @Override
public void onUserInteraction() {
showBars();
refreshHidingMessage();
@@ -359,15 +360,21 @@ public class PhotoPage extends ActivityState
}
}
+ @Override
public void onUserInteractionBegin() {
showBars();
mIsInteracting = true;
refreshHidingMessage();
}
+ @Override
public void onUserInteractionEnd() {
mIsInteracting = false;
- refreshHidingMessage();
+
+ // This function could be called from GL thread (in SlotView.render)
+ // and post to the main thread. So, it could be executed while the
+ // activity is paused.
+ if (mIsActive) refreshHidingMessage();
}
@Override