Anki-Android
Anki-Android copied to clipboard
refactor: mount receivers
This ensure there is no change in behaviour.
I checked whether we could try to not export the download of decks, but it does not works. The app does not crash on api 24 on simulator.
There was a slight problem, with variables that could potentially be null. To ensure the type checker agreed with the code, without using !!
, I had to rewrite some of the logic.
I also ensured that some of the code that was copy/pasted in various activity now entirely belong to AnkiActivity. As a side effect, all activities that used to listen to the "unmount" notification and finished, will now also show a toast when the card gets unmounted. Currently it was only the deck picker.
- Fixes #16713