Loading core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java +5 −1 Original line number Diff line number Diff line Loading @@ -292,6 +292,10 @@ public class LegacyCameraDevice implements AutoCloseable { Log.e(TAG, "configureOutputs - null outputs are not allowed"); return BAD_VALUE; } if (!output.isValid()) { Log.e(TAG, "configureOutputs - invalid output surfaces are not allowed"); return BAD_VALUE; } StreamConfigurationMap streamConfigurations = mStaticCharacteristics. get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); Loading Loading @@ -522,7 +526,7 @@ public class LegacyCameraDevice implements AutoCloseable { * @return the width and height of the surface * * @throws NullPointerException if the {@code surface} was {@code null} * @throws IllegalStateException if the {@code surface} was invalid * @throws BufferQueueAbandonedException if the {@code surface} was invalid */ public static Size getSurfaceSize(Surface surface) throws BufferQueueAbandonedException { checkNotNull(surface); Loading core/java/android/hardware/camera2/legacy/LegacyExceptionUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class LegacyExceptionUtils { case CameraBinderDecorator.NO_ERROR: { return CameraBinderDecorator.NO_ERROR; } case CameraBinderDecorator.ENODEV: { case CameraBinderDecorator.BAD_VALUE: { throw new BufferQueueAbandonedException(); } } Loading core/java/android/hardware/camera2/legacy/RequestThreadManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,10 @@ public class RequestThreadManager { return; } for(Surface s : surfaces) { if (s == null || !s.isValid()) { Log.w(TAG, "Jpeg surface is invalid, skipping..."); continue; } try { LegacyCameraDevice.setSurfaceFormat(s, LegacyMetadataMapper.HAL_PIXEL_FORMAT_BLOB); } catch (LegacyExceptionUtils.BufferQueueAbandonedException e) { Loading core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -373,8 +373,7 @@ static sp<ANativeWindow> getNativeWindow(JNIEnv* env, jobject surface) { return NULL; } if (anw == NULL) { jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", "Surface had no valid native window."); ALOGE("%s: Surface had no valid native window.", __FUNCTION__); return NULL; } return anw; Loading media/java/android/media/ImageReader.java +1 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,7 @@ public class ImageReader implements AutoCloseable { @Override public void close() { setOnImageAvailableListener(null, null); if (mSurface != null) mSurface.release(); nativeClose(); } Loading Loading
core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java +5 −1 Original line number Diff line number Diff line Loading @@ -292,6 +292,10 @@ public class LegacyCameraDevice implements AutoCloseable { Log.e(TAG, "configureOutputs - null outputs are not allowed"); return BAD_VALUE; } if (!output.isValid()) { Log.e(TAG, "configureOutputs - invalid output surfaces are not allowed"); return BAD_VALUE; } StreamConfigurationMap streamConfigurations = mStaticCharacteristics. get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); Loading Loading @@ -522,7 +526,7 @@ public class LegacyCameraDevice implements AutoCloseable { * @return the width and height of the surface * * @throws NullPointerException if the {@code surface} was {@code null} * @throws IllegalStateException if the {@code surface} was invalid * @throws BufferQueueAbandonedException if the {@code surface} was invalid */ public static Size getSurfaceSize(Surface surface) throws BufferQueueAbandonedException { checkNotNull(surface); Loading
core/java/android/hardware/camera2/legacy/LegacyExceptionUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class LegacyExceptionUtils { case CameraBinderDecorator.NO_ERROR: { return CameraBinderDecorator.NO_ERROR; } case CameraBinderDecorator.ENODEV: { case CameraBinderDecorator.BAD_VALUE: { throw new BufferQueueAbandonedException(); } } Loading
core/java/android/hardware/camera2/legacy/RequestThreadManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,10 @@ public class RequestThreadManager { return; } for(Surface s : surfaces) { if (s == null || !s.isValid()) { Log.w(TAG, "Jpeg surface is invalid, skipping..."); continue; } try { LegacyCameraDevice.setSurfaceFormat(s, LegacyMetadataMapper.HAL_PIXEL_FORMAT_BLOB); } catch (LegacyExceptionUtils.BufferQueueAbandonedException e) { Loading
core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -373,8 +373,7 @@ static sp<ANativeWindow> getNativeWindow(JNIEnv* env, jobject surface) { return NULL; } if (anw == NULL) { jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", "Surface had no valid native window."); ALOGE("%s: Surface had no valid native window.", __FUNCTION__); return NULL; } return anw; Loading
media/java/android/media/ImageReader.java +1 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,7 @@ public class ImageReader implements AutoCloseable { @Override public void close() { setOnImageAvailableListener(null, null); if (mSurface != null) mSurface.release(); nativeClose(); } Loading