[Android] Refactor AssetCopyService and the way we extract resources from the assets

This solves the following issues:
1. If user uninstall Dolphin and install it again the resources will
not be copied unless the user manually clear the app cache because we
are enabling the allowBackup flag in the manifest which will make the app
restore the settings saved in the shared prefernces including the flag
assetsCopied. This PR always copy the files everytime you open Dolphin.

2. If the AssetCopyService took long time and you tried to open the settings
screen or start a game the behaviour was not expected or the emulator will
crash, this PR make sure that whatever we add to the DirectoryInitializationService
or how long it will take will still work as expected by blocking both
the settings screen and the emulaion screen to wait untill all resources
needed are copied.

3. Better communication between the DirectoryInitializationService and the
UI screens using brocast messages.
This commit is contained in:
mahdihijazi committed 2017-12-18 14:32:39 +01:00
1 parent 9f9b4bc028
commit 1190afef51
13 files changed
+374 -138

No files matched your search

@@ -244,4 +244,6 @@
<string name="header_controllers">Controllers</string>
<string name="write_permission_needed">You need to allow write access to external storage for the emulator to work</string>
<string name="load_settings">Loading Settings...</string>
</resources>