This repository was archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 487
Remove tracing local data (EXPOSUREAPP-5377) #2568
Merged
jurajkusnier
merged 6 commits into
feature/2850-refactor-localdata
from
feature/5377-tracing_migration
Mar 10, 2021
Merged
Remove tracing local data (EXPOSUREAPP-5377) #2568
jurajkusnier
merged 6 commits into
feature/2850-refactor-localdata
from
feature/5377-tracing_migration
Mar 10, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ing_migration # Conflicts: # Corona-Warn-App/src/main/java/de/rki/coronawarnapp/storage/LocalData.kt # Corona-Warn-App/src/main/java/de/rki/coronawarnapp/storage/preferences/EncryptedPreferencesMigration.kt
BMItr
reviewed
Mar 10, 2021
| MockKAnnotations.init(this) | ||
| every { submissionSettings.hasViewedTestResult.value } returns false | ||
| every { timeStamper.nowUTC } returns currentInstant | ||
| every { tracingSettings.initialPollingForTestResultTimeStamp } returns currentInstant.millis |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use timestamper?
Contributor
|
lgtm, nothing to complain so far. #oneOptionalComment |
…ing_migration # Conflicts: # Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/MainActivityTest.kt # Corona-Warn-App/src/main/java/de/rki/coronawarnapp/storage/LocalData.kt
|
Kudos, SonarCloud Quality Gate passed! |
harambasicluka
added a commit
that referenced
this pull request
Mar 11, 2021
* Shared preferences migration: SETTINGS DATA (EXPOSUREAPP-5378) (#2468) * Migrate Shared Preferences (SETTINGS) * Code refactoring * Fix tests * Migrate Shared Preferences (SETTINGS) * Cleaning code * Cleaning code * LocalData Migration skeleton (EXPOSUREAPP-5295) (#2509) * EncryptedPreferencesMigration skeleton class * SecurityHelper return nullable SharedPreferences not an exception * Remove Onboarding related Properties from LocalData (EXPOSUREAPP-5375) #2470 * Removed Onboarding related Properties from LocalData Added OnboardingData which provides the FlowPreferences that were defined in LocalData beforehand Currently no migration for these values is implemented Signed-off-by: Kolya Opahle <[email protected]> * Turns out MockFlowPreference and MockSharedPreferences were not usable in the device test flavour moved them into testShared Signed-off-by: Kolya Opahle <[email protected]> * OnboardingData -> OnboardingSettings OnboardingSettings: moved to get / set instead of FlowPreferences when subscribing is not needed isOnboarded is now based on onboardingCompletedTimestamp != null instead of set seperately Signed-off-by: Kolya Opahle <[email protected]> * Removed Onboarding Preference key strings from all languages Signed-off-by: Kolya Opahle <[email protected]> * Added Singleton annotation to OnboardingSettings Added migration code for OnboardingSettings to EncryptedPreferencesMigration Signed-off-by: Kolya Opahle <[email protected]> * Migrate Interoperability settings * Remove tracing local data (EXPOSUREAPP-5377) (#2568) * migrate LocalData tracing preferences to TracingSettings * update tests * Remove old code * Update tests * Remove submission local data (EXPOSUREAPP-5379) (#2505) * Moved submission related settings from LocalData to SubmissionSettings Made BackgroundNoise injectable Refactored some of the SubmissionSettings Signed-off-by: Kolya Opahle <[email protected]> * Replaced isBeforeNow in BackgroundNoisePeriodicWorker with timeStamper.nowUTC to help with testing Signed-off-by: Kolya Opahle <[email protected]> * Fixed MainActivityTest by providing SubmissionSettings as a mockk Signed-off-by: Kolya Opahle <[email protected]> * Removed all Preference keys removed from LocalData Signed-off-by: Kolya Opahle <[email protected]> * Added migration code for SubmissionSettings to EncryptedPreferencesMigration Signed-off-by: Kolya Opahle <[email protected]> * Moved Instant conversion to extension function to satisfy detekt Signed-off-by: Kolya Opahle <[email protected]> * Removed lazy from dagger injection in BackgroundWorkSchedulerBase * Cleaned up TestResultDonorTest (Removed Instant.now() calls, fixed shouldBe case where Instant.now() would break the calculation) * Moved toInstantOrNull into TimeAndDateExtensions and used it in a few more places * Fixed a unit test that was added by the merge and fixed a merge diff that was resolved wrongly Signed-off-by: Kolya Opahle <[email protected]> * Format on commit got rid of these imports for some reason Signed-off-by: Kolya Opahle <[email protected]> * EncryptedPreferencesMigration refactoring * DataReset implementation * Drop storage of active tracing time * Cleaning code * Remove TODO * Call migration earlier * Update tests * Delete PreferencesModule * Update EncryptedPreferencesMigration * Fix lint issue * Update EncryptedPreferencesHelper Co-authored-by: Kolya Opahle <[email protected]> Co-authored-by: harambasicluka <[email protected]> Co-authored-by: Matthias Urhahn <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move Tracing settings from
LocalDatatoTracingSettingsand implement migration inEncryptedPreferencesMigration