Refresh authorization token on failed synchronizations when notification error is...
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / UploadFilesActivity.java
index 516781c..f2c36af 100644 (file)
@@ -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();
@@ -363,7 +363,7 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements
             setResult(RESULT_OK_AND_MOVE, data);
             finish();
         }
-        //mCurrentDialog.dismiss();
+        mCurrentDialog.dismiss();
         mCurrentDialog = null;
     }
 
@@ -371,7 +371,7 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements
     @Override
     public void onNeutral(String callerTag) {
         Log.d(TAG, "Phantom neutral button in dialog was clicked; dialog tag is " + callerTag);
-        //mCurrentDialog.dismiss();
+        mCurrentDialog.dismiss();
         mCurrentDialog = null;
     }
 
@@ -380,7 +380,7 @@ 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.dismiss();
         mCurrentDialog = null;
     }