diff options
author | Wu-cheng Li <wuchengli@google.com> | 2010-12-10 16:16:39 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2010-12-10 16:16:39 +0800 |
commit | 10fb15e4b1a8cd4acae1a745ada98cf9fac5a809 (patch) | |
tree | 50fae0d6554ea1492ae2b4d4cb30ac15c470f29b /src | |
parent | ac058a1c9895c2a47e94fd7e8c0b43a51dfd0e2c (diff) | |
download | LegacyCamera-10fb15e4b1a8cd4acae1a745ada98cf9fac5a809.zip LegacyCamera-10fb15e4b1a8cd4acae1a745ada98cf9fac5a809.tar.gz LegacyCamera-10fb15e4b1a8cd4acae1a745ada98cf9fac5a809.tar.bz2 |
Add dumpParameters for debugging when necessary.
Change-Id: Ie21b93ddb02647df512ee0088e77c522902028f3
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Util.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java index ac99956..4f58dfa 100644 --- a/src/com/android/camera/Util.java +++ b/src/com/android/camera/Util.java @@ -25,6 +25,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.hardware.Camera; +import android.hardware.Camera.Parameters; import android.hardware.Camera.Size; import android.util.Log; import android.view.Display; @@ -35,6 +36,7 @@ import android.view.animation.TranslateAnimation; import java.io.Closeable; import java.util.List; +import java.util.StringTokenizer; /** * Collection of utility functions used in this package. @@ -375,4 +377,13 @@ public class Util { } return optimalSize; } + + public static void dumpParameters(Parameters parameters) { + String flattened = parameters.flatten(); + StringTokenizer tokenizer = new StringTokenizer(flattened, ";"); + Log.d(TAG, "Dump all camera parameters:"); + while (tokenizer.hasMoreElements()) { + Log.d(TAG, tokenizer.nextToken()); + } + } } |