|
@ -4,7 +4,6 @@ import android.app.Activity; |
|
|
import android.content.Context; |
|
|
import android.content.Context; |
|
|
import android.content.Intent; |
|
|
import android.content.Intent; |
|
|
import android.content.SharedPreferences; |
|
|
import android.content.SharedPreferences; |
|
|
import android.content.pm.ResolveInfo; |
|
|
|
|
|
import android.graphics.Bitmap; |
|
|
import android.graphics.Bitmap; |
|
|
import android.graphics.drawable.Drawable; |
|
|
import android.graphics.drawable.Drawable; |
|
|
import android.net.Uri; |
|
|
import android.net.Uri; |
|
@ -244,6 +243,7 @@ public class UploadActivity extends BaseActivity { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (categorySelected.equals("-1") || uploadTitleText.equals("") || fileUri == null) { |
|
|
if (categorySelected.equals("-1") || uploadTitleText.equals("") || fileUri == null) { |
|
|
|
|
|
progressBar.setVisibility(View.GONE); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -258,6 +258,8 @@ public class UploadActivity extends BaseActivity { |
|
|
tempFilePath = UploadsHelper.createTempFile(this, fileUri, uploadFilename); |
|
|
tempFilePath = UploadsHelper.createTempFile(this, fileUri, uploadFilename); |
|
|
if (tempFilePath == null) { |
|
|
if (tempFilePath == null) { |
|
|
//Something went wrong, abort
|
|
|
//Something went wrong, abort
|
|
|
|
|
|
Toast.makeText(this, "Could not create temporary file for renaming", Toast.LENGTH_SHORT).show(); |
|
|
|
|
|
progressBar.setVisibility(View.GONE); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -305,6 +307,7 @@ public class UploadActivity extends BaseActivity { |
|
|
.startUpload(); |
|
|
.startUpload(); |
|
|
} catch (Exception exception) { |
|
|
} catch (Exception exception) { |
|
|
Timber.e(exception, "AndroidUploadService: %s", exception.getMessage()); |
|
|
Timber.e(exception, "AndroidUploadService: %s", exception.getMessage()); |
|
|
|
|
|
progressBar.setVisibility(View.GONE); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|