X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/8361540852ec87b51c85937e0f326a83e19cd8ad..2a42651463f9d82509a75b92a49884bdd7880ba1:/src/com/owncloud/android/ui/activity/UploadFilesActivity.java diff --git a/src/com/owncloud/android/ui/activity/UploadFilesActivity.java b/src/com/owncloud/android/ui/activity/UploadFilesActivity.java index 516781c1..d16b2637 100644 --- a/src/com/owncloud/android/ui/activity/UploadFilesActivity.java +++ b/src/com/owncloud/android/ui/activity/UploadFilesActivity.java @@ -1,9 +1,9 @@ /* ownCloud Android client application - * Copyright (C) 2011 Bartek Przybylski + * Copyright (C) 2012-2013 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -140,7 +140,7 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements break; } default: - retval = onOptionsItemSelected(item); + retval = super.onOptionsItemSelected(item); } return retval; } @@ -314,7 +314,7 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements 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(); @@ -347,8 +347,7 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements 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); } } } @@ -363,16 +362,12 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements 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; } @@ -380,8 +375,6 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements 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; }