diff options
Diffstat (limited to 'core/java/android/hardware')
4 files changed, 36 insertions, 11 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index dc576a5..dd15d38 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -40,6 +40,7 @@ import android.util.Log; import android.text.TextUtils; import android.view.Surface; import android.view.SurfaceHolder; +import android.os.SystemProperties; import java.io.IOException; import java.lang.ref.WeakReference; @@ -483,8 +484,21 @@ public class Camera { mEventHandler = null; } - return native_setup(new WeakReference<Camera>(this), cameraId, halVersion, - ActivityThread.currentOpPackageName()); + String packageName = ActivityThread.currentOpPackageName(); + + //Force HAL1 if the package name falls in this bucket + String packageList = SystemProperties.get("camera.hal1.packagelist", ""); + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + halVersion = CAMERA_HAL_API_VERSION_1_0; + break; + } + } + } + return native_setup(new WeakReference<Camera>(this), cameraId, halVersion, packageName); } private int cameraInitNormal(int cameraId) { @@ -3471,8 +3485,8 @@ public class Camera { } /** - * Sets GPS processing method. It will store up to 32 characters - * in JPEG EXIF header. + * Sets GPS processing method. The method will be stored in a UTF-8 string up to 31 bytes + * long, in the JPEG EXIF header. * * @param processing_method The processing method to get this location. */ diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index a2ef078..7464211 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -398,17 +398,24 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * this camera device.</p> * <p>For devices at the LEGACY level or above:</p> * <ul> - * <li>This list will always include (30, 30).</li> - * <li>Also, for constant-framerate recording, for each normal + * <li> + * <p>For constant-framerate recording, for each normal + * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a * {@link android.media.CamcorderProfile CamcorderProfile} that has * {@link android.media.CamcorderProfile#quality quality} in * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW}, * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is * supported by the device and has * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will - * always include (<code>x</code>,<code>x</code>).</li> - * <li>For preview streaming use case, this list will always include (<code>min</code>, <code>max</code>) where - * <code>min</code> <= 15 and <code>max</code> >= 30.</li> + * always include (<code>x</code>,<code>x</code>).</p> + * </li> + * <li> + * <p>Also, a camera device must either not support any + * {@link android.media.CamcorderProfile CamcorderProfile}, + * or support at least one + * normal {@link android.media.CamcorderProfile CamcorderProfile} that has + * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> >= 24.</p> + * </li> * </ul> * <p>For devices at the LIMITED level or above:</p> * <ul> diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index 35a1d96..f61892e 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -472,13 +472,13 @@ public abstract class CameraMetadata<TKey> { * <li>The maximum available resolution for RAW_SENSOR streams * will match either the value in * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or - * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</li> + * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li> * <li>All DNG-related optional metadata entries are provided * by the camera device.</li> * </ul> * - * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE + * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES */ public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 3f566eb..67835a0 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -556,6 +556,10 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> * Set a capture request field to a value. The field definitions can be * found in {@link CaptureRequest}. * + * <p>Setting a field to {@code null} will remove that field from the capture request. + * Unless the field is optional, removing it will likely produce an error from the camera + * device when the request is submitted.</p> + * * @param key The metadata field to write. * @param value The value to set the field to, which must be of a matching * type to the key. |