kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fixed Camera capture crash on API <= 19.
On older versions of Android, TextureView#getBitmap() needs to be called on the main thread. On mid range phones, this is ~50ms. Normally that'd be bad, but the UI isn't doing anything at that point anyway. Fixes #8232fork-5.53.8
rodzic
2c5fa155ae
commit
34770a2333
|
@ -193,12 +193,12 @@ public class Camera1Fragment extends Fragment implements TextureView.SurfaceText
|
|||
shutterSound.play();
|
||||
orderEnforcer.reset();
|
||||
|
||||
Stopwatch fastCaptureTimer = new Stopwatch("Fast Capture");
|
||||
|
||||
Bitmap preview = cameraPreview.getBitmap();
|
||||
fastCaptureTimer.split("captured");
|
||||
|
||||
LifecycleBoundTask.run(getLifecycle(), () -> {
|
||||
Stopwatch fastCaptureTimer = new Stopwatch("Fast Capture");
|
||||
|
||||
Bitmap preview = cameraPreview.getBitmap();
|
||||
fastCaptureTimer.split("captured");
|
||||
|
||||
Bitmap full = preview;
|
||||
if (Build.VERSION.SDK_INT < 28) {
|
||||
PointF scale = getScaleTransform(cameraPreview.getWidth(), cameraPreview.getHeight(), properties.getPreviewWidth(), properties.getPreviewHeight());
|
||||
|
|
Ładowanie…
Reference in New Issue