Handle clicks outside of the "checking..." dialog

* Clicking outside of the dialog actually "cancels" it
* Need to shut down the checker so it doesn't keep trying to
  update it or close it when done.

Bug: 3120019
Change-Id: I5faa3c78b64d2aafc472b03b8086695edaf0b3fd
This commit is contained in:
Andy Stadler 2010-11-05 15:54:28 -07:00
parent 4535237e3b
commit 992b7e7ed3

View File

@ -673,6 +673,18 @@ public class AccountCheckSettingsFragment extends Fragment {
return dialog;
}
/**
* Listen for cancellation, which can happen from places other than the
* negative button (e.g. touching outside the dialog), and stop the checker
*/
@Override
public void onCancel(DialogInterface dialog) {
AccountCheckSettingsFragment target =
(AccountCheckSettingsFragment) getTargetFragment();
target.onCheckingDialogCancel();
super.onCancel(dialog);
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);