This PR fixes a crash that can happen when Aztec state with history is restored, but the history cache file was removed by OS.
This crash is pretty rare, but can happen on devices with low storage, when you reopen editor that was destroyed by OS (usually happens if you don't open it for some time).
Test
For easier access to file system consider using an emulator.
Enabled "Do not keep activities".
Open editor, and make a couple of changes.
Confirm that the changes are added to history.
Minimize the app.
From AS device manager, open file browser of the emulator.
Navigate to data/data/org.wordpress.aztec/cache
Delete files that start with HISTORY_LIST_KEY.
Go back to the editor from app drawer.
Confirm that the app is not crashing, and there is no history.
Review
@[USER_NAME]
Make sure strings will be translated:
[x] If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.
This PR fixes a crash that can happen when Aztec state with history is restored, but the history cache file was removed by OS.
This crash is pretty rare, but can happen on devices with low storage, when you reopen editor that was destroyed by OS (usually happens if you don't open it for some time).
Test
data/data/org.wordpress.aztec/cache
HISTORY_LIST_KEY
.Review
@[USER_NAME]
Make sure strings will be translated:
strings.xml
as a part of the integration PR.