Loading core/java/android/hardware/camera2/legacy/RequestThreadManager.java +12 −8 Original line number Diff line number Diff line Loading @@ -333,6 +333,16 @@ public class RequestThreadManager { startPreview(); } private void disconnectCallbackSurfaces() { for (Surface s : mCallbackOutputs) { try { LegacyCameraDevice.disconnectSurface(s); } catch (LegacyExceptionUtils.BufferQueueAbandonedException e) { Log.d(TAG, "Surface abandoned, skipping...", e); } } } private void configureOutputs(Collection<Pair<Surface, Size>> outputs) { if (DEBUG) { String outputsStr = outputs == null ? "null" : (outputs.size() + " surfaces"); Loading Loading @@ -370,14 +380,8 @@ public class RequestThreadManager { mGLThreadManager.waitUntilIdle(); } resetJpegSurfaceFormats(mCallbackOutputs); disconnectCallbackSurfaces(); for (Surface s : mCallbackOutputs) { try { LegacyCameraDevice.disconnectSurface(s); } catch (LegacyExceptionUtils.BufferQueueAbandonedException e) { Log.w(TAG, "Surface abandoned, skipping...", e); } } mPreviewOutputs.clear(); mCallbackOutputs.clear(); mJpegSurfaceIds.clear(); Loading Loading @@ -972,11 +976,11 @@ public class RequestThreadManager { mGLThreadManager.quit(); mGLThreadManager = null; } disconnectCallbackSurfaces(); if (mCamera != null) { mCamera.release(); mCamera = null; } resetJpegSurfaceFormats(mCallbackOutputs); break; case RequestHandlerThread.MSG_POKE_IDLE_HANDLER: // OK: Ignore message. Loading Loading
core/java/android/hardware/camera2/legacy/RequestThreadManager.java +12 −8 Original line number Diff line number Diff line Loading @@ -333,6 +333,16 @@ public class RequestThreadManager { startPreview(); } private void disconnectCallbackSurfaces() { for (Surface s : mCallbackOutputs) { try { LegacyCameraDevice.disconnectSurface(s); } catch (LegacyExceptionUtils.BufferQueueAbandonedException e) { Log.d(TAG, "Surface abandoned, skipping...", e); } } } private void configureOutputs(Collection<Pair<Surface, Size>> outputs) { if (DEBUG) { String outputsStr = outputs == null ? "null" : (outputs.size() + " surfaces"); Loading Loading @@ -370,14 +380,8 @@ public class RequestThreadManager { mGLThreadManager.waitUntilIdle(); } resetJpegSurfaceFormats(mCallbackOutputs); disconnectCallbackSurfaces(); for (Surface s : mCallbackOutputs) { try { LegacyCameraDevice.disconnectSurface(s); } catch (LegacyExceptionUtils.BufferQueueAbandonedException e) { Log.w(TAG, "Surface abandoned, skipping...", e); } } mPreviewOutputs.clear(); mCallbackOutputs.clear(); mJpegSurfaceIds.clear(); Loading Loading @@ -972,11 +976,11 @@ public class RequestThreadManager { mGLThreadManager.quit(); mGLThreadManager = null; } disconnectCallbackSurfaces(); if (mCamera != null) { mCamera.release(); mCamera = null; } resetJpegSurfaceFormats(mCallbackOutputs); break; case RequestHandlerThread.MSG_POKE_IDLE_HANDLER: // OK: Ignore message. Loading