Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Conversation

@d4rken
Copy link
Member

@d4rken d4rken commented Nov 11, 2020

There were no conflicts 🥳

d4rken and others added 19 commits November 9, 2020 10:06
…XPOSUREAPP-2332) (#1513)

* Deadman notification: strings, onetimeworker, time calculation and unit tests

* Periodic deadman notification worker added

* Deadman notification refactor

* Deadman notification refactor
New tests

* Worker refactored to new DI

* Test boilerplate added

* Additional tests

* Clean up

* Added mock providers for deadman notification workers

* Comments and code clean up

* Test clean up

* Schedule work from CoronaWarnApplication

* Variable naming fix

* Switch to foreground state

* Formatting

* Formatting

* Inject Notification Manager Compat

* Change WorkManager initialization, make it impossible to inject the instance without it being initialized.

Co-authored-by: harambasicluka <[email protected]>
Co-authored-by: Matthias Urhahn <[email protected]>
…d (EXPOSUREAPP-3646) (#1560)

* Small change to check length of TAN before checking it's validity

* Unit test adjustment to reflect changes.

* Adjusted comparison to use less than operator. Additional tests.

* Seperated tan valid and tan length check fore better readibility. Adjusted tests

* lint fix

* use new isCorrectLength in isTanValidFormat

Co-authored-by: harambasicluka <[email protected]>
* Extend NotificationHelper with functionality to schedule repeating notifications.

* Enable cancelation of recurring notifications

* Only show two positive test reminders

* Implement proper positive test result reminder triggers

* please ktlint

* Reset notification on app reset via settings

* Extract positive test result notification logic in an injectable service

* Add tests

* Fix injection issue of NotificationReceiver

* Reset states of the SubmissionRepository on app reset via settings menu

* Fix ktlint issue

* add more logs

Co-authored-by: harambasicluka <[email protected]>
* Update EN SDK to 1.7.2 (EXPOSUREAPP-3662)

* Upgrade Work Manager dependencies

Co-authored-by: harambasicluka <[email protected]>
* Add default app config as last resort fallback.

* Change config type names and improve logging for HotDataFlow.kt

* Run the app config retrieval on the app scope, otherwise UI unsubscription could cancel the app config retrieval.

* Offer "identifier" property that can identify app configs such that subscribers know when it is considered changed.

* Behavior change AppConfigProvider.kt, there is no caching/replay grace period, once the last subscription is gone, it's  last value is cleared.

* Klint ;)

* Add a unit test specifically for checking the default configs checkum and parsability.

* Fix test breaking on CI.

* Don't check the checksum for the config loaded from assets.

Co-authored-by: harambasicluka <[email protected]>
* Fix task exceptions not being forwarded to our current error UI elements.

* Clean up old transaction names.

* Use simple class name as error tag.

* Prevent error reporting from triggering in unit tests due to static access.

* Move isUnitTest to CWDebug

Co-authored-by: harambasicluka <[email protected]>
* 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 <[email protected]>
…020 (#1570)

* Update from https://github.com/corona-warn-app/cwa-protocol-buffers/commit/9586b423837c598edc76c2ddf08baebcce1b1c36

* Adjust API to new protobuf names.
Update default config.

* Adjust function naming invalid -> revoked.

Co-authored-by: Matthias Urhahn <[email protected]>
* improved logging for Bakcground Worker

* loggin added in updateRiskLevelScore

Notification Permissions logged and notification sent is loggged

* merge conflict resolution

* uniformity in Log tags

Co-authored-by: harambasicluka <[email protected]>
* Show more specific error message when quota limit is reached and remove "Update ever 24h text".

* Show custom title in error dialog and make stack trace selectable.

* LINTs

* Add a log statement so that in all cases the the base error reporting is made visible.

Co-authored-by: harambasicluka <[email protected]>
… fine working with the latest available one. (#1573)

Co-authored-by: Ralf Gehrer <[email protected]>
…3455) (#1572)

* If we revoked any cached keys we need to force an index lookup.
+ Additional tests to check that forced index lookup is decided on correctly.

* Fix merge regressions in tests.
…XPOSUREAPP-3594) (#1567)

* add TracingStatus check that forces No_Calculation option if exposure logging stopped

* detekt adjustments

* Added test with Rituraj for tracing status when tracing status is inactive

Co-authored-by: harambasicluka <[email protected]>
@d4rken d4rken added the maintainers Tag pull requests created by maintainers label Nov 11, 2020
@d4rken d4rken requested a review from a team November 11, 2020 16:40
@d4rken d4rken self-assigned this Nov 11, 2020
@d4rken
Copy link
Member Author

d4rken commented Nov 11, 2020

No UA necessary, just pulling existing changes.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

62.5% 62.5% Coverage
0.0% 0.0% Duplication

@d4rken d4rken merged commit aeb4a64 into release/1.8.x Nov 11, 2020
@d4rken d4rken deleted the fix/merge-1.7.x-into-1.8.x branch November 11, 2020 16:47
@kaddaSz kaddaSz added this to the 1.8.0 milestone Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

maintainers Tag pull requests created by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants