break;
}
default:
- retval = onOptionsItemSelected(item);
+ retval = super.onOptionsItemSelected(item);
}
return retval;
}
protected Boolean doInBackground(Void... params) {
String[] checkedFilePaths = mFileListFragment.getCheckedFilePaths();
long total = 0;
- for (int i=0; i < checkedFilePaths.length ; i++) {
+ for (int i=0; checkedFilePaths != null && i < checkedFilePaths.length ; i++) {
String localPath = checkedFilePaths[i];
File localFile = new File(localPath);
total += localFile.length();
String[] args = {getString(R.string.app_name)};
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_query_move_foreign_files, args, R.string.common_yes, -1, R.string.common_no);
dialog.setOnConfirmationListener(UploadFilesActivity.this);
- mCurrentDialog = dialog;
- mCurrentDialog.show(getSupportFragmentManager(), QUERY_TO_MOVE_DIALOG_TAG);
+ dialog.show(getSupportFragmentManager(), QUERY_TO_MOVE_DIALOG_TAG);
}
}
}
setResult(RESULT_OK_AND_MOVE, data);
finish();
}
- //mCurrentDialog.dismiss();
- mCurrentDialog = null;
}
@Override
public void onNeutral(String callerTag) {
Log.d(TAG, "Phantom neutral button in dialog was clicked; dialog tag is " + callerTag);
- //mCurrentDialog.dismiss();
- mCurrentDialog = null;
}
public void onCancel(String callerTag) {
/// nothing to do; don't finish, let the user change the selection
Log.d(TAG, "Negative button in dialog was clicked; dialog tag is " + callerTag);
- //mCurrentDialog.dismiss();
- mCurrentDialog = null;
}