diff --git a/.circleci/README.md b/.circleci/README.md new file mode 100644 index 0000000..644b5d3 --- /dev/null +++ b/.circleci/README.md @@ -0,0 +1,13 @@ + +## Introduction + +CircleCI has a workflow configured to build UAT builds once a merge is done to the master branch. In the same way, there is a workflow for production and it runs when a commit is done to any /release_* branch. + + +## CircleCI Project Configuration + +No environment variables are needed as the gradle project is configured and the repo has all dependencies. + +## Distribution + +Please download the APK from the generated artefacts for distribution diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..bade215 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,60 @@ +# Circle CI Build config for COVIDSafe +version: 2.1 + +orbs: + android: circleci/android@0.2.0 + +executors: + android-executor: android/android + +jobs: + + # test the build + test-build: + executor: android-executor + steps: + - checkout + - run: touch local.properties + + # do a UAT apk build + uat-build: + executor: android-executor + steps: + - checkout + - run: + command: ./gradlew assembleDebug + - store_artifacts: + path: ./app/build/outputs + + # do a release build + release-build: + executor: android-executor + steps: + - checkout + - run: + command: ./gradlew assembleRelease + - store_artifacts: + path: ./app/build/outputs + +workflows: + version: 2 + build-deploy: + jobs: + # test the build on every commit on every branch + - test-build + + # build a UAT apk on commit to master + - uat-build: + requires: + - test-build + filters: + branches: + only: master + + # release a build on commit to any release branch + - release-build: + requires: + - test-build + filters: + branches: + only: /release_*/ diff --git a/app/build.gradle b/app/build.gradle index 915d706..035af45 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 124 - versionName "2.4" + versionCode 125 + versionName "2.5" buildConfigField "String", "GITHASH", "\"${getGitHash()}\"" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/java/au/gov/health/covidsafe/links/LinkBuilder.kt b/app/src/main/java/au/gov/health/covidsafe/links/LinkBuilder.kt index 45ea996..dad383a 100644 --- a/app/src/main/java/au/gov/health/covidsafe/links/LinkBuilder.kt +++ b/app/src/main/java/au/gov/health/covidsafe/links/LinkBuilder.kt @@ -58,7 +58,7 @@ object LinkBuilder { return url } - private fun getPrivacyTopicsUrl(): String { + fun getPrivacyTopicsUrl(): String { val url = buildLocalisedURL(PRIVACY_TOPICS_BASE) CentralLog.d(TAG, "getPrivacyTopicsUrl() $url") return url 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 51d3a70..78336e0 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 @@ -8,6 +8,7 @@ import android.content.Context import android.content.Intent import android.content.IntentFilter import android.graphics.Typeface +import android.net.Uri import android.os.Bundle import android.text.method.LinkMovementMethod import android.view.LayoutInflater @@ -40,6 +41,7 @@ import au.gov.health.covidsafe.utils.AnimationUtils.slideAnimation import au.gov.health.covidsafe.utils.NetworkConnectionCheck import au.gov.health.covidsafe.utils.SlideDirection import au.gov.health.covidsafe.utils.SlideType +import kotlinx.android.synthetic.main.fragment_data_privacy.view.* import kotlinx.android.synthetic.main.fragment_home.* import kotlinx.android.synthetic.main.fragment_home_case_statistics.* import kotlinx.android.synthetic.main.fragment_home_external_links.* @@ -51,9 +53,7 @@ import kotlinx.android.synthetic.main.view_home_setup_incomplete.* import kotlinx.android.synthetic.main.view_national_case_statistics.national_case_layout import kotlinx.android.synthetic.main.view_state_case_statistics.* import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ensureActive import kotlinx.coroutines.launch -import org.json.JSONObject import pub.devrel.easypermissions.AppSettingsDialog import pub.devrel.easypermissions.EasyPermissions import java.text.SimpleDateFormat @@ -250,6 +250,7 @@ class HomeFragment : BaseFragment(), EasyPermissions.PermissionCallbacks, Networ initializeAppShareNavigation() initializeHelpTopicsNavigation() initializeChangeLanguageNavigation() + initializePrivacyNavigation() registerBroadcastListener() @@ -343,6 +344,15 @@ class HomeFragment : BaseFragment(), EasyPermissions.PermissionCallbacks, Networ } } + private fun initializePrivacyNavigation() { + privacy_link.setOnClickListener { + val browserIntent = Intent(Intent.ACTION_VIEW) + val url = LinkBuilder.getPrivacyTopicsUrl() + browserIntent.data = Uri.parse(url) + startActivity(browserIntent) + } + } + private fun initializeChangeLanguageNavigation() { change_language_link.setOnClickListener { HelpFragment.anchor = "#other-languages" diff --git a/app/src/main/res/drawable/ic_privace.xml b/app/src/main/res/drawable/ic_privace.xml new file mode 100644 index 0000000..cd17150 --- /dev/null +++ b/app/src/main/res/drawable/ic_privace.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/app/src/main/res/layout/fragment_home_external_links.xml b/app/src/main/res/layout/fragment_home_external_links.xml index c5a1ba4..faee4db 100644 --- a/app/src/main/res/layout/fragment_home_external_links.xml +++ b/app/src/main/res/layout/fragment_home_external_links.xml @@ -48,11 +48,10 @@ + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 64103ee..4e376f8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -475,6 +475,8 @@ There was an error. Check your internet connection and try again. Current postcode in Australia Your postcode has been updated + Privacy policy + Read the privacy policy for COVIDSafe app Queensland Issues receiving your PIN? Total cases recovered