Skip to content
Snippets Groups Projects
  1. May 10, 2021
    • BMItter's avatar
      Vaccination Server - Retrofit interfaces & Module (EXPOSUREAPP-6854,... · fddcaeea
      BMItter authored
      Vaccination Server - Retrofit interfaces & Module  (EXPOSUREAPP-6854, EXPOSUREAPP-6856, EXPOSUREAPP-7129) (#3099)
      
      * Create some classes
      
      * Get vaccination urls from env json
      
      * Implemented api for obtaining value sets
      
      * improved package structure, merge adjustments
      
      * Adjusted path
      
      * Share cache so one can clean it
      
      * Added certificate retrofit
      
      * Correction
      
      * satisfy CI
      
      * clean import
      
      * fix test
      
      * Fix test #2
      
      * Dont use retrofit cache for more control
      
      * Revert "Dont use retrofit cache for more control"
      
      This reverts commit 44fed1f6d5258c00f1a5db72a329cfb91b6c60fa.
      
      * Renamed vaccination url, Adjusted test
      
      * Update prod json
      
      * Changed name
      
      * Updated debug menu
      
      * Added new optional api
      
      * Update DebugOptionsFragmentViewModelTest.kt
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      fddcaeea
  2. May 03, 2021
  3. Apr 28, 2021
  4. Apr 13, 2021
  5. Apr 07, 2021
    • Chilja Gossow's avatar
      Warning package download & scheduling (EXPOSUREAPP-5695,EXPOSUREAPP-5696) (#2707) · 63050aca
      Chilja Gossow authored
      
      * download and repo
      
      * download warning packages
      
      * download warning packages
      
      * TraceTimeWarning Download, Draft2
      
      * TraceTimeWarning Download, Draft3
      
      * Offer only new warning packages via API.
      
      * Remove duplicate test menu entry.
      
      * TraceTimeWarning Download, Draft5
      
      * Adapt CheckInWarningMatcher to mark processed packages.
      
      * Fix failing unit tests.
      
      * Unit Test Skeletons
      
      * Back BackgroundScheduler non-static and injected.
      
      * Refactored and combined diagnosis and tracing periodic workers.
      
      * Fix unit test.
      
      * LINTs
      
      * Adapt marking packages as processed to upstream CheckInWarningMatcher changes.
      
      * Copy .await() from worker library to project due to being scope restricted.
      
      * unit tests
      
      * klint
      
      * klint
      
      * add TODO for matching comparison
      
      * refactor combination of results
      
      * rename
      
      * add test for combine
      
      * revert unnecessary changes
      
      * change initial result to failed
      
      * using low risk as default for lastCalculated to maintain the old behavior when no results are available
      
      * klint
      
      * Resolve merge regressions.
      
      * Fix fake check-in generation.
      
      * Handle worker refactoring gracefully, catch ClassNotFoundException.
      
      * Refactoring packages.
      
      * Refactor CheckInWarningMatcher.kt and PresenceTracingWarningTask.kt
      Move repository/database update calls to task, let the matcher only be responsible for matching.
      
      * Adjust test fragment to allow retriggering the download + matching task.
      
      * Fix refactoring regression.
      
      * Fix flaky time label test.
      
      * Fix package import.
      
      * Fix another timezone based flaky test.
      
      * Reduce nesting level to make the linter happy.
      
      * Update ROOM schema files.
      
      * Update ROOM schema files.
      
      * Refactoring.
      
      * Small naming fixes
      
      * Shorten worker IDs.
      
      * Collect BerndStylePoints™
      
      * Set tableName explicitly.
      
      * * Adjust id comparison within CheckInWarningMatcher.kt
      * Add tests for traceLocationIdHash calculation.
      * Calculate traceLocationIdHash on-demand, don't store it.
      
      * Improve trace warning task test menu output.
      
      * Remove spammy log output.
      
      * Remove unused function
      
      * Add additional TraceLocation test cases that match mock server.
      
      * Improve check-in matching log messages.
      
      * Fix duplicate overlaps and check for overlap distinctness.
      
      * Add test for config timeout value.
      
      * Remove unused test.
      
      * Use time measuring function.
      
      * Simplify error case handling for revoked metadata packages.
      
      * Turn createMatchingLaunchers into runMatchingLaunchers
      
      * Use TimeUnit.MINUTES
      
      * Remove extra deletion call.
      If there are no CheckIns, the SyncTool will have deleted all matches already.
      
      * Use flatMap instead of flatten.
      
      * Use more specific names (toCheckInWarningOverlap/toTraceTimeIntervalMatchEntity)
      
      * Revert "Remove extra deletion call. If there are no CheckIns, the SyncTool will have deleted all matches already."
      
      This reverts commit 3b0acf3d
      
      * Fix merge conflict regressions.
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Co-authored-by: default avatarAlexander Alferov <a.alferov@sap.com>
      Unverified
      63050aca
  6. Apr 06, 2021
  7. Apr 01, 2021
    • Chilja Gossow's avatar
      Risk state (EXPOSUREAPP-5697) (#2728) · 3e5563ca
      Chilja Gossow authored
      * risk calculation
      
      * risk calculation
      
      * risk calculation
      
      * refactoring
      
      * mapping tests
      
      * move risk calculation to different change list
      
      * detekt
      
      * klint
      
      * correct name
      
      * rename to presence tracing
      
      * add test
      
      * refactoring
      
      * repo
      
      * db
      
      * compare byte array
      
      * refactor guidHash
      
      * merge 2.0.x
      
      * clean up
      
      * improve performance
      
      * klint
      
      * provide risk result
      
      * add tests
      
      * detekt and klint
      
      * detekt and klint
      
      * failing checks
      
      * merge 2.0.x
      
      * adapt tests
      
      * adapt tests
      
      * adapt tests
      
      * revert unintended change
      
      * remove db
      
      * clean up
      
      * more tests
      
      * klint
      
      * db json
      
      * change package
      
      * klint
      
      * change package
      
      * change package
      
      * add tests
      
      * fix import
      
      * clean up naming
      
      * clean up naming, moe package, more tests
      
      * klint
      
      * parallel matching
      
      * parallel matching
      
      * matching
      
      * comments
      
      * comments
      
      * klint
      
      * logging
      
      * limit parallel processing to max of 4
      
      * merge
      
      * move into one file
      
      * comments
      
      * klint
      
      * change visibility
      
      * change visibility
      
      * update test menu output
      
      * klint
      
      * fix test
      
      * renaming, refactoring
      
      * add column info
      change warningPackageId type to string
      
      * fix test
      
      * fix test
      
      * db
      
      * db
      
      * db move
      
      * fix refactoring
      
      * refactor date
      
      * fix tests
      
      * fix tests
      
      * klint
      
      * detekt
      
      * fix test
      
      * clean up
      
      * clean up
      Unverified
      3e5563ca
  8. Mar 31, 2021
    • Lukas Lechner's avatar
      Basic poster template download and caching (EXPOSUREAPP-5842) (#2709) · b1220b10
      Lukas Lechner authored
      
      * Move CreateTraceLocationApiV1.kt and TraceLocationServer.kt into new sub-package
      
      * Move CreateTraceLocation DI logic into sub-package
      
      * Create infrastructure code for new Qr-Code Poster Template Endpoint
      
      * Add new url to environment
      
      * Show new URL in the Test Menu
      
      * Implement unzipping, signature verification and parsing
      
      * Add possibility to download poster template from TestMenu
      
      * Show Android Vector Drawable in TestMenu
      
      * Create QrCodePosterTemplateApiV1Test.kt
      
      * Remove non-used ProtoConverter from retrofit
      
      * Change button position in Test Fragment
      
      * Show error if something goes wrong
      
      * Improve QrCodePosterTemplateApiV1Test.kt
      
      * Create QrCodePosterTemplateServerTest.kt
      
      * Changed error message
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Co-authored-by: default avatarMohamed <mohamed.metwalli@sap.com>
      Unverified
      b1220b10
    • Lukas Lechner's avatar
      Create trace locations locally (EXPOSUREAPP-6015) (#2717) · 3c86de75
      Lukas Lechner authored
      
      * Remove Server Communication during for event creation
      
      * Fix EventRegistrationTestFragmentViewModel.kt
      
      * Make compiler happy after TraceLocation model changes
      
      * Adapt tests for TraceLocation model changes
      
      * Fix instrumentation tests
      
      * Add test for TracelocationUserInput -> TraceLocation mapper
      
      * Remove Create TraceLocation Url from Environment and Debug Options
      
      * Remove TRACE_LOCATION_VERSION constant
      
      * Do the encoding samba dance
      
      * Update room schema for event registration
      
      * Fix layout issue in debug options
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      3c86de75
    • Chilja Gossow's avatar
      Risk calculation (EXPOSUREAPP-5698) (#2660) · 170f6054
      Chilja Gossow authored
      
      * risk calculation
      
      * risk calculation
      
      * risk calculation
      
      * refactoring
      
      * mapping tests
      
      * move risk calculation to different change list
      
      * detekt
      
      * klint
      
      * correct name
      
      * rename to presence tracing
      
      * add test
      
      * refactoring
      
      * repo
      
      * db
      
      * compare byte array
      
      * refactor guidHash
      
      * merge 2.0.x
      
      * clean up
      
      * improve performance
      
      * klint
      
      * provide risk result
      
      * add tests
      
      * detekt and klint
      
      * detekt and klint
      
      * failing checks
      
      * merge 2.0.x
      
      * adapt tests
      
      * adapt tests
      
      * adapt tests
      
      * revert unintended change
      
      * remove db
      
      * clean up
      
      * more tests
      
      * klint
      
      * db json
      
      * change package
      
      * klint
      
      * change package
      
      * change package
      
      * add tests
      
      * fix import
      
      * clean up naming
      
      * clean up naming, moe package, more tests
      
      * klint
      
      * parallel matching
      
      * parallel matching
      
      * matching
      
      * comments
      
      * comments
      
      * klint
      
      * logging
      
      * limit parallel processing to max of 4
      
      * merge
      
      * move into one file
      
      * comments
      
      * klint
      
      * change visibility
      
      * change visibility
      
      * update test menu output
      
      * klint
      
      * fix test
      
      * add column info
      change warningPackageId type to string
      
      * fix test
      
      * fix test
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      170f6054
  9. Mar 23, 2021
    • Lukas Lechner's avatar
      Perform backend request to sign Trace Location (EXPOSUREAPP-5721) (#2642) · 9cdbc2a5
      Lukas Lechner authored
      
      * Create button to send event to server in Test Menu
      
      * Build TraceLocation protobuf in CreateEventTestViewModel.kt
      
      * Perform backend request to create trace locations
      
      * Store TraceLocation in database after creation
      
      * Add signature check
      
      * Add TraceLocationCreatorTest.kt
      
      * Rename function in TraceLocationServer.kt
      
      * Refactor TraceLocationServer.kt
      
      * Add Tests for TraceLocationServer.kt
      
      * Adapt code to latest protobuf changes
      
      * Fix small issue in CreateEventTestViewModel.kt
      
      * Rename Test
      
      * Add SignedTraceLocation to TraceLocation Mapper and add tests
      
      * Fix EnvironmentSetupTest.kt
      
      * Extend test in EnvironmentSetupTest.kt
      
      * Move DI related logic around clients and url to environment package
      
      * Change return type to Response<SignedTraceLocation> of retrofit interface
      
      * Address PR feedback regarding string templates
      
      * Add default values to make the creation of trace locations from the TestMenu faster and easier
      
      * Show create-trace-location url in Test Menu
      
      * Fix DebugOptionsFragmentViewModelTest.kt
      
      * Map byte representation in SignedTraceLocation to TraceLocation mapper
      
      * Delete TraceLocationVerifyResult.kt
      
      * Fix SignedTraceLocationToTraceLocationMapperTest.kt
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      9cdbc2a5
  10. Mar 08, 2021
  11. Feb 23, 2021
  12. Feb 19, 2021
  13. Jan 25, 2021
  14. Jan 11, 2021
  15. 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>
      Unverified
      665b6f21
  16. Dec 08, 2020
  17. Dec 07, 2020
    • chris-cwa's avatar
      Fixed: fields without values are visible (EXPOSUREAPP-3988) (#1808) · 20baacc9
      chris-cwa authored
      
      * fixed: fields without values are visible; + logs
      
      * detect version update, force recalc on 1.7 -> 1.8
      
      * detect version update in diagnosis keys task only
      
      * no connection type ignoring
      
      * Add test to ensure that parsing old configs from 1.7.x fails and the default fallback for 1.8.x is used.
      
      * Fix logging typo.
      
      * no wasLastDetectionPerformedRecently abort on app update
      
      * Fix lint issues
      
      * fixed condition
      
      * used shared settings
      
      * get last encounter at from enf v1 to display second line after app update while risk level calc is not finished
      
      * fixed di
      
      * fixed tests
      
      * fixed tests
      
      * fixed tests
      
      * Add unit tests for DownloadDiagnosisKeysTask.kt
      
      * fixed tests
      
      * Add tests for DownloadDiagnosisKeysSettingsTest
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Unverified
      20baacc9
  18. 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
  19. Nov 25, 2020
    • Alex Paulescu's avatar
      Removed traces of grey risk card (EXPOSUREAPP-3051) (#1699) · 86b29f73
      Alex Paulescu authored
      
      * Removed traces of grey risk card.
      
      * Removed UNKNOWN_RISK_INITIAL constant.
      
      * Removed unused method.
      
      * Removed old comments.
      
      * Introduce risklevel calculation failure state to get consistent card states.
      
      * Cleaned up the risk card states.
      Refactored "RiskLevel" to be calculated based on either result or failure reasons.
      Added the new "no internet" error card.
      
      * Updated color states.
      
      * Fixed card color issues.
      
      * Fixed detekt issues.
      
      * Remove test for deleted file.
      
      * Fix test regressions.
      
      * Fixed tests and LINTs.
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
    • Matthias Urhahn's avatar
      Persist ExposureWindow based risk level calculation results and update the UI... · 2547e10a
      Matthias Urhahn authored
      Persist ExposureWindow based risk level calculation results and update the UI (EXPOSUREAPP-3910,EXPOSUREAPP-3855) (#1705)
      
      * First draft to refactor `RiskRepository` away and persist risk level results produced by ExposureWindow calculations.
      
      TODO: Tests, Legacy data migration, Persist ExposureWindow's in tester builds.
      
      * Unit tests for refactored classes.
      
      * LINTs
      
      * First draft for legacy risk data migration.
      
      TODO: Tests.
      
      * Store exposure windows on device for tester builds and perform clean on them too after risk result deletions.
      Split RiskResultStorage such that the exposure window storage code is only available in deviceForTesters flavor builds.
      
      * simplification
      
      * no preference should return no value
      
      * Remove TODOs, singletons are refactored away ;)
      
      * Simplify RiskLevelTask interface
      
      * Split risk level storage implementations to let production (device flavor) have a NOOP for storing/deleting exposure windows.
      
      * Remove unused storage function.
      Add test skeletons.
      
      * unit test
      
      * unit test
      
      * Update risk card to show new window mode based information.
      
      * Fix test regressions.
      
      * Address PR comments.
      
      * LINTs
      
      * Everybody get's LINT for XMAS.
      
      * Finish unit tests and remove unused classes.
      
      Co-authored-by: default avatarchris-cwa <chris.cwa.sap@gmail.com>
      Unverified
      2547e10a
  20. Nov 24, 2020
  21. Nov 19, 2020
  22. Nov 16, 2020
  23. Nov 06, 2020
  24. Nov 05, 2020
    • Matthias Urhahn's avatar
      Improved AppConfig logic for 1.7.x and 1.8.x (EXPOSUREAPP-3455) (#1520) · 647848d6
      Matthias Urhahn authored
      
      * Split and hide the protobuf config behind interfaces with individual mappers responsible for creating the desired formats.
      
      * Merge branch 'release/1.7.x' into feature/3455-more-frequent-riskscore-updates-configs
      
      # Conflicts:
      #	Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/risklevel/ui/TestRiskLevelCalculationFragmentCWAViewModel.kt
      #	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/transaction/RiskLevelTransaction.kt
      #	Corona-Warn-App/src/test/java/de/rki/coronawarnapp/transaction/RiskLevelTransactionTest.kt
      
      * Make the AppConfig observable.
      Provide the server time offset.
      Offer a lastUpdatedAt timestamp.
      Add an app config specific test screen.
      Clean up test screens a bit and move debug options out of API test options.
      
      * Fix test regression due to refactoring (moved code around).
      
      * Store the server timestamp and offset at retrieval.
      Switch to config storage via json to be able to store additional meta data fields (i.e. time).
      
      * KLint and Me have a hate relationship based on both mutual admiration.
      
      * Fix time offset parsing being locale dependent.
      
      * Fix broken unit tests.
      
      * Improve offset accuracy, move before unzipping.
      
      * Fix overly long livedata subscription to results (viewmodel scope vs observer scope)
      
      * Add mapping for the new protobuf configs + tests.
      
      * For cached (retrofit) response, we need to check the cacheResponse and its timestamps
      to determine an accurate time offset.
      
      * Exposure a boolean property to tell us when a fallback config is being used.
      
      * Hide the observable flow<ConfigData> behind a method that can automatically triggers refreshes.
      
      * Use a common mapper interface.
      
      * Address PR comments and KLints.
      
      * Fix refactoring regression.
      
      * Improve config unzipping code.
      
      * Add flag to forward exception thrown during HotDataFlow.kt initialization.
      
      * Don't specify a default context via singleton.
      
      * Move download and fallback logic into it's own class just responsible for sourcing the config: "AppConfigSource".
      "AppConfigProvider" is now only responsible for making it available.
      
      * Simplify current concepts for making the app config observable until we have a default configuration.
      
      * Improve app config test screen, delete options, better feedback.
      Show toast instead of crash on errors.
      
      * Fixed GSON serialization not encoding/decoding the byte array correctly.
      Added specific type adapters for instant and duration to get cleaner json.
      
      * Remove type adapters from base gson due to conflict with CalculationTrackerStorage.
      
      * We want to default to forced serialization of instant by our converters, instead of using the default serialization which will differ
      between Java8.Instant and JodaTime.Instant, to prevent future headaches there, register explicit converters by default,
      and overwrite them if necessary (currently only needed for CalculationTrackerStorage.kt).
      
      * Improve AppConfigServer code readability by moving code into extensions.
      
      * Fix merge conflicts
      
      * Throw a more specific exception if gson type decoding fails due to malformed base64 encoding.
      
      * Add unit test for Gson ByteArrayAdapter.
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      647848d6
  25. Nov 02, 2020
  26. Oct 21, 2020
  27. 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>
      Unverified
      cec56fdb
  28. Oct 15, 2020
  29. Oct 02, 2020
    • Matthias Urhahn's avatar
      Improve API test fragment and environment switching (DEV) (#1269) · a9ae4ad8
      Matthias Urhahn authored
      
      * Define environment for each flavor and build type.
      
      * Add smart LiveData class that does async initialization (not on the main thread).
      
      * View extensions setGone/setInvisible
      
      * Refactor test for api fragment.
      
      * Replace ALT environment with a list to select from.
      
      * klint
      
      * Fix tests
      
      * Fix tests
      
      * Further flaky test fixes.
      
      * Move the debug check for isLast3HourModeEnabled to the settings.
      The KeyFileDownloader.kt shouldn't be aware of that detail.
      The settings are what is affected by the build flavors/modes.
      
      * Code cleanup and UI improvement of fragment_test_for_a_p_i.xml
      
      * Code that retries flaky tests until we found a better solution.
      Not great, Not terrible...
      
      Co-authored-by: default avatarMert Safter <mert.safter@sap.com>
      Unverified
      a9ae4ad8
  30. Sep 29, 2020
    • Matthias Urhahn's avatar
      Alternative environment setup (#1246) · b6815dc6
      Matthias Urhahn authored
      
      * Move AppConfig related code into it's own package.
      * Use "files" instead of "cache" for storing our AppConfigApiTest.
      * Add "files" to "cache" migration.
      * Refactor CDN related code into an independent "environment module".
      
      TODO: UnitTests, Fallback behavior even if cached AppConfig is stale.
      
      * Further structure refactoring and unit test for app config cache migration.
      
      * Added config fallback behavior for all cases + additional tests.
      
      * Improve code readability.
      
      * First POC for multi-environment support.
      
      * logic for ACME test Countries toggle button in Dev menu
      
      * ACME Test Countries dev menu
      
      * Additional clean up and refactoring on build constants.
      
      * Cleaned up the test fragment a bit.
      
      * Fixed detekt issue
      
      * Fix flaky test that depends on build variant.
      
      * Let the test fragment show us the actual environment we toggled to.
      
      * Changes upon review
      
      * Address PR comments.
      
      Co-authored-by: default avatarRituraj Sambherao <git.rituraj.sambherao@gmail.com>
      Unverified
      b6815dc6
  31. 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>
      Unverified
      6054bf57
  32. Sep 17, 2020
    • Matthias Urhahn's avatar
      Introduce ViewModel Injection (#1151) · e8320fdf
      Matthias Urhahn authored
      
      * DI: ViewModel (VDC) injection wiring + example in TestRiskLevelCalculation.kt
      
      * Refactoring the TestRiskLevel fragment to demo our new viewmodel approach. Part1
      
      * Refactoring the TestRiskLevel fragment to demo our new viewmodel approach. Part2
      
      * Fix `Unexpected indentation (expected 4, actual 8)`
      
      * Code fluff
      
      * klint
      
      * Remove empty test + klint
      
      * Rename VDC to CWAViewModel
      
      * Add example unit tests for the TestFragment's ViewModel.
      
      * Revert AppInjector renaming.
      
      * Comments explaining the code.
      
      * Rename class to make it's purpose less confusing.
      
      * Revert "Rename class to make it's purpose less confusing."
      
      This reverts commit c80298bb
      
      * Rename class to make it's purpose less confusing.
      
      * Simpler ViewModel Injection example.
      
      * klint <3
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Unverified
      e8320fdf
Loading