Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerCategoryView.java

Issue 2908163002: Photo Picker Dialog: Make sure Back button fires the Cancel action. (Closed)
Patch Set: Sync to latest Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerCategoryView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerCategoryView.java b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerCategoryView.java
index 3f7a03c3e54a5769c81591268f8fa3d1851c42b7..24bdc226e65f2ba107dbd0408fd2e8f48bb92f06 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerCategoryView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerCategoryView.java
@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.photo_picker;
import android.app.Activity;
import android.content.Context;
+import android.content.DialogInterface;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Rect;
@@ -190,6 +191,13 @@ public class PickerCategoryView extends RelativeLayout
mDialog = dialog;
mMultiSelectionAllowed = multiSelectionAllowed;
mListener = listener;
+
+ mDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ mListener.onPickerUserAction(PhotoPickerListener.Action.CANCEL, null);
+ }
+ });
}
// FileEnumWorkerTask.FilesEnumeratedCallback:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698