diff options
| author | Marc Blank <mblank@google.com> | 2012-08-21 09:38:39 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-21 09:38:39 -0700 |
| commit | 6f05a046f0b916c211334624cf67a848365a2d82 (patch) | |
| tree | 31ddea7ddf3e4c0772222f1cf31518553e322d44 | |
| parent | 88d8382e69188430ddf872c38e39aefc59647d19 (diff) | |
| parent | ef1e8ba35aaf56d81e25bf8042f4a332e34ef1f2 (diff) | |
| download | android_frameworks_ex-6f05a046f0b916c211334624cf67a848365a2d82.tar.gz android_frameworks_ex-6f05a046f0b916c211334624cf67a848365a2d82.tar.bz2 android_frameworks_ex-6f05a046f0b916c211334624cf67a848365a2d82.zip | |
am ef1e8ba3: am 501d1bf0: am 3b321528: Abort posted runnable if cursor is no longer open
* commit 'ef1e8ba35aaf56d81e25bf8042f4a332e34ef1f2':
Abort posted runnable if cursor is no longer open
| -rw-r--r-- | photoviewer/src/com/android/ex/photo/PhotoViewActivity.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java index 927b0e4..2e54569 100644 --- a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java +++ b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java @@ -303,6 +303,10 @@ public class PhotoViewActivity extends Activity implements new Handler().post(new Runnable() { @Override public void run() { + // If the cursor is closed, we can leave, as another runnable will have + // been posted (this means our Cursor is already out-of-date) + if (data.isClosed()) return; + // We're paused; don't do anything now, we'll get re-invoked // when the activity becomes active again if (mIsPaused) { |
