Update Risk Score more than once a day (EXPOSUREAPP-3455) (#1550)
* Replaced KeyFileDownloader.kt in favor of KeyFileSyncTool.kt.
Supports new logic for more frequent downloads
First draft.
* Change "country" to location, which is more fitting.
* Split sync success tracking into days and hours, track them separately.
* Fix stale location data not being cleaned up.
* Test fragment, first drafts.
Remove 24 hour mode options, no longer used.
* Implemented metered connection check for hourly key download.
* Provide timeout values for download transaction and individual downloads via app config.
* Add clear+download actions, and current network state display to the key download test fragment.
* Complete unit tests for KeyDownloadTool.kt
* Complete unit tests for FlowPreference and DownloadConfigMapper-
* Unit tests for day and hour sync tool.
* Complete tests for KeyPackageSyncTool.kt
* klint & detekt <3
* Fix tags and commented out code (the deletion behavior is covered by `getting completed keys`
* Fix text typo.
* Sync tools need to tell what (if) new packages have been downloaded.
* Interval checks for exposure detection.
* Use the ENFClient, avoid direct access to the calculation tracker.
* Remove defensive check "wanted countries"/"available countries" to reduce server hits.
* CalculationTracker's timeout should come from the AppConfig (androidExposureDetectionParameters.overallTimeoutInSeconds)
* Add test to confirm that we delete stale locations.
* Finished key packages test screen.
Introduced some boilerplate code to make async diffutils easier to use (will help us with the homefragment later on).
* Remove ETag fallback behavior, missing ETag is such an edge case that we should throw.
* Check valid max and min config values.
* Fix linting issues.
* Address PR comments.
* EXPECT_NEW_*_PACKAGES should be based on the package time data, not the download creation timestamp.
The downloads creation timestamp can be subject to race conditions.
* Fix overflow due to time addition with Long.MAX_VALUE
* Clean up tests
* Don't crash the task if we can't get today's hour index.
(Makes timetravel testing difficult, and a real abort reason would be a crash on the day index)
* Display errors (don't crash) when running manual keysync from the test menu.
* Fix last day/hour sync result success state not being updated.
* Change Key download task collision mode from ENQUEUE to SKIP_IF_SIBLING_RUNNING.
* Rename CalculationTracker to ExposureDetectionTracker
* Rename `forceSync` to `forceIndexLookup`.
* Remove outdated comments.
* Spell out viewholder.
* Move `maxExposureDetectionsPerUTCDay == 0` into it's own check.
* Change test menu metered connection button behavior. It's now a button that "fakes" the connection status to metered.
It's now also part of the `TestSettings` and the connection state is faked for the `NetworkStateProvider` class which may be reused.
* Change test menu metered connection button behavior. It's now a button that "fakes" the connection status to metered.
It's now also part of the `TestSettings` and the connection state is faked for the `NetworkStateProvider` class which may be reused.
* Dry sync/error logging call.
* Improve parameter naming, it's target locations, not available locations.
The app config alone determines which locations we try to sync.
Co-authored-by:
BMItter <46747780+BMItter@users.noreply.github.com>
Showing
- Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/diagnosiskeys/storage/KeyCacheDatabaseTest.kt 13 additions, 13 deletions...ronawarnapp/diagnosiskeys/storage/KeyCacheDatabaseTest.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/api/ui/DebugOptionsState.kt 0 additions, 6 deletions...ava/de/rki/coronawarnapp/test/api/ui/DebugOptionsState.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/api/ui/TestForAPIFragment.kt 0 additions, 81 deletions...va/de/rki/coronawarnapp/test/api/ui/TestForAPIFragment.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/debugoptions/ui/DebugOptionsFragment.kt 0 additions, 5 deletions...oronawarnapp/test/debugoptions/ui/DebugOptionsFragment.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/debugoptions/ui/DebugOptionsFragmentViewModel.kt 1 addition, 10 deletions...app/test/debugoptions/ui/DebugOptionsFragmentViewModel.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/debugoptions/ui/DebugOptionsState.kt 5 additions, 0 deletions...i/coronawarnapp/test/debugoptions/ui/DebugOptionsState.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/keydownload/ui/CachedKeyListItem.kt 12 additions, 0 deletions...ki/coronawarnapp/test/keydownload/ui/CachedKeyListItem.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/keydownload/ui/KeyDownloadTestFragment.kt 79 additions, 0 deletions...onawarnapp/test/keydownload/ui/KeyDownloadTestFragment.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/keydownload/ui/KeyDownloadTestFragmentModule.kt 18 additions, 0 deletions...napp/test/keydownload/ui/KeyDownloadTestFragmentModule.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/keydownload/ui/KeyDownloadTestFragmentViewModel.kt 80 additions, 0 deletions...p/test/keydownload/ui/KeyDownloadTestFragmentViewModel.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/keydownload/ui/KeyFileDownloadAdapter.kt 70 additions, 0 deletions...ronawarnapp/test/keydownload/ui/KeyFileDownloadAdapter.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragmentViewModel.kt 2 additions, 0 deletions...i/coronawarnapp/test/menu/ui/TestMenuFragmentViewModel.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/tasks/testtask/TestTask.kt 2 additions, 1 deletion...java/de/rki/coronawarnapp/test/tasks/testtask/TestTask.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/tasks/ui/TestTaskControllerFragmentViewModel.kt 1 addition, 1 deletion...napp/test/tasks/ui/TestTaskControllerFragmentViewModel.kt
- Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/ui/main/MainActivityTestModule.kt 5 additions, 0 deletions...va/de/rki/coronawarnapp/ui/main/MainActivityTestModule.kt
- Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_debugoptions.xml 1 addition, 13 deletions...eviceForTesters/res/layout/fragment_test_debugoptions.xml
- Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_for_a_p_i.xml 0 additions, 83 deletions...c/deviceForTesters/res/layout/fragment_test_for_a_p_i.xml
- Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_keydownload.xml 88 additions, 0 deletions...deviceForTesters/res/layout/fragment_test_keydownload.xml
- Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_keydownload_adapter_line.xml 77 additions, 0 deletions...ers/res/layout/fragment_test_keydownload_adapter_line.xml
- Corona-Warn-App/src/deviceForTesters/res/navigation/test_nav_graph.xml 8 additions, 0 deletions...pp/src/deviceForTesters/res/navigation/test_nav_graph.xml
Loading
Please register or sign in to comment