FileDocCategorySizeDatePackage
CameraCapabilities.javaAPI DocAndroid 5.1 API4239Thu Mar 12 22:22:42 GMT 2015android.telecom

CameraCapabilities

public final class CameraCapabilities extends Object implements android.os.Parcelable
Represents the camera capabilities important to a Video Telephony provider.
hide

Fields Summary
private final boolean
mZoomSupported
Whether the camera supports zoom.
private final float
mMaxZoom
The maximum zoom supported by the camera.
private final int
mWidth
The width of the camera video in pixels.
private final int
mHeight
The height of the camera video in pixels.
public static final Parcelable.Creator
CREATOR
Responsible for creating CallCameraCapabilities objects from deserialized Parcels.
Constructors Summary
public CameraCapabilities(boolean zoomSupported, float maxZoom, int width, int height)
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).

        mZoomSupported = zoomSupported;
        mMaxZoom = maxZoom;
        mWidth = width;
        mHeight = height;
    
Methods Summary
public intdescribeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.

return
a bitmask indicating the set of special object types marshalled by the Parcelable.


                                   
    
       
        return 0;
    
public intgetHeight()
The height of the camera video in pixels.

        return mHeight;
    
public floatgetMaxZoom()
The maximum zoom supported by the camera.

        return mMaxZoom;
    
public intgetWidth()
The width of the camera video in pixels.

        return mWidth;
    
public booleanisZoomSupported()
Whether the camera supports zoom.

        return mZoomSupported;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Flatten this object in to a Parcel.

param
dest The Parcel in which the object should be written.
param
flags Additional flags about how the object should be written. May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.

        dest.writeByte((byte) (isZoomSupported() ? 1 : 0));
        dest.writeFloat(getMaxZoom());
        dest.writeInt(getWidth());
        dest.writeInt(getHeight());