COVIDSafe code from version 2.7 (#52)

This commit is contained in:
COVIDSafe Support 2021-06-09 17:27:36 -07:00 committed by GitHub
parent 2406cc21a1
commit ef800f99c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 146 additions and 9 deletions

View file

@ -29,8 +29,8 @@ android {
applicationId "au.gov.health.covidsafe" applicationId "au.gov.health.covidsafe"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 128 versionCode 132
versionName "2.6" versionName "2.7"
buildConfigField "String", "GITHASH", "\"${getGitHash()}\"" buildConfigField "String", "GITHASH", "\"${getGitHash()}\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -110,6 +110,9 @@ class HomeFragment : BaseFragment(), EasyPermissions.PermissionCallbacks, Networ
removeRegistrationData() removeRegistrationData()
NetworkConnectionCheck.addNetworkChangedListener(requireContext(), this) 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() { private fun removeRegistrationData() {
@ -366,6 +369,20 @@ class HomeFragment : BaseFragment(), EasyPermissions.PermissionCallbacks, Networ
browserIntent.data = Uri.parse(url) browserIntent.data = Uri.parse(url)
startActivity(browserIntent) 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() { private fun initializeChangeLanguageNavigation() {

View file

@ -13,6 +13,8 @@ import au.gov.health.covidsafe.app.TracerApp
const val VIEW_TYPE_GROUP_TITLE = 1 const val VIEW_TYPE_GROUP_TITLE = 1
const val VIEW_TYPE_COUNTRY = 2 const val VIEW_TYPE_COUNTRY = 2
const val NOLFOLK_ISLAND = 672
const val AUS = 61
interface CountryListItemInterface interface CountryListItemInterface
@ -69,7 +71,6 @@ class CountryListItemHolder(
Preference.putCountryNameResID(TracerApp.AppContext, countryNameResId) Preference.putCountryNameResID(TracerApp.AppContext, countryNameResId)
Preference.putCallingCode(TracerApp.AppContext, callingCode) Preference.putCallingCode(TracerApp.AppContext, callingCode)
Preference.putNationalFlagResID(TracerApp.AppContext, flagResID) Preference.putNationalFlagResID(TracerApp.AppContext, flagResID)
onCountryClicked() onCountryClicked()
} }
} }

View file

@ -23,7 +23,9 @@ import au.gov.health.covidsafe.preference.Preference
import au.gov.health.covidsafe.talkback.setHeading import au.gov.health.covidsafe.talkback.setHeading
import au.gov.health.covidsafe.ui.base.PagerChildFragment import au.gov.health.covidsafe.ui.base.PagerChildFragment
import au.gov.health.covidsafe.ui.base.UploadButtonLayout 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.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_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_CHALLENGE_NAME
import au.gov.health.covidsafe.ui.onboarding.fragment.enterpin.EnterPinFragment.Companion.ENTER_PIN_DESTINATION_ID 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 { country_selection_box.setOnClickListener {
startActivity(Intent(this.requireContext(), CountryCodeSelectionActivity::class.java)) 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() { private fun hideInvalidPhoneNumberPrompt() {

View file

@ -83,6 +83,25 @@
</FrameLayout> </FrameLayout>
<TextView
android:id="@+id/registration_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/keyline_5"
android:layout_marginTop="6dp"
android:layout_marginEnd="@dimen/keyline_5"
android:gravity="center_vertical|start"
android:importantForAccessibility="no"
android:text="@string/geoblock_rego_error"
android:textAlignment="viewStart"
android:singleLine="false"
android:textColor="@color/error_red"
android:textAppearance="?textAppearanceBody1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/country_selection_box"
android:visibility="gone"/>
<TextView <TextView
android:id="@+id/enter_number_headline" android:id="@+id/enter_number_headline"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -97,7 +116,7 @@
android:textAppearance="?textAppearanceBody1" android:textAppearance="?textAppearanceBody1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/country_selection_box" /> app:layout_constraintTop_toBottomOf="@+id/registration_error" />
<EditText <EditText
android:id="@+id/enter_number_phone_number" android:id="@+id/enter_number_phone_number"

View file

@ -71,7 +71,8 @@
app:external_linkCard_start_icon="@drawable/ic_privace" app:external_linkCard_start_icon="@drawable/ic_privace"
app:external_linkCard_start_icon_background="@drawable/background_circular_green" app:external_linkCard_start_icon_background="@drawable/background_circular_green"
app:external_linkCard_start_icon_padding="@dimen/space_8" app:external_linkCard_start_icon_padding="@dimen/space_8"
app:external_linkCard_title="@string/privacy_policy" /> app:external_linkCard_title="@string/privacy_policy"
android:visibility="gone"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

View file

@ -81,5 +81,33 @@
android:text="@string/home_header_no_pairing" android:text="@string/home_header_no_pairing"
android:textColor="@color/slate_black_2" android:textColor="@color/slate_black_2"
android:textColorLink="@color/slack_black_2" /> android:textColorLink="@color/slack_black_2" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider_line_grey" />
<RelativeLayout
android:id="@+id/privacy_card_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/space_16">
<TextView
style="@style/fontRobotoRegular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/privacy_policy"
android:textColor="@color/slate_black_2"
android:textColorLink="@color/slack_black_2" />
<ImageView
android:layout_width="@dimen/active_status_tick_image_size"
android:layout_height="@dimen/active_status_tick_image_size"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_chevron_right_black"/>
</RelativeLayout>
</LinearLayout> </LinearLayout>

View file

@ -164,4 +164,36 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout> </FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider_line_grey" />
<RelativeLayout
android:id="@+id/privacy_card_inactive_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/space_16">
<TextView
style="@style/fontRobotoRegular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/privacy_policy"
android:textColor="@color/slate_black_2"
android:textColorLink="@color/slack_black_2" />
<ImageView
android:layout_width="@dimen/active_status_tick_image_size"
android:layout_height="@dimen/active_status_tick_image_size"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_chevron_right_black"/>
</RelativeLayout>
</FrameLayout>
</LinearLayout> </LinearLayout>

View file

@ -29,6 +29,21 @@
android:background="@color/divider_line_grey" android:background="@color/divider_line_grey"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/date_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/space_16"
android:layout_marginEnd="@dimen/space_16"
android:layout_marginBottom="@dimen/space_16"
android:layout_marginTop="@dimen/space_16"
android:text="Latest available case number since "
android:textAppearance="@style/fontRobotoRegular16"
android:textColor="@color/slate_black_2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/top_case_line_divider"
visibility="@{viewModel.caseStatisticsLiveData != null}"/>
<TextView <TextView
android:id="@+id/date_text_view" android:id="@+id/date_text_view"
dateFormat="@{viewModel.caseStatisticsLiveData.updatedDate}" dateFormat="@{viewModel.caseStatisticsLiveData.updatedDate}"
@ -38,14 +53,14 @@
android:layout_marginStart="@dimen/space_16" android:layout_marginStart="@dimen/space_16"
android:layout_marginEnd="@dimen/space_16" android:layout_marginEnd="@dimen/space_16"
android:layout_marginBottom="@dimen/space_16" android:layout_marginBottom="@dimen/space_16"
android:layout_marginTop="@dimen/space_16" android:layout_marginTop="@dimen/space_4"
android:text="27 August 2020 at 3pm AEST" android:text="27 August 2020 at 3pm AEST"
android:textAppearance="@style/fontRobotoRegular16" android:textAppearance="@style/fontRobotoRegular16"
android:textColor="@color/slate_black_2" android:textColor="@color/slate_black_2"
android:visibility="visible" android:visibility="visible"
tools:text="27 August 2020 at 3pm AEST" tools:text="27 August 2020 at 3pm AEST"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/top_case_line_divider" /> app:layout_constraintTop_toBottomOf="@+id/date_desc" />
<au.gov.health.covidsafe.ui.home.view.ExternalLinkCard <au.gov.health.covidsafe.ui.home.view.ExternalLinkCard
android:id="@+id/national_new_case_card" android:id="@+id/national_new_case_card"
@ -454,6 +469,20 @@
android:background="@color/divider_line_grey" android:background="@color/divider_line_grey"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/date_desc_v2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/space_16"
android:layout_marginEnd="@dimen/space_16"
android:layout_marginBottom="@dimen/space_16"
android:layout_marginTop="@dimen/space_16"
android:textAppearance="@style/fontRobotoRegular16"
android:textColor="@color/slate_black_2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/top_case_line_divider_v2"
visibility="@{viewModel.caseStatisticsLiveData != null}"/>
<TextView <TextView
android:id="@+id/date_text_view_v2" android:id="@+id/date_text_view_v2"
dateFormat="@{viewModel.caseStatisticsLiveData.updatedDate}" dateFormat="@{viewModel.caseStatisticsLiveData.updatedDate}"
@ -463,14 +492,14 @@
android:layout_marginStart="@dimen/space_16" android:layout_marginStart="@dimen/space_16"
android:layout_marginEnd="@dimen/space_16" android:layout_marginEnd="@dimen/space_16"
android:layout_marginBottom="@dimen/space_16" android:layout_marginBottom="@dimen/space_16"
android:layout_marginTop="@dimen/space_16" android:layout_marginTop="@dimen/space_4"
android:text="27 August 2020 at 3pm AEST" android:text="27 August 2020 at 3pm AEST"
android:textAppearance="@style/fontRobotoRegular16" android:textAppearance="@style/fontRobotoRegular16"
android:textColor="@color/slate_black_2" android:textColor="@color/slate_black_2"
android:visibility="visible" android:visibility="visible"
tools:text="27 August 2020 at 3pm AEST" tools:text="27 August 2020 at 3pm AEST"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/top_case_line_divider_v2" /> app:layout_constraintTop_toBottomOf="@+id/date_desc_v2" />
<au.gov.health.covidsafe.ui.home.view.ExternalLinkCard <au.gov.health.covidsafe.ui.home.view.ExternalLinkCard
android:id="@+id/state_new_case_card" android:id="@+id/state_new_case_card"

View file

@ -298,6 +298,7 @@
<string name="generic_internet_error">Please check your internet connection</string> <string name="generic_internet_error">Please check your internet connection</string>
<!-- Error message for when a user tries to signup outside of Australia. --> <!-- Error message for when a user tries to signup outside of Australia. -->
<string name="geoblock_error_message">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.</string> <string name="geoblock_error_message">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.</string>
<string name="geoblock_rego_error">Note: You can only complete registration once youve arrived in Australia.</string>
<string name="global_OK">OK</string> <string name="global_OK">OK</string>
<string name="heading">Heading</string> <string name="heading">Heading</string>
<string name="hide">Hide</string> <string name="hide">Hide</string>
@ -396,6 +397,7 @@
<string name="jwt_heading">Please register again</string> <string name="jwt_heading">Please register again</string>
<string name="jwt_success">Registration successfully renewed</string> <string name="jwt_success">Registration successfully renewed</string>
<string name="last_7_days">Last 7 days</string> <string name="last_7_days">Last 7 days</string>
<string name="latest_case_numbers">Latest available case numbers since %@</string>
<string name="learn_more">Learn more</string> <string name="learn_more">Learn more</string>
<string name="loading_numbers">Loading latest numbers</string> <string name="loading_numbers">Loading latest numbers</string>
<string name="locally_acquired">%@ locally acquired</string> <string name="locally_acquired">%@ locally acquired</string>