From 4b49d27917472028f8260789c8b5f62d1a40bb67 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 16 Jun 2021 09:37:07 +0300 Subject: [PATCH 01/15] Give more appropriate name of current 'consent' HealthUser setting -> 'consentTestResults' (#661). --- lib/model/Health.dart | 14 +-- lib/service/Analytics.dart | 90 +++++++++---------- lib/service/Health.dart | 10 +-- .../OnboardingHealthConsentPanel.dart | 12 +-- lib/ui/settings/SettingsHomePanel.dart | 16 ++-- lib/ui/settings2/Settings2ConsentPanel.dart | 8 +- lib/ui/settings2/Settings2HomePanel.dart | 2 +- 7 files changed, 76 insertions(+), 76 deletions(-) diff --git a/lib/model/Health.dart b/lib/model/Health.dart index 4c1683fe..c95d32e0 100644 --- a/lib/model/Health.dart +++ b/lib/model/Health.dart @@ -1227,7 +1227,7 @@ class HealthUser { String uuid; String publicKeyString; PublicKey _publicKey; - bool consent; + bool consentTestResults; bool exposureNotification; bool repost; List accounts; @@ -1237,7 +1237,7 @@ class HealthUser { HealthUserAccount defaultAccount; Map accountsMap; - HealthUser({this.uuid, this.publicKeyString, PublicKey publicKey, this.consent, this.exposureNotification, this.repost, this.accounts, this.encryptedKey, this.encryptedBlob}) { + HealthUser({this.uuid, this.publicKeyString, PublicKey publicKey, this.consentTestResults, this.exposureNotification, this.repost, this.accounts, this.encryptedKey, this.encryptedBlob}) { _publicKey = publicKey; accountsMap = HealthUserAccount.mapFromList(accounts); defaultAccount = HealthUserAccount.defaultInList(accounts); @@ -1247,7 +1247,7 @@ class HealthUser { return (json != null) ? HealthUser( uuid: json['uuid'], publicKeyString: json['public_key'], - consent: json['consent'], + consentTestResults: json['consent'], exposureNotification: json['exposure_notification'], repost: json['re_post'], accounts: HealthUserAccount.listFromJson(json['accounts']), @@ -1260,7 +1260,7 @@ class HealthUser { return { 'uuid': uuid, 'public_key': publicKeyString, - 'consent': consent, + 'consent': consentTestResults, 'exposure_notification': exposureNotification, 're_post': repost, 'accounts': HealthUserAccount.listToJson(accounts), @@ -1273,7 +1273,7 @@ class HealthUser { o is HealthUser && o.uuid == uuid && o.publicKeyString == publicKeyString && - o.consent == consent && + o.consentTestResults == consentTestResults && o.exposureNotification == exposureNotification && o.repost == repost && ListEquality().equals(o.accounts, accounts) && @@ -1283,7 +1283,7 @@ class HealthUser { int get hashCode => (uuid?.hashCode ?? 0) ^ (publicKeyString?.hashCode ?? 0) ^ - (consent?.hashCode ?? 0) ^ + (consentTestResults?.hashCode ?? 0) ^ (exposureNotification?.hashCode ?? 0) ^ (repost?.hashCode ?? 0) ^ ListEquality().hash(accounts) ^ @@ -1304,7 +1304,7 @@ class HealthUser { uuid: user.uuid, publicKeyString: user.publicKeyString, publicKey: user.publicKey, - consent: user.consent, + consentTestResults: user.consentTestResults, exposureNotification: user.exposureNotification, repost: user.repost, accounts: user.accounts, diff --git a/lib/service/Analytics.dart b/lib/service/Analytics.dart index 7926781a..a886808f 100644 --- a/lib/service/Analytics.dart +++ b/lib/service/Analytics.dart @@ -186,51 +186,51 @@ class Analytics with Service implements NotificationsListener { static const String LogDocumentScanResult = "result"; // Health - static const String LogHealthEventName = "health"; - static const String LogHealthActionName = "action"; - static const String LogHealthStatusChangedAction = "status_changed"; - static const String LogHealthSettingChangedAction = "setting_changed"; - static const String LogHealthProviderTestProcessedAction = "provider_test_processed"; - static const String LogHealthManualTestSubmittedAction = "manual_test_submitted"; - static const String LogHealthSymptomsSubmittedAction = "symptoms_submitted"; - static const String LogHealthContactTraceProcessedAction = "contact_trace_processed"; - static const String LogHealthContactTraceTestAction = "contact_trace_test"; - static const String LogHealthActionProcessedAction = "action_processed"; - static const String LogHealthVaccinationAction = "vaccination"; - static const String LogHealthReportExposuresAction = "report_exposures"; - static const String LogHealthCheckExposuresAction = "check_exposures"; - static const String LogHealthExposureStatisticsAction = "exposure_statistics"; - static const String LogHealthStatusName = "status"; - static const String LogHealthPrevStatusName = "previous_status"; - static const String LogHealthSettingNotifyExposuresName = "notify_exposures"; - static const String LogHealthSettingConsentName = "consent_test_results"; - static const String LogHealthProviderName = "provider"; - static const String LogHealthLocationName = "location"; - static const String LogHealthTestTypeName = "test_type"; - static const String LogHealthTestResultName = "test_result"; - static const String LogHealthSymptomsName = "symptoms"; - static const String LogHealthDurationName = "duration"; - static const String LogHealthExposureTimestampName = "exposure_timestamp"; - static const String LogHealthVaccineName = "vaccine"; - static const String LogHealthActionTypeName = "action_type"; - static const String LogHealthActionTitleName = "action_title"; - static const String LogHealthActionTextName = "action_text"; - static const String LogHealthActionParamsName = "action_params"; - static const String LogHealthActionTimestampName = "action_timestamp"; - static const String LogHealthExposureScoreName = "exposure_score"; - static const String LogRpiSeen6HoursName = "rpi_seen_6_hour"; - static const String LogRpiSeen24HoursName = "rpi_seen_24_hour"; - static const String LogRpiSeen168HoursName = "rpi_seen_168_hour"; - static const String LogRpiMatches6HoursName = "rpi_matches_6_hour"; - static const String LogRpiMatches24HoursName = "rpi_matches_24_hour"; - static const String LogRpiMatches168HoursName = "rpi_matches_168_hour"; - static const String LogExposureUpTime6HoursName = "exposure_uptime_6_hour"; - static const String LogExposureUpTime24HoursName = "exposure_uptime_24_hour"; - static const String LogExposureUpTime168HoursName = "exposure_uptime_168_hour"; - static const String LogTestFrequency168HoursName = "test_frequency_168_hour"; - static const String LogExposureNotification168HoursName = "exposure_notification_168_hour"; - static const String LogTestResult168HoursName = "test_result_168_hour"; - static const String LogEpochName = "epoch"; + static const String LogHealthEventName = "health"; + static const String LogHealthActionName = "action"; + static const String LogHealthStatusChangedAction = "status_changed"; + static const String LogHealthSettingChangedAction = "setting_changed"; + static const String LogHealthProviderTestProcessedAction = "provider_test_processed"; + static const String LogHealthManualTestSubmittedAction = "manual_test_submitted"; + static const String LogHealthSymptomsSubmittedAction = "symptoms_submitted"; + static const String LogHealthContactTraceProcessedAction = "contact_trace_processed"; + static const String LogHealthContactTraceTestAction = "contact_trace_test"; + static const String LogHealthActionProcessedAction = "action_processed"; + static const String LogHealthVaccinationAction = "vaccination"; + static const String LogHealthReportExposuresAction = "report_exposures"; + static const String LogHealthCheckExposuresAction = "check_exposures"; + static const String LogHealthExposureStatisticsAction = "exposure_statistics"; + static const String LogHealthStatusName = "status"; + static const String LogHealthPrevStatusName = "previous_status"; + static const String LogHealthSettingNotifyExposuresName = "notify_exposures"; + static const String LogHealthSettingConsentTestResultsName = "consent_test_results"; + static const String LogHealthProviderName = "provider"; + static const String LogHealthLocationName = "location"; + static const String LogHealthTestTypeName = "test_type"; + static const String LogHealthTestResultName = "test_result"; + static const String LogHealthSymptomsName = "symptoms"; + static const String LogHealthDurationName = "duration"; + static const String LogHealthExposureTimestampName = "exposure_timestamp"; + static const String LogHealthVaccineName = "vaccine"; + static const String LogHealthActionTypeName = "action_type"; + static const String LogHealthActionTitleName = "action_title"; + static const String LogHealthActionTextName = "action_text"; + static const String LogHealthActionParamsName = "action_params"; + static const String LogHealthActionTimestampName = "action_timestamp"; + static const String LogHealthExposureScoreName = "exposure_score"; + static const String LogRpiSeen6HoursName = "rpi_seen_6_hour"; + static const String LogRpiSeen24HoursName = "rpi_seen_24_hour"; + static const String LogRpiSeen168HoursName = "rpi_seen_168_hour"; + static const String LogRpiMatches6HoursName = "rpi_matches_6_hour"; + static const String LogRpiMatches24HoursName = "rpi_matches_24_hour"; + static const String LogRpiMatches168HoursName = "rpi_matches_168_hour"; + static const String LogExposureUpTime6HoursName = "exposure_uptime_6_hour"; + static const String LogExposureUpTime24HoursName = "exposure_uptime_24_hour"; + static const String LogExposureUpTime168HoursName = "exposure_uptime_168_hour"; + static const String LogTestFrequency168HoursName = "test_frequency_168_hour"; + static const String LogExposureNotification168HoursName = "exposure_notification_168_hour"; + static const String LogTestResult168HoursName = "test_result_168_hour"; + static const String LogEpochName = "epoch"; // Event Attributes static const String LogAttributeUrl = "url"; diff --git a/lib/service/Health.dart b/lib/service/Health.dart index 77ea6132..50b9550d 100644 --- a/lib/service/Health.dart +++ b/lib/service/Health.dart @@ -419,7 +419,7 @@ class Health with Service implements NotificationsListener { return false; } - Future loginUser({bool consent, bool exposureNotification, AsymmetricKeyPair keys}) async { + Future loginUser({bool consentTestResults, bool exposureNotification, AsymmetricKeyPair keys}) async { if (!this._isUserAuthenticated) { return null; @@ -462,10 +462,10 @@ class Health with Service implements NotificationsListener { // Consent Map analyticsSettingsAttributes = {}; - if (consent != null) { - if (consent != user.consent) { - analyticsSettingsAttributes[Analytics.LogHealthSettingConsentName] = consent; - user.consent = consent; + if (consentTestResults != null) { + if (consentTestResults != user.consentTestResults) { + analyticsSettingsAttributes[Analytics.LogHealthSettingConsentTestResultsName] = consentTestResults; + user.consentTestResults = consentTestResults; userUpdated = true; } } diff --git a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart index ba5a37ac..37f2bb3d 100644 --- a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart +++ b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart @@ -49,7 +49,7 @@ class OnboardingHealthConsentPanel extends StatefulWidget with OnboardingPanel { class _OnboardingHealthConsentPanelState extends State{ bool _loading = false; bool _exposureNotification = false; - bool _consent = true; + bool _consentTestResults = true; bool _canContinue = false; bool _permissionsRequested = false; ScrollController _scrollController; @@ -60,8 +60,8 @@ class _OnboardingHealthConsentPanelState extends State implements Notifi }); } - void _updateHealthUser({bool consent, bool exposureNotification}){ + void _updateHealthUser({bool consentTestResults, bool exposureNotification}){ setState(() { _refreshingHealthUser = true; }); - Health().loginUser(consent: consent, exposureNotification: exposureNotification).then((_) { + Health().loginUser(consentTestResults: consentTestResults, exposureNotification: exposureNotification).then((_) { if (mounted) { setState(() { _refreshingHealthUser = false; @@ -704,9 +704,9 @@ class _SettingsHomePanelState extends State implements Notifi height: null, borderRadius: borderRadius, label: Localization().getStringEx("panel.settings.home.covid19.provider_test_result", "Health Provider Test Results and Vaccine Information"), - toggled: (Health().user?.consent == true), + toggled: (Health().user?.consentTestResults == true), context: context, - onTap: _onProviderTestResult)); + onTap: _onConsentTestResult)); } else if (code == 'qr_code') { contentList.add(Padding(padding: EdgeInsets.only(left: 8, top: 16), child: _buildCovid19KeysSection(),)); @@ -901,11 +901,11 @@ class _SettingsHomePanelState extends State implements Notifi } } - void _onProviderTestResult() { + void _onConsentTestResult() { if (Connectivity().isNotOffline) { - Analytics.instance.logSelect(target: "Health Provider Test Results"); - bool consent = Health().user?.consent ?? false; - _updateHealthUser(consent: !consent); + Analytics.instance.logSelect(target: "Consent Test Results"); + bool consentTestResults = Health().user?.consentTestResults ?? false; + _updateHealthUser(consentTestResults: !consentTestResults); } else { AppAlert.showOfflineMessage(context); } diff --git a/lib/ui/settings2/Settings2ConsentPanel.dart b/lib/ui/settings2/Settings2ConsentPanel.dart index 3adfc927..401f695c 100644 --- a/lib/ui/settings2/Settings2ConsentPanel.dart +++ b/lib/ui/settings2/Settings2ConsentPanel.dart @@ -73,9 +73,9 @@ class _Settings2ConsentPanelState extends State implement height: null, border: Border.all(width: 1, color: Styles().colors.surfaceAccent), borderRadius: BorderRadius.all(Radius.circular(4)), - toggled: Health().user.consent, + toggled: Health().user.consentTestResults, onTap: (){ - if(!Health().user.consent){ + if(!Health().user.consentTestResults){ _onConsentEnabled(); } else{ @@ -214,7 +214,7 @@ class _Settings2ConsentPanelState extends State implement _setState((){ _isDisabling = true; }); - Health().loginUser(consent: false).whenComplete((){ + Health().loginUser(consentTestResults: false).whenComplete((){ _setState((){ _isDisabling = false; }); @@ -229,7 +229,7 @@ class _Settings2ConsentPanelState extends State implement setState((){ _isEnabling = true; }); - Health().loginUser(consent: true).whenComplete((){ + Health().loginUser(consentTestResults: true).whenComplete((){ setState((){ _isEnabling = false; }); diff --git a/lib/ui/settings2/Settings2HomePanel.dart b/lib/ui/settings2/Settings2HomePanel.dart index 31e11777..62a34886 100644 --- a/lib/ui/settings2/Settings2HomePanel.dart +++ b/lib/ui/settings2/Settings2HomePanel.dart @@ -198,7 +198,7 @@ class _Settings2HomePanelState extends State implements Noti Container(height: 12,), CustomRibbonButton( height: null, - value: (Health().user?.consent ?? false) ? 'Enabled' : 'Disabled', + value: (Health().user?.consentTestResults ?? false) ? 'Enabled' : 'Disabled', borderRadius: BorderRadius.all(Radius.circular(4)), label: 'Automatic Test Results', descriptionLabel: 'Learn more information about automatic test results and manage your settings.', From ba44e514b39dd1134ecc732d0925040ff9f557d9 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 16 Jun 2021 09:48:09 +0300 Subject: [PATCH 02/15] Give more appropriate name of current 'exposureNotification' HealthUser setting -> 'consentExposureNotification' (#661). --- lib/model/Health.dart | 14 +-- lib/service/Analytics.dart | 90 +++++++++---------- lib/service/Exposure.dart | 6 +- lib/service/Health.dart | 16 ++-- .../OnboardingHealthConsentPanel.dart | 14 +-- lib/ui/settings/SettingsHomePanel.dart | 18 ++-- .../Settings2ExposureNotificationsPanel.dart | 8 +- lib/ui/settings2/Settings2HomePanel.dart | 10 +-- 8 files changed, 88 insertions(+), 88 deletions(-) diff --git a/lib/model/Health.dart b/lib/model/Health.dart index c95d32e0..453c15a9 100644 --- a/lib/model/Health.dart +++ b/lib/model/Health.dart @@ -1228,7 +1228,7 @@ class HealthUser { String publicKeyString; PublicKey _publicKey; bool consentTestResults; - bool exposureNotification; + bool consentExposureNotification; bool repost; List accounts; String encryptedKey; @@ -1237,7 +1237,7 @@ class HealthUser { HealthUserAccount defaultAccount; Map accountsMap; - HealthUser({this.uuid, this.publicKeyString, PublicKey publicKey, this.consentTestResults, this.exposureNotification, this.repost, this.accounts, this.encryptedKey, this.encryptedBlob}) { + HealthUser({this.uuid, this.publicKeyString, PublicKey publicKey, this.consentTestResults, this.consentExposureNotification, this.repost, this.accounts, this.encryptedKey, this.encryptedBlob}) { _publicKey = publicKey; accountsMap = HealthUserAccount.mapFromList(accounts); defaultAccount = HealthUserAccount.defaultInList(accounts); @@ -1248,7 +1248,7 @@ class HealthUser { uuid: json['uuid'], publicKeyString: json['public_key'], consentTestResults: json['consent'], - exposureNotification: json['exposure_notification'], + consentExposureNotification: json['exposure_notification'], repost: json['re_post'], accounts: HealthUserAccount.listFromJson(json['accounts']), encryptedKey: json['encrypted_key'], @@ -1261,7 +1261,7 @@ class HealthUser { 'uuid': uuid, 'public_key': publicKeyString, 'consent': consentTestResults, - 'exposure_notification': exposureNotification, + 'exposure_notification': consentExposureNotification, 're_post': repost, 'accounts': HealthUserAccount.listToJson(accounts), 'encrypted_key': encryptedKey, @@ -1274,7 +1274,7 @@ class HealthUser { o.uuid == uuid && o.publicKeyString == publicKeyString && o.consentTestResults == consentTestResults && - o.exposureNotification == exposureNotification && + o.consentExposureNotification == consentExposureNotification && o.repost == repost && ListEquality().equals(o.accounts, accounts) && o.encryptedKey == encryptedKey && @@ -1284,7 +1284,7 @@ class HealthUser { (uuid?.hashCode ?? 0) ^ (publicKeyString?.hashCode ?? 0) ^ (consentTestResults?.hashCode ?? 0) ^ - (exposureNotification?.hashCode ?? 0) ^ + (consentExposureNotification?.hashCode ?? 0) ^ (repost?.hashCode ?? 0) ^ ListEquality().hash(accounts) ^ (encryptedKey?.hashCode ?? 0) ^ @@ -1305,7 +1305,7 @@ class HealthUser { publicKeyString: user.publicKeyString, publicKey: user.publicKey, consentTestResults: user.consentTestResults, - exposureNotification: user.exposureNotification, + consentExposureNotification: user.consentExposureNotification, repost: user.repost, accounts: user.accounts, encryptedKey: user.encryptedKey, diff --git a/lib/service/Analytics.dart b/lib/service/Analytics.dart index a886808f..66c0609d 100644 --- a/lib/service/Analytics.dart +++ b/lib/service/Analytics.dart @@ -186,51 +186,51 @@ class Analytics with Service implements NotificationsListener { static const String LogDocumentScanResult = "result"; // Health - static const String LogHealthEventName = "health"; - static const String LogHealthActionName = "action"; - static const String LogHealthStatusChangedAction = "status_changed"; - static const String LogHealthSettingChangedAction = "setting_changed"; - static const String LogHealthProviderTestProcessedAction = "provider_test_processed"; - static const String LogHealthManualTestSubmittedAction = "manual_test_submitted"; - static const String LogHealthSymptomsSubmittedAction = "symptoms_submitted"; - static const String LogHealthContactTraceProcessedAction = "contact_trace_processed"; - static const String LogHealthContactTraceTestAction = "contact_trace_test"; - static const String LogHealthActionProcessedAction = "action_processed"; - static const String LogHealthVaccinationAction = "vaccination"; - static const String LogHealthReportExposuresAction = "report_exposures"; - static const String LogHealthCheckExposuresAction = "check_exposures"; - static const String LogHealthExposureStatisticsAction = "exposure_statistics"; - static const String LogHealthStatusName = "status"; - static const String LogHealthPrevStatusName = "previous_status"; - static const String LogHealthSettingNotifyExposuresName = "notify_exposures"; - static const String LogHealthSettingConsentTestResultsName = "consent_test_results"; - static const String LogHealthProviderName = "provider"; - static const String LogHealthLocationName = "location"; - static const String LogHealthTestTypeName = "test_type"; - static const String LogHealthTestResultName = "test_result"; - static const String LogHealthSymptomsName = "symptoms"; - static const String LogHealthDurationName = "duration"; - static const String LogHealthExposureTimestampName = "exposure_timestamp"; - static const String LogHealthVaccineName = "vaccine"; - static const String LogHealthActionTypeName = "action_type"; - static const String LogHealthActionTitleName = "action_title"; - static const String LogHealthActionTextName = "action_text"; - static const String LogHealthActionParamsName = "action_params"; - static const String LogHealthActionTimestampName = "action_timestamp"; - static const String LogHealthExposureScoreName = "exposure_score"; - static const String LogRpiSeen6HoursName = "rpi_seen_6_hour"; - static const String LogRpiSeen24HoursName = "rpi_seen_24_hour"; - static const String LogRpiSeen168HoursName = "rpi_seen_168_hour"; - static const String LogRpiMatches6HoursName = "rpi_matches_6_hour"; - static const String LogRpiMatches24HoursName = "rpi_matches_24_hour"; - static const String LogRpiMatches168HoursName = "rpi_matches_168_hour"; - static const String LogExposureUpTime6HoursName = "exposure_uptime_6_hour"; - static const String LogExposureUpTime24HoursName = "exposure_uptime_24_hour"; - static const String LogExposureUpTime168HoursName = "exposure_uptime_168_hour"; - static const String LogTestFrequency168HoursName = "test_frequency_168_hour"; - static const String LogExposureNotification168HoursName = "exposure_notification_168_hour"; - static const String LogTestResult168HoursName = "test_result_168_hour"; - static const String LogEpochName = "epoch"; + static const String LogHealthEventName = "health"; + static const String LogHealthActionName = "action"; + static const String LogHealthStatusChangedAction = "status_changed"; + static const String LogHealthSettingChangedAction = "setting_changed"; + static const String LogHealthProviderTestProcessedAction = "provider_test_processed"; + static const String LogHealthManualTestSubmittedAction = "manual_test_submitted"; + static const String LogHealthSymptomsSubmittedAction = "symptoms_submitted"; + static const String LogHealthContactTraceProcessedAction = "contact_trace_processed"; + static const String LogHealthContactTraceTestAction = "contact_trace_test"; + static const String LogHealthActionProcessedAction = "action_processed"; + static const String LogHealthVaccinationAction = "vaccination"; + static const String LogHealthReportExposuresAction = "report_exposures"; + static const String LogHealthCheckExposuresAction = "check_exposures"; + static const String LogHealthExposureStatisticsAction = "exposure_statistics"; + static const String LogHealthStatusName = "status"; + static const String LogHealthPrevStatusName = "previous_status"; + static const String LogHealthSettingConsentTestResultsName = "consent_test_results"; + static const String LogHealthSettingConsentExposureNotifName = "notify_exposures"; + static const String LogHealthProviderName = "provider"; + static const String LogHealthLocationName = "location"; + static const String LogHealthTestTypeName = "test_type"; + static const String LogHealthTestResultName = "test_result"; + static const String LogHealthSymptomsName = "symptoms"; + static const String LogHealthDurationName = "duration"; + static const String LogHealthExposureTimestampName = "exposure_timestamp"; + static const String LogHealthVaccineName = "vaccine"; + static const String LogHealthActionTypeName = "action_type"; + static const String LogHealthActionTitleName = "action_title"; + static const String LogHealthActionTextName = "action_text"; + static const String LogHealthActionParamsName = "action_params"; + static const String LogHealthActionTimestampName = "action_timestamp"; + static const String LogHealthExposureScoreName = "exposure_score"; + static const String LogRpiSeen6HoursName = "rpi_seen_6_hour"; + static const String LogRpiSeen24HoursName = "rpi_seen_24_hour"; + static const String LogRpiSeen168HoursName = "rpi_seen_168_hour"; + static const String LogRpiMatches6HoursName = "rpi_matches_6_hour"; + static const String LogRpiMatches24HoursName = "rpi_matches_24_hour"; + static const String LogRpiMatches168HoursName = "rpi_matches_168_hour"; + static const String LogExposureUpTime6HoursName = "exposure_uptime_6_hour"; + static const String LogExposureUpTime24HoursName = "exposure_uptime_24_hour"; + static const String LogExposureUpTime168HoursName = "exposure_uptime_168_hour"; + static const String LogTestFrequency168HoursName = "test_frequency_168_hour"; + static const String LogExposureNotification168HoursName = "exposure_notification_168_hour"; + static const String LogTestResult168HoursName = "test_result_168_hour"; + static const String LogEpochName = "epoch"; // Event Attributes static const String LogAttributeUrl = "url"; diff --git a/lib/service/Exposure.dart b/lib/service/Exposure.dart index 79479c63..bf086ae7 100644 --- a/lib/service/Exposure.dart +++ b/lib/service/Exposure.dart @@ -264,7 +264,7 @@ class Exposure with Service implements NotificationsListener { bool get _serviceEnabled { return (Config().settings['covid19ExposureMonitorEnabled'] == true) && - (Health().userExposureNotification == true); + (Health().userConsentExposureNotification == true); } bool get _pluginEnabled { @@ -1138,7 +1138,7 @@ class Exposure with Service implements NotificationsListener { } else if (exposures.isEmpty || reportedTEKs.isEmpty) { // no ContactWithPositive or PassedExposureScoring - return _buildTestResultExposureScoring(hasExposureNotificationsEnabled: Health().userExposureNotification); + return _buildTestResultExposureScoring(hasExposureNotificationsEnabled: Health().userConsentExposureNotification); } bool hasContactWithPositive, hasPassedExposureScoring; @@ -1165,7 +1165,7 @@ class Exposure with Service implements NotificationsListener { return _buildTestResultExposureScoring( hasContactWithPositive: hasContactWithPositive, hasPassedExposureScoring: hasPassedExposureScoring, - hasExposureNotificationsEnabled: Health().userExposureNotification); + hasExposureNotificationsEnabled: Health().userConsentExposureNotification); } static int _buildTestResultExposureScoring({bool hasContactWithPositive, bool hasPassedExposureScoring, bool hasExposureNotificationsEnabled}) { diff --git a/lib/service/Health.dart b/lib/service/Health.dart index 50b9550d..411a3121 100644 --- a/lib/service/Health.dart +++ b/lib/service/Health.dart @@ -326,8 +326,8 @@ class Health with Service implements NotificationsListener { return this._isUserAuthenticated && (_user != null); } - bool get userExposureNotification { - return this.isUserLoggedIn && (_user?.exposureNotification ?? false); + bool get userConsentExposureNotification { + return this.isUserLoggedIn && (_user?.consentExposureNotification ?? false); } // User @@ -419,7 +419,7 @@ class Health with Service implements NotificationsListener { return false; } - Future loginUser({bool consentTestResults, bool exposureNotification, AsymmetricKeyPair keys}) async { + Future loginUser({bool consentTestResults, bool consentExposureNotification, AsymmetricKeyPair keys}) async { if (!this._isUserAuthenticated) { return null; @@ -471,10 +471,10 @@ class Health with Service implements NotificationsListener { } // Exposure Notification - if (exposureNotification != null) { - if (exposureNotification != user.exposureNotification) { - analyticsSettingsAttributes[Analytics.LogHealthSettingNotifyExposuresName] = exposureNotification; - user.exposureNotification = exposureNotification; + if (consentExposureNotification != null) { + if (consentExposureNotification != user.consentExposureNotification) { + analyticsSettingsAttributes[Analytics.LogHealthSettingConsentExposureNotifName] = consentExposureNotification; + user.consentExposureNotification = consentExposureNotification; userUpdated = true; } } @@ -504,7 +504,7 @@ class Health with Service implements NotificationsListener { Analytics().logHealth( action: Analytics.LogHealthSettingChangedAction, attributes: analyticsSettingsAttributes, defaultAttributes: Analytics.DefaultAttributes); } - if (exposureNotification == true) { + if (consentExposureNotification == true) { if (BluetoothServices().status == BluetoothStatus.PermissionNotDetermined) { await BluetoothServices().requestStatus(); } diff --git a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart index 37f2bb3d..4f070be8 100644 --- a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart +++ b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart @@ -48,7 +48,7 @@ class OnboardingHealthConsentPanel extends StatefulWidget with OnboardingPanel { class _OnboardingHealthConsentPanelState extends State{ bool _loading = false; - bool _exposureNotification = false; + bool _consentExposureNotification = false; bool _consentTestResults = true; bool _canContinue = false; bool _permissionsRequested = false; @@ -60,7 +60,7 @@ class _OnboardingHealthConsentPanelState extends State implements Notifi }); } - void _updateHealthUser({bool consentTestResults, bool exposureNotification}){ + void _updateHealthUser({bool consentTestResults, bool consentExposureNotification}){ setState(() { _refreshingHealthUser = true; }); - Health().loginUser(consentTestResults: consentTestResults, exposureNotification: exposureNotification).then((_) { + Health().loginUser(consentTestResults: consentTestResults, consentExposureNotification: consentExposureNotification).then((_) { if (mounted) { setState(() { _refreshingHealthUser = false; @@ -695,9 +695,9 @@ class _SettingsHomePanelState extends State implements Notifi height: null, borderRadius: borderRadius, label: Localization().getStringEx("panel.settings.home.covid19.exposure_notifications", "Exposure Notifications"), - toggled: (Health().user?.exposureNotification == true), + toggled: (Health().user?.consentExposureNotification == true), context: context, - onTap: _onExposureNotifications)); + onTap: _onConsentExposureNotifications)); } else if (code == 'provider_test_result') { contentList.add(ToggleRibbonButton( @@ -873,18 +873,18 @@ class _SettingsHomePanelState extends State implements Notifi } - void _onExposureNotifications() { + void _onConsentExposureNotifications() { if (Connectivity().isNotOffline) { Analytics.instance.logSelect(target: "Exposure Notifications"); - bool exposureNotification = Health().user?.exposureNotification ?? false; - if (Platform.isIOS && (exposureNotification != true) && (_permissionsRequested != true)) { + bool consentExposureNotification = Health().user?.consentExposureNotification ?? false; + if (Platform.isIOS && (consentExposureNotification != true) && (_permissionsRequested != true)) { _permissionsRequested = true; _requestPermisions().then((_) { - _updateHealthUser(exposureNotification: !exposureNotification); + _updateHealthUser(consentExposureNotification: !consentExposureNotification); }); } else { - _updateHealthUser(exposureNotification: !exposureNotification); + _updateHealthUser(consentExposureNotification: !consentExposureNotification); } } else { AppAlert.showOfflineMessage(context); diff --git a/lib/ui/settings2/Settings2ExposureNotificationsPanel.dart b/lib/ui/settings2/Settings2ExposureNotificationsPanel.dart index 503f38eb..cc573de8 100644 --- a/lib/ui/settings2/Settings2ExposureNotificationsPanel.dart +++ b/lib/ui/settings2/Settings2ExposureNotificationsPanel.dart @@ -74,9 +74,9 @@ class _Settings2ExposureNotificationsPanelState extends State implements Noti height: null, borderRadius: BorderRadius.all(Radius.circular(4)), label: 'Exposure Notifications', - value: (Health().user?.exposureNotification ?? false) ? 'Enabled' : 'Disabled', + value: (Health().user?.consentExposureNotification ?? false) ? 'Enabled' : 'Disabled', descriptionLabel: 'Learn more information about exposure notifications and manage your settings.', - onTap: _onExposureNotificationsTapped, + onTap: _onConsentExposureNotificationsTapped, ), Container(height: 12,), CustomRibbonButton( @@ -202,7 +202,7 @@ class _Settings2HomePanelState extends State implements Noti borderRadius: BorderRadius.all(Radius.circular(4)), label: 'Automatic Test Results', descriptionLabel: 'Learn more information about automatic test results and manage your settings.', - onTap: _onConsentTapped, + onTap: _onConsentTestResultsTapped, ), Container(height: 40,), Text("System Settings", @@ -606,12 +606,12 @@ class _Settings2HomePanelState extends State implements Noti Navigator.push(context, CupertinoPageRoute(builder: (context) => Settings2TransferEncryptionKeyPanel())); } - void _onExposureNotificationsTapped(){ + void _onConsentExposureNotificationsTapped(){ Analytics.instance.logSelect(target: "Exposure Notifications"); Navigator.push(context, CupertinoPageRoute(builder: (context) => Settings2ExposureNotificationsPanel())); } - void _onConsentTapped(){ + void _onConsentTestResultsTapped(){ Analytics.instance.logSelect(target: "Consent"); Navigator.push(context, CupertinoPageRoute(builder: (context) => Settings2ConsentPanel())); } From 59f942d718100282ba634debe52a3acfcb78bd2a Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 16 Jun 2021 10:53:47 +0300 Subject: [PATCH 03/15] Added Consent Vaccine Information flag to Health User settings and relevant UI (#661). --- assets/flexUI.json | 2 +- assets/strings.en.json | 14 ++-- assets/strings.es.json | 14 ++-- assets/strings.ja.json | 14 ++-- assets/strings.zh.json | 14 ++-- lib/model/Health.dart | 8 ++- lib/service/Analytics.dart | 1 + lib/service/Health.dart | 15 ++++- .../OnboardingHealthConsentPanel.dart | 66 ++++++++++++++----- .../OnboardingHealthHowItWorksPanel.dart | 2 +- lib/ui/settings/SettingsHomePanel.dart | 26 +++++++- lib/ui/settings2/Settings2HomePanel.dart | 19 +++++- 12 files changed, 147 insertions(+), 48 deletions(-) diff --git a/assets/flexUI.json b/assets/flexUI.json index 0edafb36..cec2ab5f 100644 --- a/assets/flexUI.json +++ b/assets/flexUI.json @@ -18,7 +18,7 @@ "settings.connected.netid": ["info", "disconnect", "connect"], "settings.connected.phone": ["info", "disconnect", "verify"], "settings.notifications": ["covid19"], - "settings.covid19": ["exposure_notifications", "provider_test_result", "qr_code"], + "settings.covid19": ["exposure_notifications", "provider_test_result", "provider_vaccine_info", "qr_code"], "settings.privacy": ["statement"], "settings.account": ["personal_info", "family_members"], diff --git a/assets/strings.en.json b/assets/strings.en.json index 8702f144..3dba4dc8 100644 --- a/assets/strings.en.json +++ b/assets/strings.en.json @@ -218,7 +218,8 @@ "panel.settings.home.button.feedback.title": "Submit Feedback", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "Exposure Notifications", - "panel.settings.home.covid19.provider_test_result": "Health Provider Test Results and Vaccine Information", + "panel.settings.home.covid19.provider_test_result": "Health Provider Test Results", + "panel.settings.home.covid19.provider_vaccine_info": "Health Provider Vaccine Information", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "QR Code", "panel.settings.home.covid19.transfer.button.title": "Transfer", @@ -423,7 +424,7 @@ "panel.health.onboarding.covid19.how_it_works.line1.title": "Testing and limiting exposure are key to slowing the spread of COVID-19.", "panel.health.onboarding.covid19.how_it_works.line2.title": "You can use this app to:", "panel.health.onboarding.covid19.how_it_works.line3.title": "Self-report your COVID-19 symptoms and in doing so update your status.", - "panel.health.onboarding.covid19.how_it_works.line4.title": "Automatically receive test results from your healthcare provider.", + "panel.health.onboarding.covid19.how_it_works.line4.title": "Automatically receive test results and vaccine information from your healthcare provider.", "panel.health.onboarding.covid19.how_it_works.line5.title": "Allow your phone to send exposure notifications when you’ve been in proximity to people who test positive.", "panel.health.onboarding.covid19.how_it_works.button.next.title": "Next", "panel.health.onboarding.covid19.how_it_works.button.next.hint": "", @@ -461,11 +462,14 @@ "panel.health.onboarding.covid19.consent.label.title": "Consent for COVID-19 features", "panel.health.onboarding.covid19.consent.label.description": "Exposure Notifications", "panel.health.onboarding.covid19.consent.label.content1": "If you consent to exposure notifications, you allow your phone to send an anonymous Bluetooth signal to nearby Safer Illinois app users who are also using this feature. Your phone will receive and record a signal from their phones as well. If one of those users tests positive for COVID-19 in the next 14 days, the app will alert you to your potential exposure and advise you on next steps. Your identity and health status will remain anonymous, as will the identity and health status of all other users.", - "panel.health.onboarding.covid19.consent.check_box.label.participate": "I consent to participate in the Exposure Notification System (requires Bluetooth to be ON).", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "I consent to allow my healthcare provider to provide my test results and vaccine information.", + "panel.health.onboarding.covid19.consent.check_box.label.exposure": "I consent to participate in the Exposure Notification System (requires Bluetooth to be ON).", + "panel.health.onboarding.covid19.consent.check_box.label.test": "I consent to allow my healthcare provider to provide my test results.", + "panel.health.onboarding.covid19.consent.check_box.label.vaccine": "I consent to allow my healthcare provider to provide my vaccine information.", "panel.health.onboarding.covid19.consent.label.content2": "Automatic Test Results", "panel.health.onboarding.covid19.consent.label.content3": "I consent to connect test results from my healthcare provider with the Safer Illinois app.", - "panel.health.onboarding.covid19.consent.label.content4": "Your participation in these COVID-19 features is voluntary, and you can stop at any time", + "panel.health.onboarding.covid19.consent.label.content4": "Automatic Vaccine Information", + "panel.health.onboarding.covid19.consent.label.content5": "I consent to connect vaccine information from my healthcare provider with the Safer Illinois app.", + "panel.health.onboarding.covid19.consent.label.content6": "Your participation in these COVID-19 features is voluntary, and you can stop at any time", "panel.health.onboarding.covid19.consent.button.consent.title": "Next", "panel.health.onboarding.covid19.consent.button.consent.hint": "", "panel.health.onboarding.covid19.consent.button.scroll_to_continue.title": "Scroll to Continue", diff --git a/assets/strings.es.json b/assets/strings.es.json index 610cf179..de38287e 100644 --- a/assets/strings.es.json +++ b/assets/strings.es.json @@ -218,7 +218,8 @@ "panel.settings.home.button.feedback.title": "Enviar comentarios", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "Notificaciones de exposición", - "panel.settings.home.covid19.provider_test_result": "Resultados de las pruebas del proveedor de servicios de salud e información sobre las vacunas", + "panel.settings.home.covid19.provider_test_result": "Resultados de la prueba del proveedor de salud", + "panel.settings.home.covid19.provider_vaccine_info": "Información sobre vacunas del proveedor de salud", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "Código QR", "panel.settings.home.covid19.transfer.button.title": "Transferir", @@ -423,7 +424,7 @@ "panel.health.onboarding.covid19.how_it_works.line1.title": "Las pruebas y la limitación de la exposición son clave para frenar la propagación de COVID-19.", "panel.health.onboarding.covid19.how_it_works.line2.title": "Proporcione cualquier síntoma de COVID-19 que esté experimentando, reciba o ingrese automáticamente los resultados de las pruebas de su proveedor de atención médica, y permita que su teléfono le envíe notificaciones de exposición a usted y a las personas con las que ha estado en contacto durante los últimos 14 días.", "panel.health.onboarding.covid19.how_it_works.line3.title": "Autoinforme sus síntomas de COVID-19 y, al hacerlo, actualice su estado.", - "panel.health.onboarding.covid19.how_it_works.line4.title": "Reciba automáticamente los resultados de las pruebas de su proveedor de atención médica.", + "panel.health.onboarding.covid19.how_it_works.line4.title": "Reciba automáticamente los resultados de las pruebas y la información de la vacuna de su proveedor de atención médica.", "panel.health.onboarding.covid19.how_it_works.line5.title": "Permita que su teléfono envíe notificaciones de exposición cuando haya estado cerca de personas que dieron positivo en la prueba.", "panel.health.onboarding.covid19.how_it_works.button.next.title": "Próximo", "panel.health.onboarding.covid19.how_it_works.button.next.hint": "", @@ -461,11 +462,14 @@ "panel.health.onboarding.covid19.consent.label.title": "Consentimientos especiales para las características de COVID-19", "panel.health.onboarding.covid19.consent.label.description": "Notificaciones de exposición", "panel.health.onboarding.covid19.consent.label.content1": "Si acepta las notificaciones de exposición, permite que su teléfono envíe una señal anónima de Bluetooth a los usuarios cercanos de la aplicación Safer Illinois que también usan esta función. Su teléfono también recibirá y grabará una señal de sus teléfonos. Si uno de esos usuarios da positivo por COVID-19 en los próximos 14 días, la aplicación lo alertará sobre su posible exposición y le aconsejará sobre los próximos pasos. Su identidad y estado de salud permanecerán anónimos, al igual que la identidad y el estado de salud de todos los demás usuarios.", - "panel.health.onboarding.covid19.consent.check_box.label.participate": "Doy mi consentimiento para participar en el Sistema de notificación de exposición (requiere que Bluetooth esté activado).", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "Doy mi consentimiento para que mi proveedor de atención médica proporcione los resultados de mis pruebas y la información de la vacuna.", + "panel.health.onboarding.covid19.consent.check_box.label.exposure": "Doy mi consentimiento para participar en el Sistema de notificación de exposición (requiere que Bluetooth esté activado).", + "panel.health.onboarding.covid19.consent.check_box.label.test": "Doy mi consentimiento para que mi proveedor de atención médica proporcione los resultados de mi prueba.", + "panel.health.onboarding.covid19.consent.check_box.label.vaccine": "Doy mi consentimiento para que mi proveedor de atención médica proporcione la información de mi vacuna.", "panel.health.onboarding.covid19.consent.label.content2": "Resultados automáticos de prueba", "panel.health.onboarding.covid19.consent.label.content3": "Doy mi consentimiento para conectar los resultados de las pruebas de mi proveedor de atención médica con la aplicación Safer Illinois.", - "panel.health.onboarding.covid19.consent.label.content4": "Su participación es voluntaria y puede detenerse en cualquier momento", + "panel.health.onboarding.covid19.consent.label.content4": "Información automática de vacunas", + "panel.health.onboarding.covid19.consent.label.content5": "Doy mi consentimiento para conectar la información de la vacuna de mi proveedor de atención médica con la aplicación Safer Illinois.", + "panel.health.onboarding.covid19.consent.label.content6": "Su participación es voluntaria y puede detenerse en cualquier momento", "panel.health.onboarding.covid19.consent.button.consent.title": "Próximo", "panel.health.onboarding.covid19.consent.button.consent.hint": "", "panel.health.onboarding.covid19.consent.button.scroll_to_continue.title": "Desplácese para continuar", diff --git a/assets/strings.ja.json b/assets/strings.ja.json index f9ea6330..f685c753 100644 --- a/assets/strings.ja.json +++ b/assets/strings.ja.json @@ -218,7 +218,8 @@ "panel.settings.home.button.feedback.title": "Submit Feedback", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "接続通知", - "panel.settings.home.covid19.provider_test_result": "医療提供者の検査結果とワクチン情報", + "panel.settings.home.covid19.provider_test_result": "医療提供者のテスト結果", + "panel.settings.home.covid19.provider_vaccine_info": "医療提供者のワクチン情報", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "QR Code", "panel.settings.home.covid19.transfer.button.title": "Transfer", @@ -423,7 +424,7 @@ "panel.health.onboarding.covid19.how_it_works.line1.title": "COVID-19の感染拡大を遅らせるためには、検査と感染源への接触を制限することが重要です。", "panel.health.onboarding.covid19.how_it_works.line2.title": "このアプリでは以下のことができます。", "panel.health.onboarding.covid19.how_it_works.line3.title": "COVID-19の症状を自己申告してステータスを更新する。", - "panel.health.onboarding.covid19.how_it_works.line4.title": "医療従事者からの検査結果を自動的に受け取ります。", + "panel.health.onboarding.covid19.how_it_works.line4.title": "医療提供者から検査結果とワクチン情報を自動的に受け取ります。", "panel.health.onboarding.covid19.how_it_works.line5.title": "検査陽性が出た人に濃厚接触した場合、接続通知を送らせようにする。", "panel.health.onboarding.covid19.how_it_works.button.next.title": "次へ", "panel.health.onboarding.covid19.how_it_works.button.next.hint": "", @@ -461,11 +462,14 @@ "panel.health.onboarding.covid19.consent.label.title": "COVID-19機能に承諾", "panel.health.onboarding.covid19.consent.label.description": "接続通知", "panel.health.onboarding.covid19.consent.label.content1": "接続通知に承諾した場合は、スマホがこの機能を使用している近くのSafer Illinoisアプリのユーザーに匿名のBluetooth信号を送信するようになります。同様にスマホは、他のユーザーからの信号を受信して記録します。次の14日以内に他のユーザーがCOVID-19の陽性となった場合、アプリは曝露された可能性があることを警告して次のステップについてアドバイスします。すべてのユーザーの身元と健康ステータスは匿名となります。", - "panel.health.onboarding.covid19.consent.check_box.label.participate": "接続通知システムに参加することに同意します(Bluetoothをオンにする必要があります)。", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "私は、私の医療提供者が私の検査結果とワクチン情報を提供することを許可することに同意します。", + "panel.health.onboarding.covid19.consent.check_box.label.exposure": "接続通知システムに参加することに同意します(Bluetoothをオンにする必要があります)。", + "panel.health.onboarding.covid19.consent.check_box.label.test": "私は、私の医療提供者が私の検査結果を提供することを許可することに同意します。", + "panel.health.onboarding.covid19.consent.check_box.label.vaccine": "私は、私の医療提供者が私のワクチン情報を提供することを許可することに同意します。", "panel.health.onboarding.covid19.consent.label.content2": "自動検査結果", "panel.health.onboarding.covid19.consent.label.content3": "医療従事者からの検査結果をSafer Illinoisアプリに接続することに同意します。", - "panel.health.onboarding.covid19.consent.label.content4": "COVID-19機能への参加は自発的なものであり、いつでも同意を撤回することができます。", + "panel.health.onboarding.covid19.consent.label.content4": "自動ワクチン情報", + "panel.health.onboarding.covid19.consent.label.content5": "私は、医療提供者からのワクチン情報をSaferIllinoisアプリに接続することに同意します", + "panel.health.onboarding.covid19.consent.label.content6": "COVID-19機能への参加は自発的なものであり、いつでも同意を撤回することができます。", "panel.health.onboarding.covid19.consent.button.consent.title": "次へ", "panel.health.onboarding.covid19.consent.button.consent.hint": "", "panel.health.onboarding.covid19.consent.button.scroll_to_continue.title": "スクロールして続ける", diff --git a/assets/strings.zh.json b/assets/strings.zh.json index 9b0ef908..251b5122 100644 --- a/assets/strings.zh.json +++ b/assets/strings.zh.json @@ -218,7 +218,8 @@ "panel.settings.home.button.feedback.title": "提交反馈", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "接触通知", - "panel.settings.home.covid19.provider_test_result": "衛生人員測試結果和疫苗信息", + "panel.settings.home.covid19.provider_test_result": "健康提供者測試結果", + "panel.settings.home.covid19.provider_vaccine_info": "衛生提供者疫苗信息", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "二維碼", "panel.settings.home.covid19.transfer.button.title": "傳遞", @@ -423,7 +424,7 @@ "panel.health.onboarding.covid19.how_it_works.line1.title": "测试和限制暴露是减缓COVID-19扩散的关键.", "panel.health.onboarding.covid19.how_it_works.line2.title": "您可以使用此应用程序:", "panel.health.onboarding.covid19.how_it_works.line3.title": "自我報告您的COVID-19症狀, 並以此狀態更新.", - "panel.health.onboarding.covid19.how_it_works.line4.title": "自动接收来自医疗保健提供商的测试结果.", + "panel.health.onboarding.covid19.how_it_works.line4.title": "自動從您的醫療保健提供者那裡接收測試結果和疫苗信息。", "panel.health.onboarding.covid19.how_it_works.line5.title": "当你与检测结果呈阳性的人接触时,允许你的手机发送接触警告.", "panel.health.onboarding.covid19.how_it_works.button.next.title": "下一步", "panel.health.onboarding.covid19.how_it_works.button.next.hint": "", @@ -461,11 +462,14 @@ "panel.health.onboarding.covid19.consent.label.title": "COVID-19功能的特别许可", "panel.health.onboarding.covid19.consent.label.description": "接触通知", "panel.health.onboarding.covid19.consent.label.content1": "如果您同意接触通知,則允許您的手機向附近的也在使用此功能的Safer Illinois應用程序用戶發送匿名藍牙信號。 您的電話也將接收並記錄來自其電話的信號。 如果其中一個用戶在接下來的14天內檢測出COVID-19呈陽性,則該應用程序將提醒您可能的暴露情況,並為您提供下一步建議。 您的身份和健康狀態以及所有其他用戶的身份和健康狀態將保持匿名。", - "panel.health.onboarding.covid19.consent.check_box.label.participate": "我同意参与接触通知系统(需要打开蓝牙).", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "我同意允許我的醫療保健提供者提供我的測試結果和疫苗信息。", + "panel.health.onboarding.covid19.consent.check_box.label.exposure": "我同意参与接触通知系统(需要打开蓝牙).", + "panel.health.onboarding.covid19.consent.check_box.label.test": "我同意允許我的醫療保健提供者提供我的測試結果。", + "panel.health.onboarding.covid19.consent.check_box.label.vaccine": "我同意允許我的醫療保健提供者提供我的疫苗信息。", "panel.health.onboarding.covid19.consent.label.content2": "自动测试结果", "panel.health.onboarding.covid19.consent.label.content3": "我同意將我的醫療保健提供者的測試結果與Safer Illinois應用程序聯繫起來。", - "panel.health.onboarding.covid19.consent.label.content4": "您的参与是自愿的,您可以随时停止.", + "panel.health.onboarding.covid19.consent.label.content4": "自動疫苗信息", + "panel.health.onboarding.covid19.consent.label.content5": "我同意將來自我的醫療保健提供者的疫苗信息與 Safer Illinois 應用程序相關聯。", + "panel.health.onboarding.covid19.consent.label.content6": "您的参与是自愿的,您可以随时停止.", "panel.health.onboarding.covid19.consent.button.consent.title": "下一個", "panel.health.onboarding.covid19.consent.button.consent.hint": "", "panel.health.onboarding.covid19.consent.button.scroll_to_continue.title": "滚动以继续", diff --git a/lib/model/Health.dart b/lib/model/Health.dart index 453c15a9..41bb8a24 100644 --- a/lib/model/Health.dart +++ b/lib/model/Health.dart @@ -1228,6 +1228,7 @@ class HealthUser { String publicKeyString; PublicKey _publicKey; bool consentTestResults; + bool consentVaccineInformation; bool consentExposureNotification; bool repost; List accounts; @@ -1237,7 +1238,7 @@ class HealthUser { HealthUserAccount defaultAccount; Map accountsMap; - HealthUser({this.uuid, this.publicKeyString, PublicKey publicKey, this.consentTestResults, this.consentExposureNotification, this.repost, this.accounts, this.encryptedKey, this.encryptedBlob}) { + HealthUser({this.uuid, this.publicKeyString, PublicKey publicKey, this.consentTestResults, this.consentVaccineInformation, this.consentExposureNotification, this.repost, this.accounts, this.encryptedKey, this.encryptedBlob}) { _publicKey = publicKey; accountsMap = HealthUserAccount.mapFromList(accounts); defaultAccount = HealthUserAccount.defaultInList(accounts); @@ -1248,6 +1249,7 @@ class HealthUser { uuid: json['uuid'], publicKeyString: json['public_key'], consentTestResults: json['consent'], + consentVaccineInformation: json['consent_vaccine'], consentExposureNotification: json['exposure_notification'], repost: json['re_post'], accounts: HealthUserAccount.listFromJson(json['accounts']), @@ -1261,6 +1263,7 @@ class HealthUser { 'uuid': uuid, 'public_key': publicKeyString, 'consent': consentTestResults, + 'consent_vaccine': consentVaccineInformation, 'exposure_notification': consentExposureNotification, 're_post': repost, 'accounts': HealthUserAccount.listToJson(accounts), @@ -1274,6 +1277,7 @@ class HealthUser { o.uuid == uuid && o.publicKeyString == publicKeyString && o.consentTestResults == consentTestResults && + o.consentVaccineInformation == consentVaccineInformation && o.consentExposureNotification == consentExposureNotification && o.repost == repost && ListEquality().equals(o.accounts, accounts) && @@ -1284,6 +1288,7 @@ class HealthUser { (uuid?.hashCode ?? 0) ^ (publicKeyString?.hashCode ?? 0) ^ (consentTestResults?.hashCode ?? 0) ^ + (consentVaccineInformation?.hashCode ?? 0) ^ (consentExposureNotification?.hashCode ?? 0) ^ (repost?.hashCode ?? 0) ^ ListEquality().hash(accounts) ^ @@ -1305,6 +1310,7 @@ class HealthUser { publicKeyString: user.publicKeyString, publicKey: user.publicKey, consentTestResults: user.consentTestResults, + consentVaccineInformation: user.consentVaccineInformation, consentExposureNotification: user.consentExposureNotification, repost: user.repost, accounts: user.accounts, diff --git a/lib/service/Analytics.dart b/lib/service/Analytics.dart index 66c0609d..1f6058dd 100644 --- a/lib/service/Analytics.dart +++ b/lib/service/Analytics.dart @@ -203,6 +203,7 @@ class Analytics with Service implements NotificationsListener { static const String LogHealthStatusName = "status"; static const String LogHealthPrevStatusName = "previous_status"; static const String LogHealthSettingConsentTestResultsName = "consent_test_results"; + static const String LogHealthSettingConsentVaccineInfoName = "consent_vaccine_information"; static const String LogHealthSettingConsentExposureNotifName = "notify_exposures"; static const String LogHealthProviderName = "provider"; static const String LogHealthLocationName = "location"; diff --git a/lib/service/Health.dart b/lib/service/Health.dart index 411a3121..9a877a2b 100644 --- a/lib/service/Health.dart +++ b/lib/service/Health.dart @@ -419,7 +419,7 @@ class Health with Service implements NotificationsListener { return false; } - Future loginUser({bool consentTestResults, bool consentExposureNotification, AsymmetricKeyPair keys}) async { + Future loginUser({bool consentTestResults, bool consentVaccineInformation, bool consentExposureNotification, AsymmetricKeyPair keys}) async { if (!this._isUserAuthenticated) { return null; @@ -462,6 +462,8 @@ class Health with Service implements NotificationsListener { // Consent Map analyticsSettingsAttributes = {}; + + // Consent: Test Results if (consentTestResults != null) { if (consentTestResults != user.consentTestResults) { analyticsSettingsAttributes[Analytics.LogHealthSettingConsentTestResultsName] = consentTestResults; @@ -470,7 +472,16 @@ class Health with Service implements NotificationsListener { } } - // Exposure Notification + // Consent: Vaccine Information + if (consentVaccineInformation != null) { + if (consentVaccineInformation != user.consentVaccineInformation) { + analyticsSettingsAttributes[Analytics.LogHealthSettingConsentVaccineInfoName] = consentVaccineInformation; + user.consentVaccineInformation = consentVaccineInformation; + userUpdated = true; + } + } + + // Consent :Exposure Notification if (consentExposureNotification != null) { if (consentExposureNotification != user.consentExposureNotification) { analyticsSettingsAttributes[Analytics.LogHealthSettingConsentExposureNotifName] = consentExposureNotification; diff --git a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart index 4f070be8..be0dec3c 100644 --- a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart +++ b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart @@ -48,8 +48,9 @@ class OnboardingHealthConsentPanel extends StatefulWidget with OnboardingPanel { class _OnboardingHealthConsentPanelState extends State{ bool _loading = false; - bool _consentExposureNotification = false; bool _consentTestResults = true; + bool _consentVaccineInformation = true; + bool _consentExposureNotification = false; bool _canContinue = false; bool _permissionsRequested = false; ScrollController _scrollController; @@ -60,8 +61,9 @@ class _OnboardingHealthConsentPanelState extends State= _scrollController.position.maxScrollExtent) && !_scrollController.position.outOfRange) { // The user can continue only if he/she scrolls to the bottom of the page. diff --git a/lib/ui/onboarding/OnboardingHealthHowItWorksPanel.dart b/lib/ui/onboarding/OnboardingHealthHowItWorksPanel.dart index 9c2f1f2a..428297b2 100644 --- a/lib/ui/onboarding/OnboardingHealthHowItWorksPanel.dart +++ b/lib/ui/onboarding/OnboardingHealthHowItWorksPanel.dart @@ -119,7 +119,7 @@ class OnboardingHealthHowItWorksPanel extends StatelessWidget with OnboardingPan _Bullet(), Expanded( child: Text( - Localization().getStringEx("panel.health.onboarding.covid19.how_it_works.line4.title", "Automatically receive test results from your healthcare provider."), + Localization().getStringEx("panel.health.onboarding.covid19.how_it_works.line4.title", "Automatically receive test results and vaccine information from your healthcare provider."), style: TextStyle(fontFamily: Styles().fontFamilies.regular, fontSize: 16, color:Styles().colors.fillColorPrimary), ), ), diff --git a/lib/ui/settings/SettingsHomePanel.dart b/lib/ui/settings/SettingsHomePanel.dart index 30c77a08..2b53e3f8 100644 --- a/lib/ui/settings/SettingsHomePanel.dart +++ b/lib/ui/settings/SettingsHomePanel.dart @@ -594,11 +594,11 @@ class _SettingsHomePanelState extends State implements Notifi }); } - void _updateHealthUser({bool consentTestResults, bool consentExposureNotification}){ + void _updateHealthUser({bool consentTestResults, bool consentVaccineInformation, bool consentExposureNotification}){ setState(() { _refreshingHealthUser = true; }); - Health().loginUser(consentTestResults: consentTestResults, consentExposureNotification: consentExposureNotification).then((_) { + Health().loginUser(consentTestResults: consentTestResults, consentVaccineInformation: consentVaccineInformation, consentExposureNotification: consentExposureNotification).then((_) { if (mounted) { setState(() { _refreshingHealthUser = false; @@ -703,11 +703,20 @@ class _SettingsHomePanelState extends State implements Notifi contentList.add(ToggleRibbonButton( height: null, borderRadius: borderRadius, - label: Localization().getStringEx("panel.settings.home.covid19.provider_test_result", "Health Provider Test Results and Vaccine Information"), + label: Localization().getStringEx("panel.settings.home.covid19.provider_test_result", "Health Provider Test Results"), toggled: (Health().user?.consentTestResults == true), context: context, onTap: _onConsentTestResult)); } + else if (code == 'provider_vaccine_info') { + contentList.add(ToggleRibbonButton( + height: null, + borderRadius: borderRadius, + label: Localization().getStringEx("panel.settings.home.covid19.provider_vaccine_info", "Health Provider Vaccine Information"), + toggled: (Health().user?.consentVaccineInformation == true), + context: context, + onTap: _onConsentVaccineInfo)); + } else if (code == 'qr_code') { contentList.add(Padding(padding: EdgeInsets.only(left: 8, top: 16), child: _buildCovid19KeysSection(),)); } @@ -911,6 +920,17 @@ class _SettingsHomePanelState extends State implements Notifi } } + void _onConsentVaccineInfo() { + if (Connectivity().isNotOffline) { + Analytics.instance.logSelect(target: "Consent Vaccine Information"); + bool consentVaccineInformation = Health().user?.consentVaccineInformation ?? false; + _updateHealthUser(consentVaccineInformation: !consentVaccineInformation); + } else { + AppAlert.showOfflineMessage(context); + } + } + + void _onTapCovid19Login() { if (Connectivity().isNotOffline) { Analytics.instance.logSelect(target: "Retry"); diff --git a/lib/ui/settings2/Settings2HomePanel.dart b/lib/ui/settings2/Settings2HomePanel.dart index 7859a97e..3735811b 100644 --- a/lib/ui/settings2/Settings2HomePanel.dart +++ b/lib/ui/settings2/Settings2HomePanel.dart @@ -204,6 +204,15 @@ class _Settings2HomePanelState extends State implements Noti descriptionLabel: 'Learn more information about automatic test results and manage your settings.', onTap: _onConsentTestResultsTapped, ), + Container(height: 12,), + CustomRibbonButton( + height: null, + value: (Health().user?.consentVaccineInformation ?? false) ? 'Enabled' : 'Disabled', + borderRadius: BorderRadius.all(Radius.circular(4)), + label: 'Automatic Vaccine Information', + descriptionLabel: 'Learn more information about automatic vaccine information and manage your settings.', + onTap: _onConsentVaccineInformationTapped, + ), Container(height: 40,), Text("System Settings", style: TextStyle( @@ -607,14 +616,20 @@ class _Settings2HomePanelState extends State implements Noti } void _onConsentExposureNotificationsTapped(){ - Analytics.instance.logSelect(target: "Exposure Notifications"); + Analytics.instance.logSelect(target: "Consent Exposure Notifications"); Navigator.push(context, CupertinoPageRoute(builder: (context) => Settings2ExposureNotificationsPanel())); } void _onConsentTestResultsTapped(){ - Analytics.instance.logSelect(target: "Consent"); + Analytics.instance.logSelect(target: "Consent Test Results"); Navigator.push(context, CupertinoPageRoute(builder: (context) => Settings2ConsentPanel())); } + + void _onConsentVaccineInformationTapped(){ + Analytics.instance.logSelect(target: "Consent Vaccine Information"); + //TBD: Navigator.push(context, CupertinoPageRoute(builder: (context) => Settings2ConsentPanel())); + } + } class CustomRibbonButton extends StatelessWidget { From cb3d1bf46c8e5be923f14a70e4e9efb42d330620 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 16 Jun 2021 11:35:14 +0300 Subject: [PATCH 04/15] Apply #661 to CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3946f6df..53ed7448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- Added Consent Health Provider Vaccine Information flag and related UI [#661](https://github.com/rokwire/safer-illinois-app/issues/661). ## [2.10.29] - 2021-06-09 ### Changed From b3d7a8ed2220c2712d994f26ae543b0ad8504de8 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 16 Jun 2021 11:39:25 +0300 Subject: [PATCH 05/15] version: 2.10.30+1030 --- CHANGELOG.md | 1 + pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ed7448..5bf7a862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +## [2.10.30] - 2021-06-16 ### Added - Added Consent Health Provider Vaccine Information flag and related UI [#661](https://github.com/rokwire/safer-illinois-app/issues/661). diff --git a/pubspec.yaml b/pubspec.yaml index 4135af83..1d6a8aa4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Illinois client application. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 2.10.29+1029 +version: 2.10.30+1030 environment: sdk: ">=2.2.0 <3.0.0" From ae7bc787563cca37066fb6506fc920ffb8ccd675 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Mon, 21 Jun 2021 15:30:57 +0300 Subject: [PATCH 06/15] Upgrade to Flutter 2.2.2 (#664). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 26ea9070..3d2c0891 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ The official COVID-19 app of the University of Illinois. Powered by the [Rokwire ## Requirements -### [Flutter](https://flutter.dev/docs/get-started/install) v2.0.6 +### [Flutter](https://flutter.dev/docs/get-started/install) v2.0.2 ### [Android Studio](https://developer.android.com/studio) 3.6+ From cd3842981a3cd48b3c500d8ebaeb62781f36eeab Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Mon, 21 Jun 2021 15:31:17 +0300 Subject: [PATCH 07/15] Apply #664 to CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf7a862..cfec12f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +### Changed +- Upgrade to Flutter 2.2.2 [#664](https://github.com/rokwire/safer-illinois-app/issues/664). + ## [2.10.30] - 2021-06-16 ### Added - Added Consent Health Provider Vaccine Information flag and related UI [#661](https://github.com/rokwire/safer-illinois-app/issues/661). From 30e84a3392917ffcb6bbe81b69f3403c9f5712e0 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 7 Jul 2021 11:53:08 +0300 Subject: [PATCH 08/15] Health rules updated to handle properly PCR positive event on vaccinated users (#668). --- assets/health.rules.json | 46 +++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/assets/health.rules.json b/assets/health.rules.json index 208771ef..e0e9f677 100644 --- a/assets/health.rules.json +++ b/assets/health.rules.json @@ -77,15 +77,23 @@ "interval": { "min": 0, "max": 10, "scope": "future" } }, "success": { - "condition": "require-test", + "condition": "require-vaccine", "params": { - "interval": { "min": 11, "max": null, "scope": "future" } + "interval": { "scope": "past" }, + "vaccine": "effective" }, "success": null, "fail": { - "code": "red", - "priority": 11, - "next_step": "test.now.step" + "condition": "require-test", + "params": { + "interval": { "min": 11, "max": null, "scope": "future" } + }, + "success": null, + "fail": { + "code": "red", + "priority": 11, + "next_step": "test.now.step" + } } }, "fail": { @@ -101,16 +109,24 @@ "interval": { "min": 0, "max": 8, "scope": "future" } }, "success": { - "condition": "require-test", + "condition": "require-vaccine", "params": { - "interval": { "min": 9, "max": null, "scope": "future" } + "interval": { "scope": "past" }, + "vaccine": "effective" }, "success": null, "fail": { - "code": "red", - "priority": 11, - "next_step": "test.now.step", - "fcm_topic": "PCR.positive-IP" + "condition": "require-test", + "params": { + "interval": { "min": 9, "max": null, "scope": "future" } + }, + "success": null, + "fail": { + "code": "red", + "priority": 11, + "next_step": "test.now.step", + "fcm_topic": "PCR.positive-IP" + } } }, "fail": { @@ -244,7 +260,13 @@ "interval": { "scope": "past" }, "vaccine": "effective" }, - "success": "vaccinated", + "success": { + "code": "green", + "priority": -4, + "next_step_html": "vaccinated.step.html", + "reason": "vaccinated.reason", + "fcm_topic": "vaccinated" + }, "fail": { "condition": "require-test", "params": { From 8c887b11f4e6a256e0e4b57ef6eb6afb988de4ac Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 7 Jul 2021 11:54:37 +0300 Subject: [PATCH 09/15] Fix: check string parameters match case insensitively (#668). --- lib/model/Health.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/model/Health.dart b/lib/model/Health.dart index 41bb8a24..4afb08cd 100644 --- a/lib/model/Health.dart +++ b/lib/model/Health.dart @@ -4003,18 +4003,18 @@ abstract class HealthRuleCondition { dynamic category = (conditionParams != null) ? conditionParams['category'] : null; if (category != null) { HealthTestRuleResult entryRuleResult = rules?.tests?.matchRuleResult(blob: entry?.blob); - return _matchValue(category, entryRuleResult?.category); + return _matchStringTarget(source: entryRuleResult?.category, target: category); } } else if (_matchValue(historyType, HealthHistoryType.action)) { dynamic type = (conditionParams != null) ? conditionParams['type'] : null; - if ((type != null) && !_matchValue(entry, entry?.blob?.actionType)) { + if ((type != null) && !_matchStringTarget(source: entry?.blob?.actionType, target: entry)) { return false; } } else if (_matchValue(historyType, HealthHistoryType.vaccine)) { dynamic vaccine = (conditionParams != null) ? conditionParams['vaccine'] : null; - if ((vaccine != null) && (entry?.blob?.vaccine != vaccine)) { + if ((vaccine != null) && !_matchStringTarget(source: entry?.blob?.vaccine, target: vaccine)) { return false; } } From 15da8c078fb4b1e47e08ee692416dcbf8bc13656 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 7 Jul 2021 12:53:01 +0300 Subject: [PATCH 10/15] Exempt strings moved to string tables and translated. --- assets/health.rules.json | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/assets/health.rules.json b/assets/health.rules.json index e0e9f677..dee6683d 100644 --- a/assets/health.rules.json +++ b/assets/health.rules.json @@ -364,17 +364,17 @@ "fail": { "code": "yellow", "priority": 12, - "next_step": "You are exempted from testing until {next_step_date}", + "next_step": "exempt-on.until.step", "next_step_interval": "ExemptInterval", - "reason": "Your status changed to Yellow because you are exempted from testing until {next_step_date}", + "reason": "exempt-on.until.reason", "fcm_topic": "exempt" } }, "fail": { "code": "yellow", "priority": 12, - "next_step": "You are exempted from testing", - "reason": "Your status changed to Yellow because you are exempted from testing", + "next_step": "exempt-on.step", + "reason": "exempt-on.reason", "fcm_topic": "exempt" } }, @@ -389,14 +389,14 @@ "code": "green", "priority": -4, "next_step_html": "vaccinated.step.html", - "reason": "Your status changed to Green because your exempt from testing status was canceled", + "reason": "exempt-off.green.reason", "fcm_topic": "vaccinated" }, "fail": { "code": "orange", "priority": -1, "next_step": "test.now.step", - "reason": "Your status changed to Orange because your exempt from testing status was canceled" + "reason": "exempt-off.orange.reason" } }, @@ -410,7 +410,7 @@ "code": "green", "priority": -4, "next_step_html": "vaccinated.step.html", - "reason": "Your status changed to Green because your exempt from testing status was canceled", + "reason": "vaccinated.reason", "fcm_topic": "vaccinated" }, "fail": { @@ -840,6 +840,12 @@ "vaccinated.reason": "Your status changed to Green because your vaccination is already effective.", "quarantine-on.step": "Stay at home and avoid contacts", "quarantine-on.reason": "Your status changed to Orange because the Public Health department placed you in Quarantine.", + "exempt-on.step": "You are exempted from testing", + "exempt-on.reason": "Your status changed to Yellow because you are exempted from testing", + "exempt-on.until.step": "You are exempted from testing until {next_step_date}", + "exempt-on.until.reason": "Your status changed to Yellow because you are exempted from testing until {next_step_date}", + "exempt-off.orange.reason": "Your status changed to Orange because your exempt from testing status was canceled", + "exempt-off.green.reason": "Your status changed to Green because your exempt from testing status was canceled", "release.step": "Take a SHIELD Saliva Test", "release.reason": "Your status changed to Orange because the Public Health department requires you to take a test.", @@ -905,6 +911,12 @@ "vaccinated.reason": "Su estado cambió a Verde porque su vacunación ya es efectiva.", "quarantine-on.step": "Quédese en casa y evite los contactos", "quarantine-on.reason": "Su estado cambió a Orange porque el departamento de Salud Pública lo puso en cuarentena.", + "exempt-on.step": "Estas exenta de pruebas", + "exempt-on.reason": "Su estado cambió a amarillo porque está exento de la prueba", + "exempt-on.until.step": "Está exenta de realizar pruebas hasta {next_step_date}", + "exempt-on.until.reason": "Su estado cambió a amarillo porque está exento de la prueba hasta el {next_step_date}", + "exempt-off.orange.reason": "Su estado cambió a Orange porque se canceló su estado de exención de la prueba", + "exempt-off.green.reason": "Su estado cambió a verde porque se canceló su estado de exención de la prueba", "release.step": "Realice una prueba de saliva SHIELD", "release.reason": "Su estado cambió a Orange porque el departamento de Salud Pública requiere que tome una prueba.", @@ -970,6 +982,12 @@ "vaccinated.reason": "您的狀態已更改為“綠色”,因為您的疫苗接種已經有效。", "quarantine-on.step": "呆在家裡,避免接觸", "quarantine-on.reason": "您的狀態更改為“橙色”,因為公共衛生部門已將您隔離。", + "exempt-on.step": "您免於測試", + "exempt-on.reason": "您的狀態更改為黃色,因為您免於測試", + "exempt-on.until.step": "您可以在 {next_step_date} 之前免於測試", + "exempt-on.until.reason": "您的狀態已更改為黃色,因為您可以在 {next_step_date} 之前免於測試", + "exempt-off.orange.reason": "您的狀態更改為橙色,因為您的免試狀態已被取消", + "exempt-off.green.reason": "您的狀態更改為綠色,因為您的免試狀態已被取消", "release.step": "參加SHIELD唾液測試", "release.reason": "您的狀態更改為“橙色”,因為公共衛生部門要求您進行測試。", @@ -1035,6 +1053,12 @@ "vaccinated.reason": "予防接種がすでに有効になっているため、ステータスが緑に変わりました。", "quarantine-on.step": "家にいて、他の人との接触を避けてください。", "quarantine-on.reason": "Public Health departmentにより隔離状態に置かれているため、ステータスがオレンジに変更されました。", + "exempt-on.step": "あなたはテストから免除されています", + "exempt-on.reason": "テストが免除されているため、ステータスが黄色に変わりました", + "exempt-on.until.step": "{next_step_date}までテストが免除されます", + "exempt-on.until.reason": "{next_step_date}までテストが免除されているため、ステータスが黄色に変更されました", + "exempt-off.orange.reason": "テストステータスの免除がキャンセルされたため、ステータスがオレンジに変更されました", + "exempt-off.green.reason": "テストステータスの免除がキャンセルされたため、ステータスが緑に変更されました", "release.step": "SHIELD唾液検査を受けてください", "release.reason": "Public Health departmentにより隔離状態に置かれているため、ステータスがオレンジに変更されました。", From 0ddd19cf1aaaf745d0ace27374b1c9c6582f3a53 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 7 Jul 2021 12:56:02 +0300 Subject: [PATCH 11/15] Apply #668 to CHANGELOG.md. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfec12f2..9d2edc89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### Changed - Upgrade to Flutter 2.2.2 [#664](https://github.com/rokwire/safer-illinois-app/issues/664). +- Health rules updated to handle properly PCR positive event on vaccinated users [#668](https://github.com/rokwire/safer-illinois-app/issues/668). +### Fixed +- Check string parameters match case insensitively [#668](https://github.com/rokwire/safer-illinois-app/issues/668). + ## [2.10.30] - 2021-06-16 ### Added From b3f8c564ff3ded3b2bceeecdf4f6223b0a1c8cc1 Mon Sep 17 00:00:00 2001 From: Mladen Dryankov Date: Wed, 7 Jul 2021 13:51:47 +0300 Subject: [PATCH 12/15] Fix gradle build for Android #670 --- CHANGELOG.md | 1 + android/build.gradle | 2 +- android/gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2edc89..121a1de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgrade to Flutter 2.2.2 [#664](https://github.com/rokwire/safer-illinois-app/issues/664). - Health rules updated to handle properly PCR positive event on vaccinated users [#668](https://github.com/rokwire/safer-illinois-app/issues/668). ### Fixed +- Fix gradle build for Android [#670](https://github.com/rokwire/safer-illinois-app/issues/670). - Check string parameters match case insensitively [#668](https://github.com/rokwire/safer-illinois-app/issues/668). diff --git a/android/build.gradle b/android/build.gradle index 9d3e489a..72a3775c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -16,7 +16,7 @@ buildscript { ext { - gradle_version = '3.5.3' + gradle_version = '4.2.0' kotlin_version = '1.3.61' } repositories { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index b55a0129..651f7277 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -19,4 +19,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip From 717651a1bab761f1d4fdab77b24499e8aa52c694 Mon Sep 17 00:00:00 2001 From: Mladen Dryankov Date: Wed, 7 Jul 2021 14:51:56 +0300 Subject: [PATCH 13/15] Additional fix for release build #670 --- android/app/build.gradle | 5 +++++ pubspec.lock | 8 ++++---- pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7a64533b..f2e00ad0 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -172,4 +172,9 @@ dependencies { implementation 'com.github.weliem:blessed-android:1.19' implementation 'com.google.android.gms:play-services-vision-common:19.0.2' + + // Temporary fix Gradle 4.2.0 & https://stackoverflow.com/questions/67612499/could-not-find-com-google-firebasefirebase-ml-vision + implementation platform('com.google.firebase:firebase-bom:28.0.1') + implementation 'com.google.android.gms:play-services-vision:20.1.3' + // Endfix } \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 7926ab08..9e35f62b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -28,7 +28,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" barcode_scan: dependency: "direct main" description: @@ -259,7 +259,7 @@ packages: name: firebase_ml_vision url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+1" + version: "0.9.10" fixnum: dependency: transitive description: @@ -655,7 +655,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" sprintf: dependency: "direct main" description: @@ -718,7 +718,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" timezone: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1d6a8aa4..38b23721 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: firebase_core: ^1.1.0 firebase_messaging: ^9.1.3 firebase_crashlytics: ^2.0.2 - firebase_ml_vision: ^0.12.0+1 + firebase_ml_vision: ^0.9.10 # End Firebase logger: ^1.0.0 flutter_local_notifications: ^5.0.0+4 From bf626d15bbf4eec39d8b9eb30141957d95f4ef99 Mon Sep 17 00:00:00 2001 From: Mihail Varbanov Date: Wed, 7 Jul 2021 15:32:56 +0300 Subject: [PATCH 14/15] version: 2.10.31+1031 --- CHANGELOG.md | 2 ++ pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 121a1de5..4b038083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased + +## [2.10.31] - 2021-07-17 ### Changed - Upgrade to Flutter 2.2.2 [#664](https://github.com/rokwire/safer-illinois-app/issues/664). - Health rules updated to handle properly PCR positive event on vaccinated users [#668](https://github.com/rokwire/safer-illinois-app/issues/668). diff --git a/pubspec.yaml b/pubspec.yaml index 38b23721..1f04f17a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Illinois client application. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 2.10.30+1030 +version: 2.10.31+1031 environment: sdk: ">=2.2.0 <3.0.0" From a70593a4083148c5a5373543b55bd9bbb3b6762a Mon Sep 17 00:00:00 2001 From: Sandeep Puthanveetil Satheesan Date: Wed, 7 Jul 2021 16:40:30 -0500 Subject: [PATCH 15/15] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d2c0891..8a9edbce 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ The official COVID-19 app of the University of Illinois. Powered by the [Rokwire ## Requirements -### [Flutter](https://flutter.dev/docs/get-started/install) v2.0.2 +### [Flutter](https://flutter.dev/docs/get-started/install) v2.2.2 ### [Android Studio](https://developer.android.com/studio) 3.6+ @@ -135,4 +135,3 @@ $ flutter build apk $ flutter build ios ``` NB: You may need to update singing & capabilities content for Runner project by opening /ios/Runner.xcworkspace from Xcode -