Skip to content
Snippets Groups Projects
  1. Nov 16, 2020
    • BMItter's avatar
      ENFClient v2 - ExposureDetectionTracker without identifier (EXPOSUREAPP-3540) (#1605) · dcf361ab
      BMItter authored
      * Implemented the opportunity to use ExposureDetectionTracker without identifier
      
      * Old provideDiagnosisKeys = NO-OP
      
      * clean
      
      * maxLength clean
      
      * refactoring and extension function
      
      * adjusted wording
      
      * Throw UnsupportedOperationException in ENFClient in case
      
      * ktlint clean
      
      * fix tests for now
      
      * commented out Exception temporarily
      
      * adjusted enfTest -wip, throw unsupportedOperationException
      Unverified
      dcf361ab
  2. Nov 12, 2020
    • BMItter's avatar
      Enhance enf client (EXPOSUREAPP-3540) (#1584) · a5630bed
      BMItter authored
      * Implemented exposure window provider, adjusted ENF Client
      
      * Implemented new provideDiagnosisKeys to activate ExposureWindow mode, deprecated old diagnosis related content
      
      * Adjusted ENFClientTest
      
      * conflict fix - wip
      
      * test fix
      Unverified
      a5630bed
    • AlexanderAlferov's avatar
      Parse test JSON files and init unit tests with respective parameters (EXPOSUREAPP-3456) (#1575) · 3687be81
      AlexanderAlferov 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.
      
      * set old risklevelcalculation deprecated
      
      * Created skeleton for new risk calculation and aggregation
      
      * Initial
      
      * Implementing steps to aggregate results form exposure windows - wip
      
      * Address PR comments and KLints.
      
      * Fix refactoring regression.
      
      * ktlint
      
      * Json parsing
      
      * Added ExposureWindowRiskLevelConfig and ExposureWindowRiskLevelConfigMapper for new config api (not yet introduced)
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added first Implementation of exposure window based calculateRisk function
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added generics to Range.inRange
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added Ugly Hack to RiskLevelTransaction to allow for compilation during testing
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Linting and injecting RiskLevelCalculation into TestRiskLevelCalculationFragmentCWAViewModel, currently wont build because ExposureWindowRiskLevelConfig has no Provider
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Linting extravaganza
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Lint Wars Episode VI: Return of the trailing Comma
      
      * 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.
      
      * Check test cases
      
      * Simplify current concepts for making the app config observable until we have a default configuration.
      
      * Implementing steps to aggregate results form exposure windows
      
      * cleaned todo
      
      * Adjusted default values
      
      * 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.
      
      * refactored Windows aggregation
      
      * 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
      
      * removed example value
      
      * Added missing import to WorkerBinderTest
      
      * fixed unit tests
      
      * Removed auto formatting on unrelated files (revert + cherry pick in other commit)
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Implementing steps to aggregate results form exposure windows
      
      * Renamed ExposureWindowRiskLevelConfig to ExposureWindowRiskCalculationConfig
      
      * adjusted & refactored Windows aggregation
      
      * removed example Values
      
      * satisfy lint
      
      * make Aggregation work with Instant now
      
      * Use long while calculation
      
      * Added normalizedTimePerDayToRiskLevelMappingList to AppConfig
      
      * normalizedTimePerDayToRiskLevelMappingList from AppConfig
      
      * satisfy lint
      
      * Get AppConfig on init and listen for updates
      
      * exposureData to aggregatedRiskPerDateResult
      
      * Corrected name in ConfigParserTest
      
      * use instant for specific aggregation logs
      
      * satisfy CI
      
      * satisfy detekt
      
      * Mock exposure windows
      
      * Full test process
      
      * Fix gitignore
      
      * Improved logging
      
      * Correct test cases dates handling
      
      * Config fix and logs
      
      * Small clean up
      
      * fixed some naming and conversion issues with json test case parsing
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * TRL Encodings in config did not match TRL Encodings used in js example
      
      * Removing a return that broke the calculation
      
      * Actual tests and formatting
      
      * Formatting
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Co-authored-by: default avatarBMItter <Berndus@gmx.de>
      Co-authored-by: default avatarKolya Opahle <k.opahle@sap.com>
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      3687be81
  3. Nov 11, 2020
  4. Nov 10, 2020
    • Matthias Urhahn's avatar
      Improved app config handling (Identifier, local fallback) (DEV) (#1553) · 22f36224
      Matthias Urhahn authored
      
      * Add default app config as last resort fallback.
      
      * Change config type names and improve logging for HotDataFlow.kt
      
      * Run the app config retrieval on the app scope, otherwise UI unsubscription could cancel the app config retrieval.
      
      * Offer "identifier" property that can identify app configs such that subscribers know when it is considered changed.
      
      * Behavior change AppConfigProvider.kt, there is no caching/replay grace period, once the last subscription is gone, it's  last value is cleared.
      
      * Klint ;)
      
      * Add a unit test specifically for checking the default configs checkum and parsability.
      
      * Fix test breaking on CI.
      
      * Don't check the checksum for the config loaded from assets.
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      22f36224
    • Ralf Gehrer's avatar
      Update EN SDK to 1.7.2 (EXPOSUREAPP-3662) (#1566) · 08e0dc13
      Ralf Gehrer authored
      
      * Update EN SDK to 1.7.2 (EXPOSUREAPP-3662)
      
      * Upgrade Work Manager dependencies
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      08e0dc13
    • Kolya Opahle's avatar
      Determine Risk Level for Exposure Windows & Aggregation (EXPOSUREAPP-3537,... · d2f89e74
      Kolya Opahle authored
      Determine Risk Level for Exposure Windows & Aggregation (EXPOSUREAPP-3537, EXPOSUREAPP-3518) (#1546)
      
      * 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.
      
      * set old risklevelcalculation deprecated
      
      * Created skeleton for new risk calculation and aggregation
      
      * Implementing steps to aggregate results form exposure windows - wip
      
      * Address PR comments and KLints.
      
      * Fix refactoring regression.
      
      * ktlint
      
      * Added ExposureWindowRiskLevelConfig and ExposureWindowRiskLevelConfigMapper for new config api (not yet introduced)
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added first Implementation of exposure window based calculateRisk function
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added generics to Range.inRange
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added Ugly Hack to RiskLevelTransaction to allow for compilation during testing
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Linting and injecting RiskLevelCalculation into TestRiskLevelCalculationFragmentCWAViewModel, currently wont build because ExposureWindowRiskLevelConfig has no Provider
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Linting extravaganza
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Lint Wars Episode VI: Return of the trailing Comma
      
      * 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
      
      * Added missing import to WorkerBinderTest
      
      * fixed unit tests
      
      * Removed auto formatting on unrelated files (revert + cherry pick in other commit)
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Implementing steps to aggregate results form exposure windows
      
      * Renamed ExposureWindowRiskLevelConfig to ExposureWindowRiskCalculationConfig
      
      * adjusted & refactored Windows aggregation
      
      * removed example Values
      
      * satisfy lint
      
      * make Aggregation work with Instant now
      
      * Use long while calculation
      
      * Added normalizedTimePerDayToRiskLevelMappingList to AppConfig
      
      * normalizedTimePerDayToRiskLevelMappingList from AppConfig
      
      * satisfy lint
      
      * Get AppConfig on init and listen for updates
      
      * exposureData to aggregatedRiskPerDateResult
      
      * Corrected name in ConfigParserTest
      
      * use instant for specific aggregation logs
      
      * satisfy CI
      
      * satisfy detekt
      
      * exposure history exception & log adjustment
      
      * Fixed unittests for new config parser and risk levels
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      * Added some logging to the calculateRisk function and removed the suspend qualifiers as AppConfig is fetched during init
      
      Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>
      
      Co-authored-by: default avatarMatthias Urhahn <matthias.urhahn@sap.com>
      Co-authored-by: default avatarBMItter <Berndus@gmx.de>
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      d2f89e74
    • Ralf Gehrer's avatar
      Reminder to share a positive test result (EXPOSUREAPP-3551) (#1556) · 1bcf1a99
      Ralf Gehrer authored
      
      * Extend NotificationHelper with functionality to schedule repeating notifications.
      
      * Enable cancelation of recurring notifications
      
      * Only show two positive test reminders
      
      * Implement proper positive test result reminder triggers
      
      * please ktlint
      
      * Reset notification on app reset via settings
      
      * Extract positive test result notification logic in an injectable service
      
      * Add tests
      
      * Fix injection issue of NotificationReceiver
      
      * Reset states of the SubmissionRepository on app reset via settings menu
      
      * Fix ktlint issue
      
      * add more logs
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      1bcf1a99
    • janetback's avatar
      Fix typo (EXPOSUREAPP-3657) #1565 · a6b4071f
      janetback authored
      Unverified
      a6b4071f
    • Oliver Zimmerman's avatar
      "Invalid Tan" message is displayed when the TAN input screen is opened (EXPOSUREAPP-3646) (#1560) · be1656f6
      Oliver Zimmerman authored
      
      * Small change to check length of TAN before checking it's validity
      
      * Unit test adjustment to reflect changes.
      
      * Adjusted comparison to use less than operator. Additional tests.
      
      * Seperated tan valid and tan length check fore better readibility. Adjusted tests
      
      * lint fix
      
      * use new isCorrectLength in isTanValidFormat
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
      Unverified
      be1656f6
  5. Nov 09, 2020
  6. Nov 06, 2020
  7. Nov 05, 2020
    • Rituraj Sambherao's avatar
      Harmonize behavior scanning expired QR (EXPOUREAPP-2700) (#1493) · f8284112
      Rituraj Sambherao authored
      
      * Harmonization of the expired QR-Code
      
      * implmentation and refactoring of the asyncRegisterDevice method
      
      * fix detekt pipeline issue
      
      * test failing pipeline fix
      
      * QRCode Exceotion, observevent and timestamp improvements as per code reviews
      
      * removed deregistration logic from Fragment to viewModel
      
      UI Thread protection as this is important logic and should run on ViewModel
      
      * Code conflict resolution
      
      * ktlint fixes
      
      * changin the method deregisterTestFromDevice() to private
      
      * scanStatus SingleLIveEvent and relevant test cases added
      
      Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
    • chris-cwa's avatar
    • harambasicluka's avatar
      1.7.x to 1.8.x (DEV) (#1548) · 3d7bfdda
      harambasicluka authored
      1.7.x to 1.8.x (DEV)
      Unverified
      3d7bfdda
    • chris-cwa's avatar
      Merge remote-tracking branch 'origin/release/1.7.x' into 1.7.x_to_1.8.x · f33a219c
      chris-cwa authored
      # Conflicts:
      #	gradle.properties
      f33a219c
    • janetback's avatar
    • 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
    • janetback's avatar
    • janetback's avatar
    • Matthias Urhahn's avatar
      Re-add common codestyle (DEV) (#1534) · 7d3d763d
      Matthias Urhahn authored
      * CodeStyle needs to be part of the project.
      
      * Correct XML formatting.
      Unverified
      7d3d763d
Loading