|
@@ -25,6 +25,7 @@ import android.accounts.Account;
|
|
import android.accounts.AccountManager;
|
|
import android.accounts.AccountManager;
|
|
import android.accounts.AuthenticatorException;
|
|
import android.accounts.AuthenticatorException;
|
|
import android.accounts.OperationCanceledException;
|
|
import android.accounts.OperationCanceledException;
|
|
|
|
+import android.annotation.SuppressLint;
|
|
import android.app.AlertDialog;
|
|
import android.app.AlertDialog;
|
|
import android.app.Dialog;
|
|
import android.app.Dialog;
|
|
import android.app.ProgressDialog;
|
|
import android.app.ProgressDialog;
|
|
@@ -598,8 +599,15 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
|
|
|
if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) {
|
|
if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) {
|
|
- requestSimpleUpload(data, resultCode);
|
|
|
|
-
|
|
|
|
|
|
+ if (data.getData() == null){
|
|
|
|
+ for( int i = 0; i < data.getClipData().getItemCount(); i++){
|
|
|
|
+ Intent intent = new Intent();
|
|
|
|
+ intent.setData(data.getClipData().getItemAt(i).getUri());
|
|
|
|
+ requestSimpleUpload(intent, resultCode);
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ requestSimpleUpload(data, resultCode);
|
|
|
|
+ }
|
|
} else if (requestCode == ACTION_SELECT_MULTIPLE_FILES && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) {
|
|
} else if (requestCode == ACTION_SELECT_MULTIPLE_FILES && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) {
|
|
requestMultipleUpload(data, resultCode);
|
|
requestMultipleUpload(data, resultCode);
|
|
|
|
|
|
@@ -838,6 +846,7 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
|
|
} else if (item == 1) {
|
|
} else if (item == 1) {
|
|
Intent action = new Intent(Intent.ACTION_GET_CONTENT);
|
|
Intent action = new Intent(Intent.ACTION_GET_CONTENT);
|
|
action = action.setType("*/*").addCategory(Intent.CATEGORY_OPENABLE);
|
|
action = action.setType("*/*").addCategory(Intent.CATEGORY_OPENABLE);
|
|
|
|
+ action.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
|
startActivityForResult(Intent.createChooser(action, getString(R.string.upload_chooser_title)),
|
|
startActivityForResult(Intent.createChooser(action, getString(R.string.upload_chooser_title)),
|
|
ACTION_SELECT_CONTENT_FROM_APPS);
|
|
ACTION_SELECT_CONTENT_FROM_APPS);
|
|
}
|
|
}
|