diff options
author | Tyler Gunn <tgunn@google.com> | 2014-07-27 14:51:29 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2014-07-30 00:07:46 +0000 |
commit | 5d231e134353a7cb07ecc7d6dd1a4ffdcf194bca (patch) | |
tree | d6adbf581cdcd01887b554ab19e1555cfb473a5a /telecomm/java | |
parent | 8a850b4c0e0d4ceff4553dbb2490fe13f0e05f9d (diff) | |
download | frameworks_base-5d231e134353a7cb07ecc7d6dd1a4ffdcf194bca.zip frameworks_base-5d231e134353a7cb07ecc7d6dd1a4ffdcf194bca.tar.gz frameworks_base-5d231e134353a7cb07ecc7d6dd1a4ffdcf194bca.tar.bz2 |
Adding video width/height to camera capabilities.
Bug: 16602621
Bug: 16573836
Change-Id: Idaca4b6d889bf7910fcc37bee7ef478e2fbe3af3
Diffstat (limited to 'telecomm/java')
-rw-r--r-- | telecomm/java/android/telecomm/CallCameraCapabilities.java | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/telecomm/java/android/telecomm/CallCameraCapabilities.java b/telecomm/java/android/telecomm/CallCameraCapabilities.java index 87a411a..74904e3 100644 --- a/telecomm/java/android/telecomm/CallCameraCapabilities.java +++ b/telecomm/java/android/telecomm/CallCameraCapabilities.java @@ -36,14 +36,28 @@ public final class CallCameraCapabilities implements Parcelable { private final float mMaxZoom; /** + * The width of the camera video in pixels. + */ + private final int mWidth; + + /** + * The height of the camera video in pixels. + */ + private final int mHeight; + + /** * Create a call camera capabilities instance. * * @param zoomSupported True when camera supports zoom. * @param maxZoom Maximum zoom supported by camera. + * @param width The width of the camera video (in pixels). + * @param height The height of the camera video (in pixels). */ - public CallCameraCapabilities(boolean zoomSupported, float maxZoom) { + public CallCameraCapabilities(boolean zoomSupported, float maxZoom, int width, int height) { mZoomSupported = zoomSupported; mMaxZoom = maxZoom; + mWidth = width; + mHeight = height; } /** @@ -61,8 +75,10 @@ public final class CallCameraCapabilities implements Parcelable { public CallCameraCapabilities createFromParcel(Parcel source) { boolean supportsZoom = source.readByte() != 0; float maxZoom = source.readFloat(); + int width = source.readInt(); + int height = source.readInt(); - return new CallCameraCapabilities(supportsZoom, maxZoom); + return new CallCameraCapabilities(supportsZoom, maxZoom, width, height); } @Override @@ -94,7 +110,8 @@ public final class CallCameraCapabilities implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeByte((byte) (isZoomSupported() ? 1 : 0)); dest.writeFloat(getMaxZoom()); - + dest.writeInt(getWidth()); + dest.writeInt(getHeight()); } /** @@ -110,4 +127,18 @@ public final class CallCameraCapabilities implements Parcelable { public float getMaxZoom() { return mMaxZoom; } + + /** + * The width of the camera video in pixels. + */ + public int getWidth() { + return mWidth; + } + + /** + * The height of the camera video in pixels. + */ + public int getHeight() { + return mHeight; + } } |