[X] I have tested my contribution on these devices:
Virtual Pixel 3a, Android 9 / API 28
[X] My contribution is fully baked and ready to be merged as is
[X] I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234syntax
Description
Android build v1.18.2 is exhibiting issues relating to a CursorIndexOutOfRangeException. While the root cause of this issue is unknown at the present time, we can at least catch the exception and print some debug related to what's occurred, which will also prevent the app from crashing.
A potentially braver solution would be to catch the exception so we can identify what's causing it, then re-throw it to crash the app. In this way we'll see the root cause in the Play Store crash reports and can address it, but the app will crash, which isn't great.
All changes are in AttachmentDatabase.java lines 745-824 - everything else is just reformatting.
Contributor checklist
Fixes #1234
syntaxDescription
Android build v1.18.2 is exhibiting issues relating to a
CursorIndexOutOfRangeException
. While the root cause of this issue is unknown at the present time, we can at least catch the exception and print some debug related to what's occurred, which will also prevent the app from crashing.A potentially braver solution would be to catch the exception so we can identify what's causing it, then re-throw it to crash the app. In this way we'll see the root cause in the Play Store crash reports and can address it, but the app will crash, which isn't great.
All changes are in AttachmentDatabase.java lines 745-824 - everything else is just reformatting.