Here you can find the source of sizeSupported(Camera.Parameters cp, CamcorderProfile profile)
public static boolean sizeSupported(Camera.Parameters cp, CamcorderProfile profile)
//package com.java2s; import android.hardware.Camera; import android.media.CamcorderProfile; import java.util.List; public class Main { public static boolean sizeSupported(Camera.Parameters cp, CamcorderProfile profile) {/*from www. j a v a 2s . c o m*/ List<Camera.Size> sl = cp.getSupportedVideoSizes(); if (sl == null) sl = cp.getSupportedPictureSizes(); for (Camera.Size s : sl) { if (profile.videoFrameWidth == s.width && profile.videoFrameHeight == s.height) return true; } return false; } }