mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fixed bug causing wrong time to show
TYPE SAFETY FOR THE FUCKING WIN FUCK YEAH
This commit is contained in:
parent
efecef0a6c
commit
634f236f19
1 changed files with 2 additions and 1 deletions
|
|
@ -118,11 +118,12 @@ public class UploadService extends IntentService {
|
||||||
try {
|
try {
|
||||||
file = this.getContentResolver().openInputStream(mediaUri);
|
file = this.getContentResolver().openInputStream(mediaUri);
|
||||||
length = this.getContentResolver().openAssetFileDescriptor(mediaUri, "r").getLength();
|
length = this.getContentResolver().openAssetFileDescriptor(mediaUri, "r").getLength();
|
||||||
|
|
||||||
Cursor cursor = this.getContentResolver().query(mediaUri,
|
Cursor cursor = this.getContentResolver().query(mediaUri,
|
||||||
new String[] { MediaStore.Images.ImageColumns.DATE_TAKEN }, null, null, null);
|
new String[] { MediaStore.Images.ImageColumns.DATE_TAKEN }, null, null, null);
|
||||||
if(cursor.getCount() != 0) {
|
if(cursor.getCount() != 0) {
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
dateCreated = new Date(cursor.getInt(0));
|
dateCreated = new Date(cursor.getLong(0));
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue