summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2013-01-28 16:16:44 -0800
committerBobby Georgescu <georgescu@google.com>2013-01-28 16:16:44 -0800
commit248c7e912dbddaeeeec52e4602a319976d24dddb (patch)
tree58de16cd49bf60754645e9a1bd0337ced8524379 /src/com/android/gallery3d/app
parent07e9353082b6b0d41c8ec33efa9aa6e8c2633202 (diff)
downloadandroid_packages_apps_Snap-248c7e912dbddaeeeec52e4602a319976d24dddb.tar.gz
android_packages_apps_Snap-248c7e912dbddaeeeec52e4602a319976d24dddb.tar.bz2
android_packages_apps_Snap-248c7e912dbddaeeeec52e4602a319976d24dddb.zip
Fix ANRs due to waiting for IO on UI thread
Bug: 7998915 Change-Id: I938145a7072170f713099a04578f98951b35cbab
Diffstat (limited to 'src/com/android/gallery3d/app')
-rw-r--r--src/com/android/gallery3d/app/AbstractGalleryActivity.java4
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
index acfc033b7..c9cce811a 100644
--- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java
+++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
@@ -343,9 +343,7 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext
if (mBatchServiceIsBound && mBatchService != null) {
return mBatchService.getThreadPool();
} else {
- // Fall back on the old behavior if for some reason the
- // service is not available.
- return getThreadPool();
+ throw new RuntimeException("Batch service unavailable");
}
}
}
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index c110a8ccc..b3a6040de 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -1217,9 +1217,7 @@ public abstract class PhotoPage extends ActivityState implements
@Override
public void onCommitDeleteImage() {
if (mDeletePath == null) return;
- mSelectionManager.deSelectAll();
- mSelectionManager.toggle(mDeletePath);
- mMenuExecutor.onMenuClicked(R.id.action_delete, null, true, false);
+ mMenuExecutor.startSingleItemAction(R.id.action_delete, mDeletePath);
mDeletePath = null;
}