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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java

Issue 2784663002: Always initialize this year and month (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.autofill; 5 package org.chromium.chrome.browser.autofill;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.DialogInterface; 8 import android.content.DialogInterface;
9 import android.content.res.Resources; 9 import android.content.res.Resources;
10 import android.graphics.Color; 10 import android.graphics.Color;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 .setTitle(title) 191 .setTitle(title)
192 .setView(v) 192 .setView(v)
193 .setNegativeButton(R.string.cancel, null) 193 .setNegativeButton(R.string.cancel, null)
194 .setPositiveButton(confirmButtonLabel, null) 194 .setPositiveButton(confirmButtonLabel, null)
195 .create(); 195 .create();
196 mDialog.setOnDismissListener(this); 196 mDialog.setOnDismissListener(this);
197 197
198 mShouldRequestExpirationDate = shouldRequestExpirationDate; 198 mShouldRequestExpirationDate = shouldRequestExpirationDate;
199 mThisYear = -1; 199 mThisYear = -1;
200 mThisMonth = -1; 200 mThisMonth = -1;
201 if (mShouldRequestExpirationDate) new CalendarTask().execute(); 201 new CalendarTask().execute();
sebsg 2017/03/29 18:58:21 I would rather you do this logic in the onNewCardL
Shanfeng 2017/03/29 22:16:58 Actually prefer to keep it here after more thought
sebsg 2017/03/30 14:02:35 Right, when you send the onNewCardLinkClicked to t
Shanfeng 2017/03/30 20:06:04 Done.
202 202
203 // Create the listeners to be notified when the user focuses out the inp ut fields. 203 // Create the listeners to be notified when the user focuses out the inp ut fields.
204 mCardUnmaskInput.setOnFocusChangeListener(new OnFocusChangeListener() { 204 mCardUnmaskInput.setOnFocusChangeListener(new OnFocusChangeListener() {
205 @Override 205 @Override
206 public void onFocusChange(View v, boolean hasFocus) { 206 public void onFocusChange(View v, boolean hasFocus) {
207 mDidFocusOnCvc = true; 207 mDidFocusOnCvc = true;
208 validate(); 208 validate();
209 } 209 }
210 }); 210 });
211 mMonthInput.setOnFocusChangeListener(new OnFocusChangeListener() { 211 mMonthInput.setOnFocusChangeListener(new OnFocusChangeListener() {
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 @VisibleForTesting 763 @VisibleForTesting
764 public AlertDialog getDialogForTest() { 764 public AlertDialog getDialogForTest() {
765 return mDialog; 765 return mDialog;
766 } 766 }
767 767
768 @VisibleForTesting 768 @VisibleForTesting
769 public String getErrorMessage() { 769 public String getErrorMessage() {
770 return mErrorMessage.getText().toString(); 770 return mErrorMessage.getText().toString();
771 } 771 }
772 } 772 }
OLDNEW
« 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