Skip to content

Commit

Permalink
minor update to location intake
Browse files Browse the repository at this point in the history
  • Loading branch information
harlo authored and harlo committed Oct 8, 2013
1 parent 81a523e commit a83449c
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions src/org/witness/informacam/models/j3m/IDCIMDescriptor.java
Expand Up @@ -77,32 +77,30 @@ public void addEntry(Uri authority, boolean isThumbnail) {
String pattern = "^([a-zA-Z0-9]+)([a-zA-Z0-9_]*)\\.(jpg|mp4){1}$";

entry.id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaColumns._ID));
entry.exif = new IExif();

new Thread(new Runnable() {
@Override
public void run() {
do {
entry.exif.location = informaCam.informaService.getCurrentLocation().geoCoordinates;
Log.d(LOG, "exif location: " + entry.exif.location[0] + ", " + entry.exif.location[1]);
} while(Arrays.equals(entry.exif.location, new float[] {0.0f, 0.0f}) && (informaCam.informaService != null && informaCam.informaService._geo != null));
}
}).start();
cursor.close();

if(!isThumbnail) {
IDCIMEntry clone = new IDCIMEntry(entry);

if(!shortDescription.contains(clone)) {
shortDescription.add(clone);
}
}

intakeList.add(entry);

cursor.close();

entry.exif = new IExif();
synchronized(entry) {
new Thread(new Runnable() {
@Override
public void run() {
do {
entry.exif.location = informaCam.informaService.getCurrentLocation().geoCoordinates;
Log.d(LOG, "exif location: " + entry.exif.location[0] + ", " + entry.exif.location[1]);
} while(Arrays.equals(entry.exif.location, new float[] {0.0f, 0.0f}) && (informaCam.informaService != null && informaCam.informaService._geo != null));
}
}).start();

intakeList.add(entry);
}
}


}

public void startSession() {
Expand Down

0 comments on commit a83449c

Please sign in to comment.