Loading AndroidManifest.xml +0 −2 Original line number Diff line number Diff line Loading @@ -199,8 +199,6 @@ android:hardwareAccelerated="true"> <intent-filter> <action android:name="android.intent.action.EDIT" /> <data android:scheme="content" /> <data android:host="media" /> <data android:mimeType="image/*" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> Loading src/com/android/gallery3d/photoeditor/BitmapUtils.java +4 −1 Original line number Diff line number Diff line Loading @@ -126,11 +126,14 @@ public class BitmapUtils { private int getOrientation(Uri uri) { int orientation = 0; Cursor cursor = context.getContentResolver().query(uri, IMAGE_PROJECTION, null, null, null); Cursor cursor = null; try { cursor = context.getContentResolver().query(uri, IMAGE_PROJECTION, null, null, null); if ((cursor != null) && cursor.moveToNext()) { orientation = cursor.getInt(INDEX_ORIENTATION); } } catch (Exception e) { // Ignore error for no orientation column; just use the default orientation value 0. } finally { if (cursor != null) { cursor.close(); Loading src/com/android/gallery3d/photoeditor/SaveCopyTask.java +4 −2 Original line number Diff line number Diff line Loading @@ -118,14 +118,16 @@ public class SaveCopyTask extends AsyncTask<Bitmap, Void, Uri> { double longitude = 0f; ContentResolver contentResolver = context.getContentResolver(); Cursor cursor = contentResolver.query( sourceUri, IMAGE_PROJECTION, null, null, null); Cursor cursor = null; try { cursor = contentResolver.query(sourceUri, IMAGE_PROJECTION, null, null, null); if ((cursor != null) && cursor.moveToNext()) { dateTaken = cursor.getLong(INDEX_DATE_TAKEN); latitude = cursor.getDouble(INDEX_LATITUDE); longitude = cursor.getDouble(INDEX_LONGITUDE); } } catch (Exception e) { // Ignore error for lacking property columns from the source. } finally { if (cursor != null) { cursor.close(); Loading Loading
AndroidManifest.xml +0 −2 Original line number Diff line number Diff line Loading @@ -199,8 +199,6 @@ android:hardwareAccelerated="true"> <intent-filter> <action android:name="android.intent.action.EDIT" /> <data android:scheme="content" /> <data android:host="media" /> <data android:mimeType="image/*" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> Loading
src/com/android/gallery3d/photoeditor/BitmapUtils.java +4 −1 Original line number Diff line number Diff line Loading @@ -126,11 +126,14 @@ public class BitmapUtils { private int getOrientation(Uri uri) { int orientation = 0; Cursor cursor = context.getContentResolver().query(uri, IMAGE_PROJECTION, null, null, null); Cursor cursor = null; try { cursor = context.getContentResolver().query(uri, IMAGE_PROJECTION, null, null, null); if ((cursor != null) && cursor.moveToNext()) { orientation = cursor.getInt(INDEX_ORIENTATION); } } catch (Exception e) { // Ignore error for no orientation column; just use the default orientation value 0. } finally { if (cursor != null) { cursor.close(); Loading
src/com/android/gallery3d/photoeditor/SaveCopyTask.java +4 −2 Original line number Diff line number Diff line Loading @@ -118,14 +118,16 @@ public class SaveCopyTask extends AsyncTask<Bitmap, Void, Uri> { double longitude = 0f; ContentResolver contentResolver = context.getContentResolver(); Cursor cursor = contentResolver.query( sourceUri, IMAGE_PROJECTION, null, null, null); Cursor cursor = null; try { cursor = contentResolver.query(sourceUri, IMAGE_PROJECTION, null, null, null); if ((cursor != null) && cursor.moveToNext()) { dateTaken = cursor.getLong(INDEX_DATE_TAKEN); latitude = cursor.getDouble(INDEX_LATITUDE); longitude = cursor.getDouble(INDEX_LONGITUDE); } } catch (Exception e) { // Ignore error for lacking property columns from the source. } finally { if (cursor != null) { cursor.close(); Loading