diff --git a/CHANGELOG.md b/CHANGELOG.md index 0825f07c..236e24c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [2.9.8] - 2021-2-1 +- Updated details of background permissions [#506](https://github.com/rokwire/safer-illinois-app/issues/506) +- Updated details of background permissions Explore Shibboleth login failure due to deleted UUID [#508](https://github.com/rokwire/safer-illinois-app/issues/508) + ## [2.9.7] - 2021-1-26 - Updated order of panel shown during onboarding [#503](https://github.com/rokwire/safer-illinois-app/issues/503) - Apply nextStepDate in local time when making the calculations for displayNextStepDate. diff --git a/assets/strings.en.json b/assets/strings.en.json index 1a5d8064..f901957d 100644 --- a/assets/strings.en.json +++ b/assets/strings.en.json @@ -59,7 +59,7 @@ "panel.onboarding.location.label.title": "Turn on Location Services", "panel.onboarding.location.label.title.hint": "Header 1", - "panel.onboarding.location.label.description": "Required for exposure notifications to work on your phone", + "panel.onboarding.location.label.description": "Required for exposure notifications to work in the background on your phone", "panel.onboarding.location.button.allow.title": "Enable Location Services", "panel.onboarding.location.button.allow.hint": "", "panel.onboarding.location.button.dont_allow.title": "Not right now", @@ -415,7 +415,7 @@ "panel.health.onboarding.covid19.disclosure.label.content2": "2. Photos to allow a user to import their personal encryption key (QR code) into the app.", "panel.health.onboarding.covid19.disclosure.label.content3": "3. Videos to allow a user to import their personal encryption key (QR code) into the app.", "panel.health.onboarding.covid19.disclosure.label.content4": "4. Files (external storage read and write) to allow a user to import their personal encryption key (QR code) into the app.", - "panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.", + "panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application to work in the background. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.", "panel.health.onboarding.covid19.disclosure.label.description2": "YOUR INFORMATION AND HOW WE USE IT", "panel.health.onboarding.covid19.disclosure.label.description3": "Information we need to provide you COVID-19 test results", "panel.health.onboarding.covid19.disclosure.label.content8": "Name, email address, University ID number (UIN), phone number, and student registration information", @@ -429,7 +429,7 @@ "panel.health.onboarding.covid19.disclosure.label.content13": " - WRITE_EXTERNAL_STORAGE", "panel.health.onboarding.covid19.disclosure.label.content14": " - READ_EXTERNAL_STORAGE", "panel.health.onboarding.covid19.disclosure.label.description8": "Opt-in exposure notification participation", - "panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. The following permissions are used to enable this:", + "panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. If you have elected to use Exposure Notification, Location Services, and Bluetooth, these capabilities will run in the background when the app is not in use. The following permissions are used to enable this:", "panel.health.onboarding.covid19.disclosure.label.content19": " - BLUETOOTH", "panel.health.onboarding.covid19.disclosure.label.content20": " - BLUETOOTH_ADMIN", "panel.health.onboarding.covid19.disclosure.label.content21": " - LOCATION", diff --git a/assets/strings.es.json b/assets/strings.es.json index 43897f19..4e3b83fb 100644 --- a/assets/strings.es.json +++ b/assets/strings.es.json @@ -59,7 +59,7 @@ "panel.onboarding.location.label.title": "Activar los servicios de ubicación", "panel.onboarding.location.label.hint": "Encabezado 1", - "panel.onboarding.location.label.description": "Se requiere para que las notificaciones de exposición funcionen en su teléfono", + "panel.onboarding.location.label.description": "Se requiere para que las notificaciones de exposición funcionen en segundo plano en su teléfono", "panel.onboarding.location.button.allow.title": "Servicio de localización activado", "panel.onboarding.location.button.allow.hint": "", "panel.onboarding.location.button.dont_allow.title": "No en este momento", @@ -414,7 +414,7 @@ "panel.health.onboarding.covid19.disclosure.label.content2": "2. Photos to allow a user to import their personal encryption key (QR code) into the app.", "panel.health.onboarding.covid19.disclosure.label.content3": "3. Videos to allow a user to import their personal encryption key (QR code) into the app.", "panel.health.onboarding.covid19.disclosure.label.content4": "4. Files (external storage read and write) to allow a user to import their personal encryption key (QR code) into the app.", - "panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.", + "panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application to work in the background. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.", "panel.health.onboarding.covid19.disclosure.label.description2": "YOUR INFORMATION AND HOW WE USE IT", "panel.health.onboarding.covid19.disclosure.label.description3": "Information we need to provide you COVID-19 test results", "panel.health.onboarding.covid19.disclosure.label.content8": "Name, email address, University ID number (UIN), phone number, and student registration information", @@ -428,7 +428,7 @@ "panel.health.onboarding.covid19.disclosure.label.content13": " - WRITE_EXTERNAL_STORAGE", "panel.health.onboarding.covid19.disclosure.label.content14": " - READ_EXTERNAL_STORAGE", "panel.health.onboarding.covid19.disclosure.label.description8": "Opt-in exposure notification participation", - "panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. The following permissions are used to enable this:", + "panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. If you have elected to use Exposure Notification, Location Services, and Bluetooth, these capabilities will run in the background when the app is not in use. The following permissions are used to enable this:", "panel.health.onboarding.covid19.disclosure.label.content19": " - BLUETOOTH", "panel.health.onboarding.covid19.disclosure.label.content20": " - BLUETOOTH_ADMIN", "panel.health.onboarding.covid19.disclosure.label.content21": " - LOCATION", diff --git a/assets/strings.zh.json b/assets/strings.zh.json index 94591a21..d01a3e8f 100644 --- a/assets/strings.zh.json +++ b/assets/strings.zh.json @@ -414,7 +414,7 @@ "panel.health.onboarding.covid19.disclosure.label.content2": "2. Photos to allow a user to import their personal encryption key (QR code) into the app.", "panel.health.onboarding.covid19.disclosure.label.content3": "3. Videos to allow a user to import their personal encryption key (QR code) into the app.", "panel.health.onboarding.covid19.disclosure.label.content4": "4. Files (external storage read and write) to allow a user to import their personal encryption key (QR code) into the app.", - "panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.", + "panel.health.onboarding.covid19.disclosure.label.content5": "5. Location services on your device must be turned on to activate the Bluetooth low energy technology necessary for the exposure notification function of the Application to work in the background. However, the Application does not access, collect, or store any location data, including GPS data. If location services on your device are turned off, the Application will perform the limited functions of storing and providing information about COVID-19 test results, any voluntarily reported symptoms, and building access status.", "panel.health.onboarding.covid19.disclosure.label.description2": "YOUR INFORMATION AND HOW WE USE IT", "panel.health.onboarding.covid19.disclosure.label.description3": "Information we need to provide you COVID-19 test results", "panel.health.onboarding.covid19.disclosure.label.content8": "Name, email address, University ID number (UIN), phone number, and student registration information", @@ -428,7 +428,7 @@ "panel.health.onboarding.covid19.disclosure.label.content13": " - WRITE_EXTERNAL_STORAGE", "panel.health.onboarding.covid19.disclosure.label.content14": " - READ_EXTERNAL_STORAGE", "panel.health.onboarding.covid19.disclosure.label.description8": "Opt-in exposure notification participation", - "panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. The following permissions are used to enable this:", + "panel.health.onboarding.covid19.disclosure.label.content18": "Your phone transmits and receives anonymous identifying numbers via Bluetooth. This identifier is stored on any phones that come close to you. If someone tests positive for COVID-19, their phone tells our servers the anonymous numbers they have sent for the last 14 days. Your phone will check if you were near that infected users' phone long enough to warrant an exposure notification. This is all done anonymously. Your location is never tracked or stored on our servers. If you have elected to use Exposure Notification, Location Services, and Bluetooth, these capabilities will run in the background when the app is not in use. The following permissions are used to enable this:", "panel.health.onboarding.covid19.disclosure.label.content19": " - BLUETOOTH", "panel.health.onboarding.covid19.disclosure.label.content20": " - BLUETOOTH_ADMIN", "panel.health.onboarding.covid19.disclosure.label.content21": " - LOCATION", diff --git a/lib/service/Auth.dart b/lib/service/Auth.dart index a43e55e1..adba6fce 100644 --- a/lib/service/Auth.dart +++ b/lib/service/Auth.dart @@ -605,17 +605,21 @@ class Auth with Service implements NotificationsListener { return null; } - Future deleteUserPiiData() async { + Future deleteUserPiiData() async { if (Config().userProfileUrl != null) { String url = '${Config().userProfileUrl}/pii/${Storage().userPid}'; - await Network().delete(url, - headers: {'Content-Type':'application/json'}, - auth: NetworkAuth.User - ).whenComplete((){ - _applyUserPiiData(null, null); - }); + try { + Response response = await Network().delete(url, headers: {'Content-Type': 'application/json'}, auth: NetworkAuth.User); + if(response?.statusCode == 200) { + _applyUserPiiData(null, null); + return true; + } + } catch(error){ + Log.e(error); + } } + return false; } void _applyUserPiiData(UserPiiData userPiiData, String userPiiDataString, [bool notify = true]) { diff --git a/lib/service/User.dart b/lib/service/User.dart index 6a6e38ca..b6bc01ce 100644 --- a/lib/service/User.dart +++ b/lib/service/User.dart @@ -208,22 +208,25 @@ class User with Service implements NotificationsListener { Future deleteUser() async{ String userUuid = _userData?.uuid; if((Config().userProfileUrl != null) && (userUuid != null)) { - await Network().delete("${Config().userProfileUrl}/$userUuid", headers: {"Accept": "application/json", "content-type": "application/json"}, auth: NetworkAuth.App); - - _clearStoredUserData(); - _notifyUserDeleted(); - try { - _userData = await requestUser(Storage().localUserUuid); - } on UserNotFoundException catch (_) { - _userData = await _requestCreateUser(); - if (_userData?.uuid != null) { - Storage().localUserUuid = _userData?.uuid; - } + await Network().delete("${Config().userProfileUrl}/$userUuid", headers: {"Accept": "application/json", "content-type": "application/json"}, auth: NetworkAuth.App); } - if (_userData != null) { - Storage().userData = _userData; - _notifyUserUpdated(); + finally { + _clearStoredUserData(); + _notifyUserDeleted(); + + try { + _userData = await requestUser(Storage().localUserUuid); + } on UserNotFoundException catch (_) { + _userData = await _requestCreateUser(); + if (_userData?.uuid != null) { + Storage().localUserUuid = _userData?.uuid; + } + } + if (_userData != null) { + Storage().userData = _userData; + _notifyUserUpdated(); + } } } diff --git a/lib/ui/onboarding/OnboardingAuthLocationPanel.dart b/lib/ui/onboarding/OnboardingAuthLocationPanel.dart index ae963761..19a735ce 100644 --- a/lib/ui/onboarding/OnboardingAuthLocationPanel.dart +++ b/lib/ui/onboarding/OnboardingAuthLocationPanel.dart @@ -91,7 +91,7 @@ class OnboardingAuthLocationPanel extends StatelessWidget with OnboardingPanel { child: Text( Localization().getStringEx( 'panel.onboarding.location.label.description', - "Required for exposure notifications to work on your phone"), + "Required for exposure notifications to work in the background on your phone"), textAlign: TextAlign.center, style: TextStyle( fontFamily: Styles().fontFamilies.regular, diff --git a/lib/ui/onboarding/OnboardingHealthDisclosurePanel.dart b/lib/ui/onboarding/OnboardingHealthDisclosurePanel.dart index b2ee7095..abe2a486 100644 --- a/lib/ui/onboarding/OnboardingHealthDisclosurePanel.dart +++ b/lib/ui/onboarding/OnboardingHealthDisclosurePanel.dart @@ -124,7 +124,7 @@ class _OnBoardingHealthDisclosurePanelState extends State { await Health().deleteUser(); await Exposure().deleteUser(); - await Auth().deleteUserPiiData(); - await User().deleteUser(); + bool piiDeleted = await Auth().deleteUserPiiData(); + if(piiDeleted) { + await User().deleteUser(); + } Auth().logout(); } diff --git a/lib/ui/settings2/Settings2GovernmentIdPanel.dart b/lib/ui/settings2/Settings2GovernmentIdPanel.dart index ce7ba9dd..091b5b07 100644 --- a/lib/ui/settings2/Settings2GovernmentIdPanel.dart +++ b/lib/ui/settings2/Settings2GovernmentIdPanel.dart @@ -108,8 +108,10 @@ class _Settings2GovernmentIdPanelPanelState extends State implements Noti await Health().deleteUser(); await Exposure().deleteUser(); - await Auth().deleteUserPiiData(); - await User().deleteUser(); + bool piiDeleted = await Auth().deleteUserPiiData(); + if(piiDeleted) { + await User().deleteUser(); + } Auth().logout(); } diff --git a/pubspec.yaml b/pubspec.yaml index cfc025fe..59d7e573 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.9.7+907 +version: 2.9.8+908 environment: sdk: ">=2.2.0 <3.0.0"