Skip to content

Commit

Permalink
Fix: #238 - Data agreement screen issues
Browse files Browse the repository at this point in the history
  • Loading branch information
josmilan authored and georgepadayatti committed Nov 28, 2023
1 parent e9b084c commit 03296b8
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ object PrivacyDashboard {
): String {
var list: ArrayList<ArrayList<DataAgreementPolicyModel>> = ArrayList()
var subList: ArrayList<DataAgreementPolicyModel> = ArrayList()
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_version),
dataAgreement?.version
)
)
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_purpose),
Expand Down Expand Up @@ -105,14 +111,20 @@ object PrivacyDashboard {
)
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_third_party_disclosure),
dataAgreement?.policy?.thirdPartyDataSharing.toString()
context.resources.getString(R.string.bb_consent_data_agreement_policy_industry_scope),
dataAgreement?.policy?.industrySector
)
)
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_industry_scope),
dataAgreement?.policy?.industrySector
context.resources.getString(R.string.bb_consent_data_agreement_policy_storage_location),
dataAgreement?.policy?.storageLocation
)
)
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_retention_period),
dataAgreement?.policy?.dataRetentionPeriodDays.toString()
)
)
subList.add(
Expand All @@ -123,14 +135,22 @@ object PrivacyDashboard {
)
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_retention_period),
dataAgreement?.policy?.dataRetentionPeriodDays.toString()
context.resources.getString(R.string.bb_consent_data_agreement_policy_third_party_disclosure),
dataAgreement?.policy?.thirdPartyDataSharing.toString()
)
)
list.add(subList)
subList = ArrayList()
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_storage_location),
dataAgreement?.policy?.storageLocation
context.resources.getString(R.string.bb_consent_data_agreement_policy_dpia_summary),
dataAgreement?.dpiaSummaryUrl
)
)
subList.add(
DataAgreementPolicyModel(
context.resources.getString(R.string.bb_consent_data_agreement_policy_dpia_date),
dataAgreement?.dpiaDate
)
)
list.add(subList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,21 @@ class BBConsentDataSharingActivity : BBConsentBaseActivity() {
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
)
}
textView.highlightColor = Color.TRANSPARENT // prevent TextView change background when highlight
textView.highlightColor =
Color.TRANSPARENT // prevent TextView change background when highlight
textView.movementMethod = LinkMovementMethod.getInstance()
textView.setText(spannableString, TextView.BufferType.SPANNABLE)
}

private fun buildListForDataAgreementPolicy(dataAgreement: DataAgreementV2?): String {
var list: ArrayList<ArrayList<DataAgreementPolicyModel>> = ArrayList()
var subList: ArrayList<DataAgreementPolicyModel> = ArrayList()
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_version),
dataAgreement?.version
)
)
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_purpose),
Expand Down Expand Up @@ -278,14 +285,20 @@ class BBConsentDataSharingActivity : BBConsentBaseActivity() {
)
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_third_party_disclosure),
dataAgreement?.policy?.thirdPartyDataSharing.toString()
resources.getString(R.string.bb_consent_data_agreement_policy_industry_scope),
dataAgreement?.policy?.industrySector
)
)
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_industry_scope),
dataAgreement?.policy?.industrySector
resources.getString(R.string.bb_consent_data_agreement_policy_storage_location),
dataAgreement?.policy?.storageLocation
)
)
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_retention_period),
dataAgreement?.policy?.dataRetentionPeriodDays.toString()
)
)
subList.add(
Expand All @@ -296,14 +309,22 @@ class BBConsentDataSharingActivity : BBConsentBaseActivity() {
)
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_retention_period),
dataAgreement?.policy?.dataRetentionPeriodDays.toString()
resources.getString(R.string.bb_consent_data_agreement_policy_third_party_disclosure),
dataAgreement?.policy?.thirdPartyDataSharing.toString()
)
)
list.add(subList)
subList = ArrayList()
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_storage_location),
dataAgreement?.policy?.storageLocation
resources.getString(R.string.bb_consent_data_agreement_policy_dpia_summary),
dataAgreement?.dpiaSummaryUrl
)
)
subList.add(
DataAgreementPolicyModel(
resources.getString(R.string.bb_consent_data_agreement_policy_dpia_date),
dataAgreement?.dpiaDate
)
)
list.add(subList)
Expand Down
3 changes: 3 additions & 0 deletions PrivacyDashboard/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
<string name="bb_consent_data_agreement_policy_geographic_restriction">Maantieteellinen rajoitus</string>
<string name="bb_consent_data_agreement_policy_retention_period">Säilytysaika</string>
<string name="bb_consent_data_agreement_policy_storage_location">Säilytyspaikka</string>
<string name="bb_consent_data_agreement_policy_dpia_date">DPIA-päivämäärä</string>
<string name="bb_consent_data_agreement_policy_dpia_summary">DPIA-yhteenveto</string>
<string name="bb_consent_data_agreement_policy_version">Versio</string>
<string name="bb_consent_data_sharing_authorize">Valtuuttaa</string>
<string name="bb_consent_data_sharing_cancel">Keskeytä</string>
</resources>
3 changes: 3 additions & 0 deletions PrivacyDashboard/src/main/res/values-sv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
<string name="bb_consent_data_agreement_policy_geographic_restriction">Geografisk begränsning</string>
<string name="bb_consent_data_agreement_policy_retention_period">Lagringstid</string>
<string name="bb_consent_data_agreement_policy_storage_location">Lagringsplats</string>
<string name="bb_consent_data_agreement_policy_dpia_date">DPIA Datum</string>
<string name="bb_consent_data_agreement_policy_dpia_summary">DPIA Sammanfattning</string>
<string name="bb_consent_data_agreement_policy_version">Version</string>
<string name="bb_consent_data_sharing_authorize">Godkännande</string>
<string name="bb_consent_data_sharing_cancel">Avbryt</string>
</resources>
3 changes: 3 additions & 0 deletions PrivacyDashboard/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
<string name="bb_consent_data_agreement_policy_geographic_restriction">Geographic restriction</string>
<string name="bb_consent_data_agreement_policy_retention_period">Retention period</string>
<string name="bb_consent_data_agreement_policy_storage_location">Storage location</string>
<string name="bb_consent_data_agreement_policy_dpia_date">DPIA Date</string>
<string name="bb_consent_data_agreement_policy_dpia_summary">DPIA Summary</string>
<string name="bb_consent_data_agreement_policy_version">Version</string>
<string name="bb_consent_data_sharing_authorize">Authorize</string>
<string name="bb_consent_data_sharing_cancel">Cancel</string>

Expand Down

0 comments on commit 03296b8

Please sign in to comment.