diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-11-22 18:21:18 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-11-22 18:21:18 +0800 |
commit | 1c04a33c040dfb610952d62da9c93a53c291b2d7 (patch) | |
tree | 3c6185eee8ecde4ac3e8eebb33a13a58fdd6a843 /core | |
parent | 4e2ecdd8a78f25f4c234877d5321ebd4e4c0e8f7 (diff) | |
download | frameworks_base-1c04a33c040dfb610952d62da9c93a53c291b2d7.zip frameworks_base-1c04a33c040dfb610952d62da9c93a53c291b2d7.tar.gz frameworks_base-1c04a33c040dfb610952d62da9c93a53c291b2d7.tar.bz2 |
Add a method to get empty camera parameters.
bug:5656411
Change-Id: I96e1f74c95a7b40bfbf68bdc93d14dad6fd63426
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/hardware/Camera.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 7ca6155..a04a820 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -302,6 +302,12 @@ public class Camera { native_setup(new WeakReference<Camera>(this), cameraId); } + /** + * An empty Camera for testing purpose. + */ + Camera() { + } + protected void finalize() { release(); } @@ -1310,6 +1316,18 @@ public class Camera { } /** + * Returns an empty {@link Parameters} for testing purpose. + * + * @return an Parameter object. + * + * @hide + */ + public static Parameters getEmptyParameters() { + Camera camera = new Camera(); + return camera.new Parameters(); + } + + /** * Image size (width and height dimensions). */ public class Size { |