Skip to content
Snippets Groups Projects
  1. Dec 29, 2020
  2. Dec 23, 2020
    • Matthias Urhahn's avatar
      Improve risklevel result data access performance (DEV) #1953 · 665b6f21
      Matthias Urhahn authored
      
      * Don't log all exposure windows on `RiskLevelTaskResult.toString()` due to performance impact when logging.
      
      * Add RiskLevelResult flow optimized for just getting the latest two results.
      
      * Share risk level result subscriptions.
      The delay when switching from Home to RiskDetails fragment will be bridged and no re-loading necessary.
      
      * Fix test regressions
      
      * Remove test code.
      
      * Introduce specific query for "latestAndLastSuccessful".
      Add unit tests for SQL queries.
      
      * Fix test regressions due to missing mocking.
      
      * Address merge conflicts.
      
      * Fix instrumentation tests not building.
      
      Co-authored-by: default avatarRalf Gehrer <ralfgehrer@users.noreply.github.com>
      665b6f21
  3. Dec 16, 2020
  4. Dec 14, 2020
    • Matthias Urhahn's avatar
      Contact Diary - Persistance Integration / Preparation (EXPOSUREAPP-4165) (#1891) · d96245ef
      Matthias Urhahn authored
      
      * implemented dao, entitiy, database, module - wip
      
      * Added cross ref classes for joining data
      
      * Adjusted daos
      
      * - Added ContactDiaryModule to AppComponent - Reduced code a bit
      
      * missing interface change
      
      * Uniform naming
      
      * Defined methods for contact diary repo
      
      * added mapper extension
      
      * fixed naming, Implement contact diary repo
      
      * Added repo to module, Flows shall return lists
      
      * Added foreign key constraints - outdated
      
      * Clear contact diary database on DataReset, removed unneccessary element
      
      * removed singletons
      
      * adjustments to new tech spec
      
      * Adjusted daos from stash
      
      * Added new daos to related classes
      
      * Redefined contact diary repo
      
      * Implemented contact diary repo
      
      * Added mission dao annotations
      
      * sorting opportunity
      
      * sourcecheck clean
      
      * cleanUp, added db schema, removed old stuff
      
      * missing call
      
      * ForeigenKey must be in entity declaration
      
      * Added contact diary db test, removed broken tests
      
      * added autogenerate primarykey
      
      * Moved data joining from App-Lvl to database
      
      * Explicit naming in entities
      
      * sourcecheck & ktlint clean
      
      Co-authored-by: default avatarBMItter <berndus@gmx.de>
      d96245ef
  5. Dec 10, 2020
    • Matthias Urhahn's avatar
      Fix issues with TEK submission flow (EXPOSUREAPP-4189, EXPOSUREAPP-4215) (#1840) · a29354c0
      Matthias Urhahn authored
      * Draft:
      Split up test result fragment into pending and negative.
      
      * TODO pending fragment needs to forward automatically when the result is available
      * When do we check if tracing is enabled?
      
      * When we receive a non-pending test result while on the pending-result fragment, we forward automatically to the right screen.
      
      * Clean up pending test result layout.
      
      * Extract invalid test result fragment into it's own screen.
      
      * LINTs
      
      * Remove unused problematic API.
      
      * Fix merge regressions.
      
      * Address PR comments: Improve navigation.
      a29354c0
  6. Dec 08, 2020
  7. Dec 03, 2020
    • Matthias Urhahn's avatar
      Submission upload (EXPOSUREAPP-3748) (#1794) · 950653c1
      Matthias Urhahn authored
      * Submission upload, first draft.
      Storing Symptoms and TEKs.
      
      TODO:
      * Change upload task to use stored data.
      * Blocking upload task
      * Tests
      
      * Update symptoms on each screen.
      Integrate permission request and automatic TEK history update.
      
      TODO:
      * Cancel dialog
      * Blocking upload task
      * Tests
      
      * Add submission on cancel behavior.
      
      * LINTs and unit tests.
      
      * Hooking up navigation and first break through on TAN based submission.
      
      * Hook up navigation for QR Code to test result without consent.
      
      * Fix positive result consent given submission: Abort to Main Screen
      
      * Restore default environment.
      
      * Adjust notification target fragment.
      
      * Address LINTs
      
      * Clean up symptoms introduction nav actions.
      
      * Fix tests
  8. Dec 02, 2020
  9. Nov 30, 2020
  10. Nov 29, 2020
  11. Nov 26, 2020
  12. Nov 20, 2020
  13. Nov 18, 2020
    • chris-cwa's avatar
      Removed enf v1 exposure summary and tokens (EXPOSUREAPP-3538) (#1644) · a96bb279
      chris-cwa authored
      
      * activate WindowExposure mode
      
      * extirpated tokens!
      
      * detekt, ktlint
      
      * fixed tests
      
      * - v1 methods
      
      * - get v1 exposure summary
      
      * - fixme
      
      * updated exposure summary repo
      
      * Adding mock dependencies that are required to instantiate the worker factories in our binding test.
      
      * Added numberOfDaysWithHighRisk and numberOfDaysWithLowRisk
      
      according to new tech spec
      
      * Transformed minimumDistinctEncountersForRisk and mostRecentDateForRisk into extension fun
      
      * make sure list of windows and aggregated result belong together
      
      * sending values for current UI
      
      * fixed ktlint
      
      * renamed ExposureResultStore
      
      * fixed tests
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Co-authored-by: default avatarBMItter <berndus@gmx.de>
      a96bb279
  14. Nov 11, 2020
    • Matthias Urhahn's avatar
      Update Risk Score more than once a day (EXPOSUREAPP-3455) (#1550) · 3e6e7b28
      Matthias Urhahn authored
      
      * 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: default avatarBMItter <46747780+BMItter@users.noreply.github.com>
      3e6e7b28
  15. Oct 30, 2020
  16. Oct 19, 2020
    • Matthias Urhahn's avatar
      Refactor missused ViewModels, support automated UI tests and screenshots (EXPOSUREAPP-2946) (#1415) · cec56fdb
      Matthias Urhahn authored
      
      * Introduced `TracingCardState` and `TracingDetailsState`.
      Removed all direct viewmodel/livedata access from all nested layouts for `TracingViewModel`.
      Removed `FormatterRiskHelper`.
      Introduced logic to reactively update the UI state if bluetooth, location or tracing state changes.
      
      TODO:
      * Finish tests in TracingCardStateTest.kt and TracingDetailsStateTest.kt
      * Finish TracingDetailsViewModel.kt and TracingCardViewModel.kt
      * Remove obsolete dependencies on TracingViewModel.kt and singletons RiskLevelRepository.kt, TracingRepository.kt
      
      * Breakthrough, cards update again.
      
      * Further cleanup of TracingViewModel.kt, TracingRepository.kt
      Still not quite there yet, too many calls going into every direction, back and forth, instead of just top->down, but we are getting there.
      We want data flow from business logic code to the UI, keep the UI KISS.
      
      * Update TracingCardState tests to account for changes
      
      * More refactoring, TracingViewModel.kt is now finally gone.
      
      * Fix risk details card, we reuse the cardviewmodel but need to overwrite the `showDetails` flag depending from where it's used.
      
      * Refactored several properties (notification related) out of SettingsViewModel/Repository
      
      * Fix injection
      
      * Refactoring submission related databinding code on the home fragment
      
      * Make TracingRepository.kt injectable and change viewmodel scoping for refresh calls to app scope.
      
      * Remove additional formatter calls from submission cards on home screen.
      
      * Refactored additional SubmissionViewModel logic into SubmissionRepository on the Homescreen.
      First UI Test is now passing.
      
      Simplified ViewModel instantiation related code.
      Prepared HomeFragment for smoother UI state changes, less reloading.
      
      * Improved home,tracing-details and tracing-settings loading behavior, less flickering.
      Fixed LiveData value assignment on background-thread.
      
      * New reactive provider for Bluetooth and Location status.
      Cleaned up ConnectivityHelper.kt partially.
      
      * Implement remaining tests, batch 1.
      
      * Implement remaining tests, batch 2.
      
      * Fix lint issues.
      
      * Removed a few codesmells and code duplication.
      Introduced Flow.shareLatest(...)
      
      * Removed unused parameters.
      
      * LINT fixes.
      
      * Fix unit test failing due to missing mocks.
      
      * Address PR comments.
      
      * Improve UI loading states, remove flickering.
      
      * Remove log spam due to polling values, add extra abort condition that checks for cancellation.
      
      Co-authored-by: default avatarralfgehrer <mail@ralfgehrer.com>
      cec56fdb
  17. Oct 14, 2020
  18. Oct 07, 2020
    • Matthias Urhahn's avatar
      Introduce VM injection for home screen and enable screen testing... · b4f32951
      Matthias Urhahn authored
      Introduce VM injection for home screen and enable screen testing (EXPOSUREAPP-2946, EXPOSUREAPP-2948) (#1320)
      
      * Rename "MainFragment" to "HomeFragment"
      Add VM injection.
      Move initial logic into VM.
      
      TODO: Move more code, write more tests.
      
      * Additional refactoring, moving logic out of the Fragment.
      Moving code into their own encapsulated routines/components.
      Use composition to reuse TracingViewModel, SettingsViewModel and SubmissionViewModel
      
      * Introduce @AppContext annotation to prevent anyone mistaking it for something else.
      
      * Add VM to RiskDetailsFragment
      
      * Simplify nested viewmodels, here: TracingViewModel.kt
      
      * Add skeletons instrumentation test skeleton for single fragments with injection and mocking.
      
      * Address PR comments.
      
      * Introduce sealed events class, + some refactoring.
      
      * Make the linter happy.
      b4f32951
  19. Oct 01, 2020
    • Matthias Urhahn's avatar
      Solve unreliable tests (#1266) · 5001d7a9
      Matthias Urhahn authored
      * Fix unreliable test.
      Random could be randomly 0 which would fail the test.
      
      * Create types for buildflavors to prevent string comparison.
      Use these build variants for specific tests.
      
      * Don't assign the times variable to a final value as it breaks tests.
      Until refactored, it's okay to recalculate this.
      
      * Remove a few sonar code smells.
      
      * Fix broken instrumentation test for key verification.
      Add matching binary, signature and pubkey from pod.
      5001d7a9
  20. Sep 18, 2020
    • Matthias Urhahn's avatar
      Revert "Interoperability to 1.5.X (#1173)" · c419ae66
      Matthias Urhahn authored
      This reverts commit 6054bf57.
      c419ae66
    • Jakob Möller's avatar
      Interoperability to 1.5.X (#1173) · 6054bf57
      Jakob Möller authored
      
      * Added first set of country flags
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added first implementation of Submission Country Selection Screen. (Currently not part of nav graph).
      Moved stuff inside of submission package into subpackages
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added missing changes to nav_graph file
      
      * Test Menu options for Country selection and Measurement (EXPOSUREAPP-2229) (#1086)
      
      * Implement country filter (#2229)
      
      * Implement measure for Risk calculation and Key Retrieval (#2229)
      
      * Some code cleanup for measureRiskLevelAndKeyRetrieval
      
      * Some code cleanup (#2229)
      
      * Implement usage of AppConfig usage for country codes (#2229)
      
      * change CURRENT_COUNTRY val to var
      
      * Suppress "LongMethod" warning (#2229)
      
      * Adjust unit tests to respect new country filter
      
      * Align with backend for app config country property name
      
      * Display total file size of keys in results (#2229)
      
      * Fix linting issue
      
      * Update strings.xml files
      
      * Do refactoring and some code clean up
      
      * Move RiskLevel and Key retrieval measurement in own class
      
      * Move code in logical classes. Remove translation in test fragment
      
      * Fix linting and Unit tests
      
      * Remove 3hour boolean check from debug class.
      
      * Refactor CountryWrapper and missing dates check.
      
      * Fix linting and Unit tests
      
      * Add Unit test for getMissingDates
      
      * Code cleanup
      
      * Hide keyboard on action
      
      * Extend statistics for api submission
      
      * Set callback to null after invoked
      
      Co-authored-by: default avatarMert Safter <mert.safter@sap.com>
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      
      * Overhaul of DiagnosisKey related Download and Caching Mechanisms (EXPOSUREAPP-2469) (#1136)
      
      * 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>
      
      * Implementation of tests for the interoperability countries selection screen (EXPOSUREAPP-2439) (#1140)
      
      * Added initial set of viewModel tests
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Fail tests on unexpected null.
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      
      Co-authored-by: default avatarKolya Opahle <k.opahle@sap.com>
      Co-authored-by: default avatarapopovsap <66370584+apopovsap@users.noreply.github.com>
      Co-authored-by: default avatarMert Safter <69803294+MertSafter@users.noreply.github.com>
      Co-authored-by: default avatarMert Safter <mert.safter@sap.com>
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Co-authored-by: default avatarMatthias Urhahn <darken@darken.eu>
      6054bf57
  21. 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>
      f7f185a3
  22. Jun 11, 2020
  23. Jun 09, 2020
  24. Jun 07, 2020
  25. Jun 04, 2020
    • ksergeevit's avatar
      Tests/util (#167) · afc10b9e
      ksergeevit authored
      * util tests
      
      * util tests
      
      * util tests + persistence tests
      
      * more persistence tests
      afc10b9e
    • ksergeevit's avatar
      Tests/util (#162) · 72847c74
      ksergeevit authored
      * util tests
      
      * util tests
      
      * util tests + persistence tests
      72847c74
  26. Jun 02, 2020
  27. May 30, 2020
Loading