summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2013-09-15 11:55:44 -0700
committerZhijun He <zhijunhe@google.com>2013-09-15 11:55:44 -0700
commit68ebc1a7b4c18d587612891250f17f36edfe1bc1 (patch)
treedd80ef61da6e54f7bca24954f96e32828ef1c951 /core/java/android/hardware
parent750ce3acf23e5c2e5b239154a2539391544f9463 (diff)
downloadframeworks_base-68ebc1a7b4c18d587612891250f17f36edfe1bc1.zip
frameworks_base-68ebc1a7b4c18d587612891250f17f36edfe1bc1.tar.gz
frameworks_base-68ebc1a7b4c18d587612891250f17f36edfe1bc1.tar.bz2
Camera2: Add MAX_CAMERAS_IN_USE error case handling
Throw CAE with reason MAX_CAMERAS_IN when the error code is EDQUOT. Bug: 10749544 Change-Id: I6820de8b95662a55bb37f099746ea2cbe5056f24
Diffstat (limited to 'core/java/android/hardware')
-rw-r--r--core/java/android/hardware/camera2/utils/CameraBinderDecorator.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java b/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
index 2c05c58..d0b3ec4 100644
--- a/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
+++ b/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
@@ -19,6 +19,7 @@ package android.hardware.camera2.utils;
import static android.hardware.camera2.CameraAccessException.CAMERA_DISABLED;
import static android.hardware.camera2.CameraAccessException.CAMERA_DISCONNECTED;
import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE;
+import static android.hardware.camera2.CameraAccessException.MAX_CAMERAS_IN_USE;
import static android.hardware.camera2.CameraAccessException.CAMERA_DEPRECATED_HAL;
import android.os.DeadObjectException;
@@ -50,6 +51,7 @@ public class CameraBinderDecorator {
public static final int EBUSY = -16;
public static final int ENODEV = -19;
public static final int EOPNOTSUPP = -95;
+ public static final int EDQUOT = -122;
private static class CameraBinderDecoratorListener implements Decorator.DecoratorListener {
@@ -83,6 +85,9 @@ public class CameraBinderDecorator {
case EBUSY:
UncheckedThrow.throwAnyException(new CameraRuntimeException(
CAMERA_IN_USE));
+ case EDQUOT:
+ UncheckedThrow.throwAnyException(new CameraRuntimeException(
+ MAX_CAMERAS_IN_USE));
case ENODEV:
UncheckedThrow.throwAnyException(new CameraRuntimeException(
CAMERA_DISCONNECTED));