When lock device screen and quickly unlock again got this error:
08-07 18:45:29.315 28813-28813/com.arkadygamza.playwithcamera2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.arkadygamza.playwithcamera2, PID: 28813 java.lang.SecurityException: Lacking privileges to access camera service at android.hardware.camera2.utils.CameraBinderDecorator.throwOnError(CameraBinderDecorator.java:108) at android.hardware.camera2.utils.CameraBinderDecorator$CameraBinderDecoratorListener.onAfterInvocation(CameraBinderDecorator.java:73) at android.hardware.camera2.utils.Decorator.invoke(Decorator.java:81) at java.lang.reflect.Proxy.invoke(Proxy.java:393) at $Proxy1.cancelRequest(Unknown Source) at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:926) at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:378) at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:514) at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:228) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
When lock device screen and quickly unlock again got this error:
08-07 18:45:29.315 28813-28813/com.arkadygamza.playwithcamera2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.arkadygamza.playwithcamera2, PID: 28813 java.lang.SecurityException: Lacking privileges to access camera service at android.hardware.camera2.utils.CameraBinderDecorator.throwOnError(CameraBinderDecorator.java:108) at android.hardware.camera2.utils.CameraBinderDecorator$CameraBinderDecoratorListener.onAfterInvocation(CameraBinderDecorator.java:73) at android.hardware.camera2.utils.Decorator.invoke(Decorator.java:81) at java.lang.reflect.Proxy.invoke(Proxy.java:393) at $Proxy1.cancelRequest(Unknown Source) at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:926) at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:378) at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:514) at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:228) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)