Fix 6046544: Deleting a photo takes multiple steps and the flow is inconsistent with other deleting flows on other core apps
Per request, change the confirm dialog message to "Delete the selected item(s)?"
b: 6046544
Change-Id: I46f7fd42a9f9fbf2399aca78ed9b2e67a15acb65
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java
index 636da39..14bdc4d 100644
--- a/src/com/android/gallery3d/ui/MenuExecutor.java
+++ b/src/com/android/gallery3d/ui/MenuExecutor.java
@@ -232,14 +232,14 @@
startAction(action, title, listener);
}
- public void onMenuClicked(MenuItem menuItem, boolean needsConfirm,
+ public void onMenuClicked(MenuItem menuItem, String confirmMsg,
final ProgressListener listener) {
final int action = menuItem.getItemId();
- if (needsConfirm) {
+ if (confirmMsg != null) {
new AlertDialog.Builder(mActivity.getAndroidContext())
- .setMessage(R.string.confirm_action)
- .setPositiveButton(R.string.confirm, new OnClickListener() {
+ .setMessage(confirmMsg)
+ .setPositiveButton(R.string.ok, new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
onMenuClicked(action, listener);
}