feat: Link to the privacy policy from "About" (#137)

Google requires an in-app link to the privacy policy.
This commit is contained in:
Nik Clayton 2023-09-30 13:15:44 +02:00 committed by GitHub
parent cd1d8294ca
commit 651b0efcd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 26 deletions

View File

@ -47,7 +47,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="build.gradle"
line="32"
line="33"
column="9"/>
</issue>
@ -663,7 +663,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="564"
line="565"
column="5"/>
</issue>
@ -674,7 +674,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="777"
line="778"
column="5"/>
</issue>
@ -1774,7 +1774,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="461"
line="462"
column="13"/>
</issue>
@ -1785,7 +1785,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="512"
line="513"
column="13"/>
</issue>
@ -1796,7 +1796,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="516"
line="517"
column="13"/>
</issue>
@ -1807,7 +1807,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="517"
line="518"
column="13"/>
</issue>
@ -1818,7 +1818,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="518"
line="519"
column="13"/>
</issue>
@ -1829,7 +1829,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="519"
line="520"
column="13"/>
</issue>
@ -1840,7 +1840,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="520"
line="521"
column="13"/>
</issue>
@ -1851,7 +1851,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="521"
line="522"
column="13"/>
</issue>
@ -1862,7 +1862,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="522"
line="523"
column="13"/>
</issue>
@ -1873,7 +1873,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="523"
line="524"
column="13"/>
</issue>
@ -1884,7 +1884,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="525"
line="526"
column="13"/>
</issue>
@ -1895,7 +1895,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="603"
line="604"
column="13"/>
</issue>
@ -1906,7 +1906,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="604"
line="605"
column="13"/>
</issue>
@ -1917,7 +1917,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="619"
line="620"
column="13"/>
</issue>
@ -1928,7 +1928,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="621"
line="622"
column="13"/>
</issue>
@ -1939,7 +1939,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="622"
line="623"
column="13"/>
</issue>
@ -1950,7 +1950,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="625"
line="626"
column="13"/>
</issue>
@ -1961,7 +1961,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="670"
line="671"
column="13"/>
</issue>
@ -1972,7 +1972,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="718"
line="719"
column="13"/>
</issue>
@ -1983,7 +1983,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="724"
line="725"
column="13"/>
</issue>
@ -1994,7 +1994,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="765"
line="766"
column="13"/>
</issue>
@ -2005,7 +2005,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="799"
line="800"
column="13"/>
</issue>
@ -2064,6 +2064,17 @@
column="9"/>
</issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `setClickableTextWithoutUnderlines` of class `AboutActivityKt` requires synthetic accessor"
errorLine1=" binding.aboutPrivacyPolicyTextView.setClickableTextWithoutUnderlines(R.string.about_privacy_policy)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/app/pachli/AboutActivity.kt"
line="76"
column="9"/>
</issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `isSameDate` of class `Companion` requires synthetic accessor"

View File

@ -73,6 +73,7 @@ class AboutActivity : BottomSheetActivity(), Injectable {
binding.aboutLicenseInfoTextView.setClickableTextWithoutUnderlines(R.string.about_pachli_license)
binding.aboutWebsiteInfoTextView.setClickableTextWithoutUnderlines(R.string.about_project_site)
binding.aboutBugsFeaturesInfoTextView.setClickableTextWithoutUnderlines(R.string.about_bug_feature_request_site)
binding.aboutPrivacyPolicyTextView.setClickableTextWithoutUnderlines(R.string.about_privacy_policy)
binding.appProfileButton.setOnClickListener {
viewUrl(BuildConfig.SUPPORT_ACCOUNT_URL)

View File

@ -169,6 +169,19 @@
app:layout_constraintStart_toStartOf="@+id/aboutWebsiteInfoTextView"
app:layout_constraintTop_toBottomOf="@id/aboutWebsiteInfoTextView" />
<app.pachli.view.ClickableSpanTextView
android:id="@+id/aboutPrivacyPolicyTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:lineSpacingMultiplier="1.2"
android:text="@string/about_privacy_policy"
android:textIsSelectable="true"
app:layout_constraintEnd_toEndOf="@+id/aboutWebsiteInfoTextView"
app:layout_constraintStart_toStartOf="@+id/aboutWebsiteInfoTextView"
app:layout_constraintTop_toBottomOf="@id/aboutBugsFeaturesInfoTextView" />
<Button
android:id="@+id/appProfileButton"
style="@style/AppButton"
@ -183,7 +196,7 @@
android:layout_marginEnd="@dimen/text_content_margin"
app:layout_constraintEnd_toStartOf="@+id/aboutLicensesButton"
app:layout_constraintStart_toStartOf="@+id/aboutBugsFeaturesInfoTextView"
app:layout_constraintTop_toBottomOf="@id/aboutBugsFeaturesInfoTextView" />
app:layout_constraintTop_toBottomOf="@id/aboutPrivacyPolicyTextView" />
<Button
android:id="@+id/aboutLicensesButton"

View File

@ -418,6 +418,7 @@
* the url can be changed to link to the localized version of the license.
-->
<string name="about_project_site">Project website: https://pachli.app</string>
<string name="about_privacy_policy">Privacy policy: https://github.com/pachli/pachli-android/blob/main/PRIVACY.md</string>
<string name="about_bug_feature_request_site">Bug reports &amp; feature requests:\nhttps://github.com/pachli/pachli-android/issues</string>
<string name="about_pachli_account">Pachli\'s Profile</string>