| OLD | NEW |
| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 setInitialFocus(); | 280 setInitialFocus(); |
| 281 } | 281 } |
| 282 }); | 282 }); |
| 283 } | 283 } |
| 284 | 284 |
| 285 public void update(String title, String instructions, boolean shouldRequestE
xpirationDate) { | 285 public void update(String title, String instructions, boolean shouldRequestE
xpirationDate) { |
| 286 assert mDialog.isShowing(); | 286 assert mDialog.isShowing(); |
| 287 mDialog.setTitle(title); | 287 mDialog.setTitle(title); |
| 288 mInstructions.setText(instructions); | 288 mInstructions.setText(instructions); |
| 289 mShouldRequestExpirationDate = shouldRequestExpirationDate; | 289 mShouldRequestExpirationDate = shouldRequestExpirationDate; |
| 290 if (mShouldRequestExpirationDate && (mThisYear == -1 || mThisMonth == -1
)) { |
| 291 new CalendarTask().execute(); |
| 292 } |
| 290 showExpirationDateInputsInputs(); | 293 showExpirationDateInputsInputs(); |
| 291 } | 294 } |
| 292 | 295 |
| 293 public void dismiss() { | 296 public void dismiss() { |
| 294 mDialog.dismiss(); | 297 mDialog.dismiss(); |
| 295 } | 298 } |
| 296 | 299 |
| 297 public void disableAndWaitForVerification() { | 300 public void disableAndWaitForVerification() { |
| 298 setInputsEnabled(false); | 301 setInputsEnabled(false); |
| 299 setOverlayVisibility(View.VISIBLE); | 302 setOverlayVisibility(View.VISIBLE); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 @VisibleForTesting | 766 @VisibleForTesting |
| 764 public AlertDialog getDialogForTest() { | 767 public AlertDialog getDialogForTest() { |
| 765 return mDialog; | 768 return mDialog; |
| 766 } | 769 } |
| 767 | 770 |
| 768 @VisibleForTesting | 771 @VisibleForTesting |
| 769 public String getErrorMessage() { | 772 public String getErrorMessage() { |
| 770 return mErrorMessage.getText().toString(); | 773 return mErrorMessage.getText().toString(); |
| 771 } | 774 } |
| 772 } | 775 } |
| OLD | NEW |