Commit b471996d authored by Jordan Oroshiba's avatar Jordan Oroshiba Committed by Commit Bot

Cookie delete dialog opens when clicking on trash can ImageView.

Fixes unintended behavior of clicking on ImageView not opening the dialog. The intended behavior is for a click anywhere in the preference row to open the dialog, for local consistency in preference behavior.

Bug: 1141799
Change-Id: I23b35c492819bec28f690f9f87d7ec4fddf68f7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495321
Commit-Queue: Jordan Oroshiba <oroshiba@google.com>
Reviewed-by: default avatarChristian Dullweber <dullweber@chromium.org>
Auto-Submit: Jordan Oroshiba <oroshiba@google.com>
Cr-Commit-Position: refs/heads/master@{#820275}
parent f17d0f99
...@@ -69,6 +69,8 @@ public class PageInfoCookiesPreference extends PreferenceFragmentCompat { ...@@ -69,6 +69,8 @@ public class PageInfoCookiesPreference extends PreferenceFragmentCompat {
mCookieInUse.setImageView( mCookieInUse.setImageView(
R.drawable.ic_delete_white_24dp, R.string.page_info_cookies_clear, null); R.drawable.ic_delete_white_24dp, R.string.page_info_cookies_clear, null);
mCookieInUse.setImageColor(R.color.default_icon_color_blue); mCookieInUse.setImageColor(R.color.default_icon_color_blue);
// Disabling enables passthrough of clicks to the main preference.
mCookieInUse.setImageViewEnabled(false);
mCookieInUse.setOnPreferenceClickListener(preference -> { mCookieInUse.setOnPreferenceClickListener(preference -> {
showClearCookiesConfirmation(); showClearCookiesConfirmation();
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment