Skip to content

major swap overhaul

This is a major overhaul of the swap code to make it actually fit into the "Model/View/Presenter" style of the Android components (Service/View/Activity/LocalBroadcastManager). It moves most of the Views into pure XML form, which enforces that they remain only Views. This then makes SwapWorkflowActivity much more the "Presenter" since it controls a lot more of the relationship between the data and the UI. This is inspired by https://medium.com/square-corner-blog/advocating-against-android-fragments-81fd0b462c97

This also adds new features, like:

  • inline cancel buttons for the Swap installer list view
  • purged CacheSwapAppsService and replace it with InstalledAppProvider, which is already in place
  • LocalRepoService for better background processing of the swap repo
  • improved error reporting from UpdateService

This also uses HandlerThread for background tasks: https://medium.com/@ali.muzaffar/handlerthreads-and-why-you-should-be-using-them-in-your-android-apps-dc8bf1540341

Edited by Hans-Christoph Steiner

Merge request reports