Closed temcguir closed 8 months ago
This is due to FlashDeviceTest not having the WRITE_EXTERNAL_STORAGE permission. See relevant logcat:
03-27 18:04:04.357 2324 2337 E DatabaseUtils: Writing exception to parcel
03-27 18:04:04.357 2324 2337 E DatabaseUtils: java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=3021, uid=10067 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
03-27 18:04:04.357 2324 2337 E DatabaseUtils: at android.content.ContentProvider.enforceWritePermissionInner(ContentProvider.java:706)
03-27 18:04:04.357 2324 2337 E DatabaseUtils: at com.android.providers.media.MediaProvider.enforceWritePermissionInner(MediaProvider.java:712)
03-27 18:04:04.357 2324 2337 E DatabaseUtils: at android.content.ContentProvider$Transport.enforceWritePermission(ContentProvider.java:515)
03-27 18:04:04.357 2324 2337 E DatabaseUtils: at android.content.ContentProvider$Transport.insert(ContentProvider.java:260)
03-27 18:04:04.357 2324 2337 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:152)
03-27 18:04:04.357 2324 2337 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:731)
03-27 18:04:04.359 3021 3052 D CameraXCameraUseCase: takePicture onError: androidx.camera.core.ImageCaptureException: Failed to write to MediaStore URI: null
After fixing the permission issue, the camera HAL seems to crash on this device when trying to take a picture with the rear camera flash. I'm seeing the same stack trace as mentioned in b/195122056. I've skipped the test on this emulator for now.
This test is failing consistently on the Pixel2API28 emulator during presubmit. For example, see here: https://github.com/google/jetpack-camera-app/actions/runs/8461046229/job/23180220350