Fix crash when select all is pressed.
bug:6411186
Change-Id: Iaa71a320bc4d6d70aade41d5144f75ba6db36e6d
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java
index a0f3449..a052c50 100644
--- a/src/com/android/gallery3d/ui/MenuExecutor.java
+++ b/src/com/android/gallery3d/ui/MenuExecutor.java
@@ -185,12 +185,14 @@
} else {
mSelectionManager.selectAll();
}
+ return;
case R.id.action_crop: {
Path path = getSingleSelectedPath();
String mimeType = getMimeType(manager.getMediaType(path));
Intent intent = new Intent(CropImage.ACTION_CROP)
.setDataAndType(manager.getContentUri(path), mimeType);
((Activity) mActivity).startActivity(intent);
+ return;
}
case R.id.action_setas: {
Path path = getSingleSelectedPath();
@@ -203,6 +205,7 @@
Activity activity = (Activity) mActivity;
activity.startActivity(Intent.createChooser(
intent, activity.getString(R.string.set_as)));
+ return;
}
case R.id.action_delete:
title = R.string.delete;
@@ -368,4 +371,3 @@
}
}
}
-