From ee8bb052ab7221f3a426c5488d701fb9ea6972d7 Mon Sep 17 00:00:00 2001
From: covidsafe-support <64945427+covidsafe-support@users.noreply.github.com>
Date: Wed, 9 Jun 2021 17:25:51 -0700
Subject: [PATCH] COVIDSafe code from version 2.7
---
app/build.gradle | 4 +-
.../health/covidsafe/ui/home/HomeFragment.kt | 17 +++++++++
.../ui/onboarding/CountryListRecyclerView.kt | 3 +-
.../enternumber/EnterNumberFragment.kt | 8 ++++
.../main/res/layout/fragment_enter_number.xml | 21 ++++++++++-
.../layout/fragment_home_external_links.xml | 3 +-
.../res/layout/view_home_setup_complete.xml | 28 ++++++++++++++
.../res/layout/view_home_setup_incomplete.xml | 32 ++++++++++++++++
.../res/layout/view_state_case_statistics.xml | 37 +++++++++++++++++--
app/src/main/res/values/strings.xml | 2 +
10 files changed, 146 insertions(+), 9 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 6bc52cd..e0d211f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -29,8 +29,8 @@ android {
applicationId "au.gov.health.covidsafe"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 128
- versionName "2.6"
+ versionCode 132
+ versionName "2.7"
buildConfigField "String", "GITHASH", "\"${getGitHash()}\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
diff --git a/app/src/main/java/au/gov/health/covidsafe/ui/home/HomeFragment.kt b/app/src/main/java/au/gov/health/covidsafe/ui/home/HomeFragment.kt
index e5c6777..ed2e296 100644
--- a/app/src/main/java/au/gov/health/covidsafe/ui/home/HomeFragment.kt
+++ b/app/src/main/java/au/gov/health/covidsafe/ui/home/HomeFragment.kt
@@ -110,6 +110,9 @@ class HomeFragment : BaseFragment(), EasyPermissions.PermissionCallbacks, Networ
removeRegistrationData()
NetworkConnectionCheck.addNetworkChangedListener(requireContext(), this)
+
+ val case_numbers_desc = this.getString(R.string.latest_case_numbers)
+ date_desc_v2.text = case_numbers_desc.replace("%@"," ")
}
private fun removeRegistrationData() {
@@ -366,6 +369,20 @@ class HomeFragment : BaseFragment(), EasyPermissions.PermissionCallbacks, Networ
browserIntent.data = Uri.parse(url)
startActivity(browserIntent)
}
+
+ privacy_card_layout.setOnClickListener {
+ val browserIntent = Intent(Intent.ACTION_VIEW)
+ val url = LinkBuilder.getPrivacyTopicsUrl()
+ browserIntent.data = Uri.parse(url)
+ startActivity(browserIntent)
+ }
+
+ privacy_card_inactive_layout.setOnClickListener {
+ val browserIntent = Intent(Intent.ACTION_VIEW)
+ val url = LinkBuilder.getPrivacyTopicsUrl()
+ browserIntent.data = Uri.parse(url)
+ startActivity(browserIntent)
+ }
}
private fun initializeChangeLanguageNavigation() {
diff --git a/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/CountryListRecyclerView.kt b/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/CountryListRecyclerView.kt
index 088ddba..3da41ec 100644
--- a/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/CountryListRecyclerView.kt
+++ b/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/CountryListRecyclerView.kt
@@ -13,6 +13,8 @@ import au.gov.health.covidsafe.app.TracerApp
const val VIEW_TYPE_GROUP_TITLE = 1
const val VIEW_TYPE_COUNTRY = 2
+const val NOLFOLK_ISLAND = 672
+const val AUS = 61
interface CountryListItemInterface
@@ -69,7 +71,6 @@ class CountryListItemHolder(
Preference.putCountryNameResID(TracerApp.AppContext, countryNameResId)
Preference.putCallingCode(TracerApp.AppContext, callingCode)
Preference.putNationalFlagResID(TracerApp.AppContext, flagResID)
-
onCountryClicked()
}
}
diff --git a/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/fragment/enternumber/EnterNumberFragment.kt b/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/fragment/enternumber/EnterNumberFragment.kt
index 0d3e57f..60ce235 100644
--- a/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/fragment/enternumber/EnterNumberFragment.kt
+++ b/app/src/main/java/au/gov/health/covidsafe/ui/onboarding/fragment/enternumber/EnterNumberFragment.kt
@@ -23,7 +23,9 @@ import au.gov.health.covidsafe.preference.Preference
import au.gov.health.covidsafe.talkback.setHeading
import au.gov.health.covidsafe.ui.base.PagerChildFragment
import au.gov.health.covidsafe.ui.base.UploadButtonLayout
+import au.gov.health.covidsafe.ui.onboarding.AUS
import au.gov.health.covidsafe.ui.onboarding.CountryCodeSelectionActivity
+import au.gov.health.covidsafe.ui.onboarding.NOLFOLK_ISLAND
import au.gov.health.covidsafe.ui.onboarding.fragment.enterpin.EnterPinFragment.Companion.ENTER_PIN_CALLING_CODE
import au.gov.health.covidsafe.ui.onboarding.fragment.enterpin.EnterPinFragment.Companion.ENTER_PIN_CHALLENGE_NAME
import au.gov.health.covidsafe.ui.onboarding.fragment.enterpin.EnterPinFragment.Companion.ENTER_PIN_DESTINATION_ID
@@ -114,6 +116,12 @@ class EnterNumberFragment : PagerChildFragment() {
country_selection_box.setOnClickListener {
startActivity(Intent(this.requireContext(), CountryCodeSelectionActivity::class.java))
}
+
+ if (callingCode == AUS || callingCode == NOLFOLK_ISLAND) {
+ registration_error.visibility = GONE
+ } else {
+ registration_error.visibility = VISIBLE
+ }
}
private fun hideInvalidPhoneNumberPrompt() {
diff --git a/app/src/main/res/layout/fragment_enter_number.xml b/app/src/main/res/layout/fragment_enter_number.xml
index 6bfd26f..c438227 100644
--- a/app/src/main/res/layout/fragment_enter_number.xml
+++ b/app/src/main/res/layout/fragment_enter_number.xml
@@ -83,6 +83,25 @@
+
+
+ app:layout_constraintTop_toBottomOf="@+id/registration_error" />
+ app:external_linkCard_title="@string/privacy_policy"
+ android:visibility="gone"/>
diff --git a/app/src/main/res/layout/view_home_setup_complete.xml b/app/src/main/res/layout/view_home_setup_complete.xml
index b15b14c..c7f613b 100644
--- a/app/src/main/res/layout/view_home_setup_complete.xml
+++ b/app/src/main/res/layout/view_home_setup_complete.xml
@@ -81,5 +81,33 @@
android:text="@string/home_header_no_pairing"
android:textColor="@color/slate_black_2"
android:textColorLink="@color/slack_black_2" />
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_home_setup_incomplete.xml b/app/src/main/res/layout/view_home_setup_incomplete.xml
index aa7af36..e935b68 100644
--- a/app/src/main/res/layout/view_home_setup_incomplete.xml
+++ b/app/src/main/res/layout/view_home_setup_incomplete.xml
@@ -164,4 +164,36 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_state_case_statistics.xml b/app/src/main/res/layout/view_state_case_statistics.xml
index 8011de1..6b6ec70 100644
--- a/app/src/main/res/layout/view_state_case_statistics.xml
+++ b/app/src/main/res/layout/view_state_case_statistics.xml
@@ -29,6 +29,21 @@
android:background="@color/divider_line_grey"
app:layout_constraintTop_toTopOf="parent" />
+
+
+ app:layout_constraintTop_toBottomOf="@+id/date_desc" />
+
+
+ app:layout_constraintTop_toBottomOf="@+id/date_desc_v2" />
Please check your internet connection
You may be connected using an internet provider from outside Australia. This could happen when using international data roaming on a non-Australian SIM card.\n\nPlease connect to an Australian network or use a local Wi-Fi internet connection to continue.
+ Note: You can only complete registration once you’ve arrived in Australia.
OK
Heading
Hide
@@ -396,6 +397,7 @@
Please register again
Registration successfully renewed
Last 7 days
+ Latest available case numbers since %@
Learn more
Loading latest numbers
%@ locally acquired