am ce491ee1: am 76233f06: Merge "Camera2: Legacy: Do not remap EACCES error code to PERMISSION_DENIED" into mnc-dev
* commit 'ce491ee170e889aeb0b3c0342b86a9c586afd62c': Camera2: Legacy: Do not remap EACCES error code to PERMISSION_DENIED
This commit is contained in:
@@ -88,15 +88,6 @@ public class CameraDeviceUserShim implements ICameraDeviceUser {
|
|||||||
mSurfaceIdCounter = 0;
|
mSurfaceIdCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int translateErrorsFromCamera1(int errorCode) {
|
|
||||||
switch (errorCode) {
|
|
||||||
case CameraBinderDecorator.EACCES:
|
|
||||||
return CameraBinderDecorator.PERMISSION_DENIED;
|
|
||||||
default:
|
|
||||||
return errorCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a separate looper/thread for the camera to run on; open the camera.
|
* Create a separate looper/thread for the camera to run on; open the camera.
|
||||||
*
|
*
|
||||||
@@ -140,7 +131,7 @@ public class CameraDeviceUserShim implements ICameraDeviceUser {
|
|||||||
// Save the looper so that we can terminate this thread
|
// Save the looper so that we can terminate this thread
|
||||||
// after we are done with it.
|
// after we are done with it.
|
||||||
mLooper = Looper.myLooper();
|
mLooper = Looper.myLooper();
|
||||||
mInitErrors = translateErrorsFromCamera1(mCamera.cameraInitUnspecified(mCameraId));
|
mInitErrors = mCamera.cameraInitUnspecified(mCameraId);
|
||||||
mStartDone.open();
|
mStartDone.open();
|
||||||
Looper.loop(); // Blocks forever until #close is called.
|
Looper.loop(); // Blocks forever until #close is called.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user