diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 20:00:44 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 20:00:44 -0800 |
commit | d7e9d1916fbabaecd4be9dacb4472fa3ffe62ed4 (patch) | |
tree | d2fd6c50acb3ef868420f2671d48a472e16653cb /src | |
parent | 9c9be2eb4a86fc3468dbba1ec5f7bfdb37d22c74 (diff) | |
download | LegacyCamera-d7e9d1916fbabaecd4be9dacb4472fa3ffe62ed4.zip LegacyCamera-d7e9d1916fbabaecd4be9dacb4472fa3ffe62ed4.tar.gz LegacyCamera-d7e9d1916fbabaecd4be9dacb4472fa3ffe62ed4.tar.bz2 |
auto import from //depot/cupcake/@136745
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 8 | ||||
-rw-r--r-- | src/com/android/camera/ViewImage.java | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 9717d5e..56e048a 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -618,8 +618,14 @@ public class Camera extends Activity implements View.OnClickListener, String lonString = String.valueOf(lon); mParameters.set("gps-latitude", latString); mParameters.set("gps-longitude", lonString); - if (loc.hasAltitude()) + if (loc.hasAltitude()) { mParameters.set("gps-altitude", String.valueOf(loc.getAltitude())); + } else { + // for NETWORK_PROVIDER location provider, we may have + // no altitude information, but the driver needs it, so + // we fake one. + mParameters.set("gps-altitude", "0"); + } if (loc.getTime() != 0) { // Location.getTime() is UTC in milliseconds. // gps-timestamp is UTC in seconds. diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java index f6d0744..254cd60 100644 --- a/src/com/android/camera/ViewImage.java +++ b/src/com/android/camera/ViewImage.java @@ -932,12 +932,10 @@ public class ViewImage extends Activity implements View.OnClickListener long t1; if (Config.LOGV) t1 = System.currentTimeMillis(); - Bitmap b = null; - try { - b = mLoad.get(); - } catch (OutOfMemoryError e) { - Log.e(TAG, "couldn't load full size bitmap for " + ""); - } + // The return value could be null if the + // bitmap is too big, or we cancelled it. + Bitmap b = mLoad.get(); + if (Config.LOGV && b != null) { long t2 = System.currentTimeMillis(); Log.v(TAG, "loading full image for " + image.fullSizeImageUri() @@ -1552,10 +1550,6 @@ public class ViewImage extends Activity implements View.OnClickListener makeGetter(); } - for (ImageViewTouchBase iv: mImageViews) { - iv.setImageBitmap(null, true); - } - mFirst = true; mScroller.setLayoutCompletedCallback(new Runnable() { public void run() { |