I have this code for showing a dialog with an account picker. This dialog is reached by clicking a button 'authenticate' in another AlertDialog DoLoginDialog
.
accountPicker = new AlertDialog.Builder(this)
.setTitle(getString(R.string.common_select_an_account))
.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, name),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which < availableAccounts.length) {
final Account chosenAccount = availableAccounts[which];
authenticator.verifyAccount(chosenAccount, MainActivity.this);
} else {
authenticator.addNewAccount(MainActivity.this);
}
}}).create();
accountPicker.setCancelable(true);
accountPicker.setCanceledOnTouchOutside(true);
accountPicker.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
if(DEBUG) Log.d(TAG, "OnCancel - AccountPickerDialog");
showDoLoginDialog();
}});
accountPicker.show();
Basically, if the user cancel the AlertDialog accountPicker
I show again the AlertDialog doLoginDialog
.
When I cancel the AlertDialog accountPicker
I see these messages in the (unfiltered) log:
Attempted to finish an input event but the input event receiver
has already been disposed.
It does not cause any problem to the application, but I would like to understand what is happening. I have searched, but could only find more complex situations. This is very basic so I hope to find someone who will help me to understand what is happening here.