Skip to content
Snippets Groups Projects
  1. Apr 19, 2021
  2. Apr 14, 2021
  3. Apr 12, 2021
  4. 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
  5. Apr 01, 2021
  6. Mar 31, 2021
    • BMItter's avatar
      Contact Journal Event/Risk extension (EXPOSUREAPP-5413) #2696 · bc2764a2
      BMItter authored
      
      * string preparation
      
      * Use modular recycler view for dairy days, adapter, items, layouts
      
      * Use modular recycler view for dairy days - next
      
      * improved item handling
      
      * Added dividers, diff util
      
      * adjusted header logic
      
      * Added final risk event for diary, refactored ENFitem and ENFvh, cleanup
      
      * final logic for risk event diary
      
      * Adjusted baselne - diary extension
      
      * diary db migration and new attributes for event extension
      
      * cleanup, sourceCheck
      
      * clean code
      
      * Added migration tests, updated ContactDiaryDatabaseTest to utilize new attributes
      
      * Replaced recyclerview with Flow, some layout improvements
      
      * Removed unused viewholders
      
      * Fixed contact diary test
      
      * Removed debug code
      
      * Fixed broken tests
      
      * Added test for risk by event
      
      * Adjusted spacing
      
      * cleanup, missing itemDecoration
      
      * cleanup, detekt, reduced complexity
      
      * named params
      
      * Use srcCompat
      
      * replaced event with trace location
      
      * Respecting the tech spec
      
      * conflicts resolved for OverviewViewModel
      
      * source clean
      
      * fix conflicts to newest 2.0 merge
      
      * resolve merged migration test conflict
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Co-authored-by: default avatarMohamed <mohamed.metwalli@sap.com>
      Unverified
      bc2764a2
    • 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
    • Chilja Gossow's avatar
      Check-in matching (EXPOSUREAPP-5694) (#2659) · 75696a32
      Chilja Gossow authored
      
      * risk calculation
      
      * refactoring
      
      * mapping tests
      
      * move risk calculation to different change list
      
      * detekt
      
      * refactoring
      
      * compare byte array
      
      * refactor guidHash
      
      * merge 2.0.x
      
      * clean up
      
      * improve performance
      
      * klint
      
      * merge 2.0.x
      
      * adapt tests
      
      * revert unintended change
      
      * db json
      
      * change package
      
      * klint
      
      * clean up naming
      
      * parallel matching
      
      * comments
      
      * klint
      
      * limit parallel processing to max of 4
      
      * merge
      
      * move into one file
      
      * change visibility
      
      * fix test
      
      * Revert to default ENV for deviceForTestersDebug
      
      * Revert "Revert to default ENV for deviceForTestersDebug"
      
      This reverts commit e98432fc
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Unverified
      75696a32
  7. Mar 24, 2021
  8. Mar 23, 2021
  9. Mar 19, 2021
    • chris-cwa's avatar
      Update check in(EXPOSUREAPP-5886) (#2640) · b25cf2ed
      chris-cwa authored
      * updated checkin entity
      
      * updated checkin entity
      
      * satisfying tests, detekt, ktlint, circle-ci, ...
      
      * satisfying instrumented tests
      
      * fixed more unit tests, removed unnecessary null-check
      
      * renamed field
      
      * made signature base 64
      
      * fixed tests
      
      * fixed signature tests
      
      * ktlint
      
      * no more use of blob
      
      * updated repository
      
      * fixed unit tests
      
      * fixed instrumented tests
      
      * renamed tests
      
      * fixed merge conflicts
      Unverified
      b25cf2ed
  10. Mar 11, 2021
    • Lukas Lechner's avatar
      Create events repository (EXPOSUREAPP-5470) (EXPOSUREAPP-5482)(EXPOSUREAPP-5484) (#2549) · daa6c773
      Lukas Lechner authored
      * Add events card in event registration test fragment
      
      * Format
      
      * Create empty fragments and implement navigation
      
      * Create layout for CreateEventTestFragment.kt
      
      * Add spinner for event type
      
      * Build event object from input
      
      * Create database for event registration and store events in it
      
      * Fix date issue
      
      * Show stored events in a simple way
      
      * Make event list more pretty
      
      * Add button to delete all events in ShowStoredEventsTestFragment.kt
      
      * Change the functions of HostedEventRepository.kt to regular functions instead of suspend functions
      
      * Change text in EventRegistration TestFragment
      
      * Fix merge issues
      
      * Add parameters from new TechSpec
      
      * Change wording from 'hosted Events' to 'TraceLocation'
      
      * Delete event registration database on app reset
      
      * Fix detect issue 'MaxLineLength'
      
      * Remove parcelable from TraceLocationEntity.kt
      
      * Map TraceLocationEntity to TraceLocation in TraceLocationRepository
      
      * Use the Instant.seconds extension function
      
      * Use existing EventRegistrationModule.kt instead of creating a new one
      
      * Only delete traceLocations on App reset instead of all tables in TraceLocationRepository.kt
      
      * Add named parameters to TraceLocation mapping
      
      * Add unit test for TraceLocation Mapper
      
      * Add unit tests for EventRegistrationConverters
      
      * Add unit tests for TraceLocationEntity mapping
      
      * Add events database table to 'TraceLocation' database and remove 'EventRegistration' database
      
      * Add database tests for TraceLocations
      
      * Fix issue in EventRegistrationModule.kt
      
      * Add database tests for checkInDao
      
      * Fix detekt maxLineLength issue
      
      * Fix inconsistency in TraceLocationEntity.kt
      
      * Fix ktlint issues
      
      * Inherit from BaseTest or BaseTestInstrumentation in tests
      
      * Fix issue in TraceLocationConverters.kt
      Unverified
      daa6c773
  11. Mar 09, 2021
    • chris-cwa's avatar
      Checkins Repository (EXPOSUREAPP-5421) (#2547) · 424d1ada
      chris-cwa authored
      * repo for checkins
      
      * repo for checkins
      
      * renamed param
      
      * added more crud methods
      
      * added fields from new specs version
      
      * fixed ktlint issue
      
      * fixed class hierarchy
      
      * fixed UnnecessaryAbstractClass
      
      * fixed nullable types
      
      * renamed to Event* to TraceLocation* to be in sync with spec
      
      * moved database one package level up
      
      * use app scope for insert
      
      * renamed const
      
      * convert data between repo and database
      
      * removed interface for data class, renaming, housekeeping
      
      * entity is no parcel anymore
      
      * + update method in checkin repo
      Unverified
      424d1ada
  12. Feb 24, 2021
    • Chilja Gossow's avatar
      PPA Collect exposure windows (EXPOSUREAPP-4819) #2387 · 8d866ed7
      Chilja Gossow authored
      * comments
      
      * persistence
      
      * database
      
      * revert unrelated changes
      
      * revert unrelated changes
      
      * detekt
      
      * extract collector
      
      * unused
      
      * unit test donor
      
      * klint
      
      * unit tests
      
      * unit tests and db test
      
      * naming error
      
      * unmock object
      
      * clear and unmock object
      
      * make static
      
      * make static
      
      * comments and additional tests
      
      * inject probability
      
      * check for new before insert
      
      * Merge branch 'release/1.14.x' into feature/4819-exposure-window
      
      # Conflicts:
      #	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/datadonation/analytics/AnalyticsModule.kt
      
      * fix test
      
      * review comments
      
      * review comments
      
      * measure time for db insertion
      
      * adjust test
      
      * klint
      Unverified
      8d866ed7
  13. Feb 15, 2021
  14. Feb 11, 2021
  15. Jan 22, 2021
    • BMItter's avatar
      Contact Journal Risk Extension - Risk details contact overview logic &... · e3810adb
      BMItter authored
      Contact Journal Risk Extension - Risk details contact overview logic & peristance (EXPOSUREAPP-4577) (#2142)
      
      * Added AggregatedRiskPerDateResult to AggregatedRisk, Added AggregatedRiskPerDateResult to riskresult database
      
      * Added list of AggregatedRiskPerDateResult to AggregatedRisk, Added AggregatedRiskPerDateResult to riskresult db
      
      * Save aggregated risk per date results
      
      * Override aggregatedRiskPerDateResults
      
      * Delete risk level per date which are older than 2 weeks
      
      * Prepared logic to show risk level per date in contact diary overview
      
      * Test day mapping for risk result
      
      * Added tests for AggregatedRiskPerDateResultDao
      
      * Fixed layouts in contact diary overview
      
      * Show risk in overview
      
      * click adjustments
      
      * Moved logic into view model
      
      * adjusted ListItem
      
      * Added clearing of obsolete aggregated risk per date results, cleaned tests
      
      * detekt & klint clean
      
      * Added test for clearing aggregated risk per date results
      
      * avoid main thread
      
      * Performance up lift by avoiding string templates
      
      * missleading comment
      
      * adjusted filter method
      
      * We dislike flaky tests
      
      * Added testability for migration
      
      * Adjusted day count for journal
      
      * fixed test
      
      * ktlint & detekt
      
      * adjusten retention
      
      * ktlint, detekt
      
      * adjusted ContactDiaryCleanTaskTest
      
      * Add tests for aggregated risk per date result table
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      e3810adb
  16. Jan 04, 2021
  17. Dec 15, 2020
  18. 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>
      Unverified
      d96245ef
  19. 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
  20. Nov 27, 2020
  21. Oct 29, 2020
    • BMItter's avatar
      Improved crash logging & handling (EXPOSUREAPP-2572) (#1475) · be4c773d
      BMItter authored
      
      * FileLoggerPlus - RX added - preparation
      
      * Buffer config as constants
      
      * avoid empty lines
      
      * Reworked logging to file - wip
      
      * Collecting errors to dao - wip
      
      * Added crash report to app db and created module
      
      * do it
      
      * inject crashReportTree - wip
      
      * use dagger injection
      
      * retrieve short hash via gradle
      
      * removed todo
      
      * Updated database to version 2 for new ReportEntity - old base
      
      * deprecated old engagement - RX not allowed anymore
      
      * use global scope for coroutines in crash report tree - ktlint clean
      
      * added menu item - error reporter (replace later to new structure)
      
      * basic recylcerview and fragment added to menu - wip
      
      * deprecated data class
      
      * Delete CrashModel.kt
      
      * crash report list item to use data binding
      
      * separated Reporteradapter - klint clean
      
      * use separated Adapter in ReporterFragment - cleanup
      
      * Added ErrorReporterViewModel - connected data to list
      
      * dependency injection for crash report, better structure, todo cleanup
      
      * some refactoring, cleanup, ktlint
      
      * adjustments for 1.6.x
      
      * temp action to open crash report fragment
      
      * removed testcode
      
      * updated layout - wip
      
      * connected view & data
      
      * satisfy circle ci checks
      
      * plant reportingTree, testbutton, klint clean
      
      * updated layout for reporter - wip
      
      * better format and layout
      
      * better message handling
      
      * missing icons for errors on debug
      
      * Adjusted error report index
      
      * Removed ugly show button, report clickable
      
      * Added SettingsCrashReportDetailsFragment & corresponding files
      
      * fixed merge inconsistence
      
      * fixed injection overall
      
      * use livedata
      
      * details added to report - wip
      
      * beauty
      
      * share & layout root preparation
      
      * make error report shareable
      
      * removed Dispatcher.IO for example
      
      * Introduce skeleton classes for bugreporting
      
      * Refactoring, adjustments to be able to build again
      
      * Created BugEventEntity, Changed id to Long for more efficiency,  Removed unused events
      
      * refactored ui to deviceForTesters, testmenu etc
      
      * adjusted interfaces & related, better structure
      
      * uses own db, added converter, adjusted modules
      
      * adjusted bugrepo, defaultbugrepo
      
      * shared report, better visualisation
      
      * changed crash db name
      
      * Implemented DefaultBugRepository
      
      * Added device info to BugEvent, BugReporter collects Tag, Added default impl of BugEvent etc
      
      * corrected bug in RollingLogHistory
      
      * removed deprecated crash package
      
      * quickfix - wip
      
      * cleanup
      
      * cleanUp, adjusted simulation button to new structure
      
      * moved bug related layouts to deviceForTesters package
      
      * removed old RX dependenies and related context
      
      * fix build for deviceDebug
      
      * lint clean
      
      * current set of relevant exceptions as before
      
      * attach log to output
      
      * improved output
      
      * Delete obsolet ic_bug in main
      
      * Delete ic_coffee.xml
      
      * changed shortID to shortCommitHash for better transparency
      
      * companion to bottom
      
      * removed string encapsulation
      
      * cleanup unused import and blank line - PR Comment
      
      * typo fixed
      
      * rm empty line
      
      * removed relict module
      
      * layout fix
      
      * adjusted unrelated method call
      
      * fixed package inkonsistence
      
      * Use flow instead of livedata in non-ui
      
      * better fun naming
      
      * Replaced interface with inline listener
      
      * Improved SettingsCrashReportDetailsFragment and SettingsCrashReportViewModel, formatting adjusted
      
      * cleaned converter
      
      * Delete Project.xml
      
      * added log statement to DefaultBugRepository
      
      * adjusted magical number
      
      * Use CommonConverters instead of unique Converters in BugDatabase
      
      * Extension function for the resuce -defaultBugRepository
      
      * removed FormatterCrashReport completly
      
      * changed long to UUID
      
      * satisfy buggy ktlint checks
      
      * Update SettingsCrashReportViewModel.kt
      
      use postvalue
      
      * avoid passing viewmodel
      
      * store appVersionCode as Long for beeing futuresave
      
      * Update SettingsCrashReportViewModel.kt
      
      removed lazy init
      
      * Changed BugDatabase to factory pattern
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      be4c773d
  22. 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
  23. 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>
      Unverified
      f7f185a3
  24. Jun 07, 2020
Loading