Viewfinder disappears after pausing and resuming activity
Steps to reproduce:
- Click the home button while the QR code camera view is showing
- Click the recents button and return to the camera view
The issue seems to be that the surface is created when the camera's opened, destroyed when the camera's released, and not recreated when the camera's reopened. Log:
04-27 16:09:16.690 22164-23700/org.briarproject I/KeyAgreementConnector: Starting BQP listeners
04-27 16:09:16.690 22164-23700/org.briarproject I/DroidtoothPlugin: Key agreement UUID 1fb1978a-ebfe-3dda-8677-445838dbdf43
04-27 16:09:16.690 22164-23700/org.briarproject I/InsecureBluetooth: Listening with new API
04-27 16:09:16.690 22164-23701/org.briarproject I/ShowQrCodeFragment: Opening camera
04-27 16:09:16.790 22164-22164/org.briarproject I/CameraView: Surface created
04-27 16:09:16.790 22164-22164/org.briarproject I/CameraView: Surface changed: 320x399
04-27 16:09:16.800 22164-22164/org.briarproject I/CameraView: Calculated framing rect: null
04-27 16:09:16.800 22164-22164/org.briarproject I/CameraView: Calculated framing rect: null
04-27 16:09:17.520 22164-22164/org.briarproject I/CameraView: Display orientation 90 degrees
04-27 16:09:17.540 22164-22164/org.briarproject I/CameraView: Scene modes: [auto, night, snow, sports]
04-27 16:09:17.540 22164-22164/org.briarproject I/CameraView: Focus modes: [infinity, fixed]
04-27 16:09:17.540 22164-22164/org.briarproject I/CameraView: Setting focus mode to fixed
04-27 16:09:17.540 22164-22164/org.briarproject I/CameraView: Finding framing dimension, side1 = 480, side2 = 160
04-27 16:09:17.540 22164-22164/org.briarproject I/CameraView: Returning minimum side length: 160
04-27 16:09:17.540 22164-22164/org.briarproject I/CameraView: Metering areas supported: 1
04-27 16:09:17.540 22164-22164/org.briarproject I/CameraView: Size 640x480, stretch 1.06934, pixels 307200, score 287280.0
04-27 16:09:17.550 22164-22164/org.briarproject I/CameraView: Size 640x368, stretch 1.3947914, pixels 235520, score 168856.8
04-27 16:09:17.550 22164-22164/org.briarproject I/CameraView: Size 512x288, stretch 1.4257866, pixels 147456, score 103420.805
04-27 16:09:17.550 22164-22164/org.briarproject I/CameraView: Size 384x288, stretch 1.06934, pixels 110592, score 103420.805
04-27 16:09:17.550 22164-22164/org.briarproject I/CameraView: Size 352x288, stretch 1.0201705, pixels 101376, score 99371.63
04-27 16:09:17.560 22164-22164/org.briarproject I/CameraView: Size 320x240, stretch 1.06934, pixels 76800, score 71820.0
04-27 16:09:17.560 22164-22164/org.briarproject I/CameraView: Size 176x144, stretch 1.0201705, pixels 25344, score 24842.908
04-27 16:09:17.560 22164-22164/org.briarproject I/CameraView: Best size 640x480
04-27 16:09:17.710 22164-22164/org.briarproject I/CameraView: Finding framing dimension, side1 = 320, side2 = 240
04-27 16:09:17.710 22164-22164/org.briarproject I/CameraView: Returning hard minimum: 240
04-27 16:09:17.710 22164-22164/org.briarproject I/CameraView: Calculated framing rect: Rect(40, 0 - 280, 240)
04-27 16:09:23.410 22164-22164/org.briarproject I/ShowQrCodeFragment: Releasing camera
04-27 16:09:23.950 22164-22164/org.briarproject I/CameraView: Surface destroyed
04-27 16:09:24.060 22164-23852/org.briarproject I/KeyAgreementConnector: Stopping BQP listeners
04-27 16:09:29.750 22164-23749/org.briarproject I/ShowQrCodeFragment: Opening camera
04-27 16:09:29.760 22164-23950/org.briarproject I/KeyAgreementConnector: Starting BQP listeners
04-27 16:09:29.760 22164-23950/org.briarproject I/DroidtoothPlugin: Key agreement UUID 00073827-b31d-3cd8-b5bf-596321f0501f
04-27 16:09:29.780 22164-23950/org.briarproject I/InsecureBluetooth: Listening with new API
04-27 16:09:30.750 22164-22164/org.briarproject I/CameraView: Display orientation 90 degrees
04-27 16:09:30.750 22164-22164/org.briarproject I/CameraView: Scene modes: [auto, night, snow, sports]
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Focus modes: [infinity, fixed]
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Setting focus mode to fixed
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Metering areas supported: 1
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Size 640x480, stretch 1.06934, pixels 307200, score 287280.0
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Size 640x368, stretch 1.3947914, pixels 235520, score 168856.8
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Size 512x288, stretch 1.4257866, pixels 147456, score 103420.805
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Size 384x288, stretch 1.06934, pixels 110592, score 103420.805
04-27 16:09:30.760 22164-22164/org.briarproject I/CameraView: Size 352x288, stretch 1.0201705, pixels 101376, score 99371.63
04-27 16:09:30.770 22164-22164/org.briarproject I/CameraView: Size 320x240, stretch 1.06934, pixels 76800, score 71820.0
04-27 16:09:30.770 22164-22164/org.briarproject I/CameraView: Size 176x144, stretch 1.0201705, pixels 25344, score 24842.908
04-27 16:09:30.770 22164-22164/org.briarproject I/CameraView: Best size 640x480