Loading core/java/android/hardware/camera2/CameraManager.java +0 −54 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import android.content.Context; import android.content.pm.PackageManager; import android.graphics.Point; import android.hardware.CameraExtensionSessionStats; import android.hardware.CameraIdRemapping; import android.hardware.CameraStatus; import android.hardware.ICameraService; import android.hardware.ICameraServiceListener; Loading Loading @@ -1995,17 +1994,6 @@ public final class CameraManager { } } /** * Remaps Camera Ids in the CameraService. * * @hide */ @RequiresPermission(android.Manifest.permission.CAMERA_INJECT_EXTERNAL_CAMERA) public void remapCameraIds(@NonNull CameraIdRemapping cameraIdRemapping) throws CameraAccessException, SecurityException, IllegalArgumentException { CameraManagerGlobal.get().remapCameraIds(cameraIdRemapping); } /** * Injects session params into existing clients in the CameraService. * Loading Loading @@ -2117,13 +2105,6 @@ public final class CameraManager { private final Object mLock = new Object(); /** * The active CameraIdRemapping. This will be used to refresh the cameraIdRemapping state * in the CameraService every time we connect to it, including when the CameraService * Binder dies and we reconnect to it. */ @Nullable private CameraIdRemapping mActiveCameraIdRemapping; // Access only through getCameraService to deal with binder death private ICameraService mCameraService; private boolean mHasOpenCloseListenerPermission = false; Loading Loading @@ -2275,41 +2256,6 @@ public final class CameraManager { } catch (RemoteException e) { // Camera service died in all probability } if (mActiveCameraIdRemapping != null) { try { cameraService.remapCameraIds(mActiveCameraIdRemapping); } catch (ServiceSpecificException e) { // Unexpected failure, ignore and continue. Log.e(TAG, "Unable to remap camera Ids in the camera service"); } catch (RemoteException e) { // Camera service died in all probability } } } /** Updates the cameraIdRemapping state in the CameraService. */ public void remapCameraIds(@NonNull CameraIdRemapping cameraIdRemapping) throws CameraAccessException, SecurityException { synchronized (mLock) { ICameraService cameraService = getCameraService(); if (cameraService == null) { throw new CameraAccessException( CameraAccessException.CAMERA_DISCONNECTED, "Camera service is currently unavailable."); } try { cameraService.remapCameraIds(cameraIdRemapping); mActiveCameraIdRemapping = cameraIdRemapping; } catch (ServiceSpecificException e) { throw ExceptionUtils.throwAsPublicException(e); } catch (RemoteException e) { throw new CameraAccessException( CameraAccessException.CAMERA_DISCONNECTED, "Camera service is currently unavailable."); } } } /** Injects session params into an existing client for cameraid. */ Loading Loading
core/java/android/hardware/camera2/CameraManager.java +0 −54 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import android.content.Context; import android.content.pm.PackageManager; import android.graphics.Point; import android.hardware.CameraExtensionSessionStats; import android.hardware.CameraIdRemapping; import android.hardware.CameraStatus; import android.hardware.ICameraService; import android.hardware.ICameraServiceListener; Loading Loading @@ -1995,17 +1994,6 @@ public final class CameraManager { } } /** * Remaps Camera Ids in the CameraService. * * @hide */ @RequiresPermission(android.Manifest.permission.CAMERA_INJECT_EXTERNAL_CAMERA) public void remapCameraIds(@NonNull CameraIdRemapping cameraIdRemapping) throws CameraAccessException, SecurityException, IllegalArgumentException { CameraManagerGlobal.get().remapCameraIds(cameraIdRemapping); } /** * Injects session params into existing clients in the CameraService. * Loading Loading @@ -2117,13 +2105,6 @@ public final class CameraManager { private final Object mLock = new Object(); /** * The active CameraIdRemapping. This will be used to refresh the cameraIdRemapping state * in the CameraService every time we connect to it, including when the CameraService * Binder dies and we reconnect to it. */ @Nullable private CameraIdRemapping mActiveCameraIdRemapping; // Access only through getCameraService to deal with binder death private ICameraService mCameraService; private boolean mHasOpenCloseListenerPermission = false; Loading Loading @@ -2275,41 +2256,6 @@ public final class CameraManager { } catch (RemoteException e) { // Camera service died in all probability } if (mActiveCameraIdRemapping != null) { try { cameraService.remapCameraIds(mActiveCameraIdRemapping); } catch (ServiceSpecificException e) { // Unexpected failure, ignore and continue. Log.e(TAG, "Unable to remap camera Ids in the camera service"); } catch (RemoteException e) { // Camera service died in all probability } } } /** Updates the cameraIdRemapping state in the CameraService. */ public void remapCameraIds(@NonNull CameraIdRemapping cameraIdRemapping) throws CameraAccessException, SecurityException { synchronized (mLock) { ICameraService cameraService = getCameraService(); if (cameraService == null) { throw new CameraAccessException( CameraAccessException.CAMERA_DISCONNECTED, "Camera service is currently unavailable."); } try { cameraService.remapCameraIds(cameraIdRemapping); mActiveCameraIdRemapping = cameraIdRemapping; } catch (ServiceSpecificException e) { throw ExceptionUtils.throwAsPublicException(e); } catch (RemoteException e) { throw new CameraAccessException( CameraAccessException.CAMERA_DISCONNECTED, "Camera service is currently unavailable."); } } } /** Injects session params into an existing client for cameraid. */ Loading