Skip to content
Snippets Groups Projects
  1. Sep 11, 2020
    • Matthias Urhahn's avatar
      Overhaul of DiagnosisKey related Download and Caching Mechanisms (EXPOSUREAPP-2469) (#1136) · f7f185a3
      Matthias Urhahn authored
      
      * Rework of keyfile download and caching.
      * Supports interop
      * More modular for better testing and build flavour based behavior adjustments
      * More resilient handling of failed downloads
      * Preperations for future hourly download and serverside checksums
      
      TODO: Finish unit tests, keycache migration and cache health check
      
      * First batch of unit tests and some fixes for incorrect behavior that the tests surfaced.
      
      * Added unit tests for the KeyCacheRepository
      
      TODO: Tests for downloader and migration.
      
      * Implemented POC for migration old key files.
      
      * Fixed legacy file migration and cleanup, improved logging.
      
      * Added unit tests for legacy key file migration.
      
      * Add fallback for different file hashes in the header.
      
      * Yes kLint, we know it's a long method,
      but for this it's better to read it in one block vs jumping to extra methods.
      
      * More linting issues, adjusting project code style prevent a few of these in the future.
      
      * Added missing unit tests for `KeyFileDownloader` and fixed faulty behavior that was noticed during testing.
      
      * CRUD (instrumentation) test for `KeyCacheDatabase`
      
      * Remove unused `FileStorageHelper` and related constants+tests.
      
      * Fix last3Hours unit test in deviceRelease mode, we need to explicitly enable debug for these tests.
      
      * Until we have more information about the hashsum's format in the header, default to `ETag
      
      * Split app config server API from diagnosis key download API,
      and reintroduce caching for the app config download.
      
      * Add test to check that the cache is used on flaky connections.
      
      * Code changes based on PR comment, part #1.
      
      * Code fluff, formatting.
      
      * Handle download errors correctly.
      
      * Refactoring:
      * Remove unnecessary `currentDate` we always start with the newest date from the servers index.
      * Make a specialised class for header validation
      
      * Let legacy cache migration abort early, depending on whether the key dir exists.
      
      * If we can't create the base directory for the key repo, throw an exception.
      
      * Delete cache entry if a download fails.
      
      * Fixed test regression due to refactoring.
      
      * Consolidate staleness check into `getStale`
      
      * Consolidate clean up for failed downloads into the download method.
      Added tests to check that we delete the keycache entry if the download fails (which we didn't for hours :O!)
      
      * Because the hour-mode uses caching too, we add an explicit button to the test menu that clears the cache.
      
      * Add comment with reference to ticket regarding follow up on the other headers.
      
      * Move expected storage size per country into a named constant.
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Unverified
      f7f185a3
  2. Sep 01, 2020
    • Oliver Zimmerman's avatar
      Remove blanket internet connection status (EXPOSUREAPP-1572) (#1096) · 46ce7ab9
      Oliver Zimmerman authored
      
      * Removed blanked internet connection UI state. New Dev base for pipeline issues
      
      Removed the blanket internet connection status:
      
      Removed the connection state from TracingStatusHelper
      Adjusted formatters which use the adjusted TracingStatusHelper
      Removed connection logic from various fragments (SettingsTracingFragment, etc.)
      Adjusted XML views (Settings Fragment: no connection card, etc.)
      Adjusted automated tests that previously included the connection state.
      Closes JIRA task EXPOSUREAPP-1572
      
      * Update FormatterSettingsHelperTest.kt
      
      * Update fragment_main.xml
      
      deviceForTesters was still using connection state.
      
      * Update Project.xml
      
      * Update FormatterSettingsHelperTest.kt
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      46ce7ab9
  3. Aug 26, 2020
    • Matthias Urhahn's avatar
      Storage check with optional allocation (EXPOSUREAPP-2259) (#1076) · 521e3ec7
      Matthias Urhahn authored
      
      * Disable klint debug output to make it easier to find the actual error in the log.
      
      * Setup jUnit5 & kotest.
      
      * Add base classes for testing to setup log output.
      
      * Introduce class `DeviceStorage` to check (or request on newer APIs) free space.
      
      Rel. EXPOSUREAPP-2259
      
      * Add test cases for failure modes.
      
      * Make it obvious that the check should not be executed on the ui thread.
      
      * Try fall back to legacy method if the API26+ version fails.
      If that also fails, throw the exception and let the caller handle it.
      
      * Wire up injection annotations.
      
      * Remove unused mockito testing dependency.
      
      * klint...
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Co-authored-by: default avatarJakob Möller <jakob.moeller@sap.com>
      Unverified
      521e3ec7
  4. Aug 24, 2020
Loading