Add privacy policy in app
This commit is contained in:
parent
099845e1e2
commit
33bede159f
3 changed files with 15 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package dev.jdtech.jellyfin.fragments
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatDelegate.*
|
||||
import androidx.navigation.fragment.findNavController
|
||||
|
@ -28,6 +29,15 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||
true
|
||||
}
|
||||
|
||||
findPreference<Preference>("privacyPolicy")?.setOnPreferenceClickListener {
|
||||
val intent = Intent(
|
||||
Intent.ACTION_VIEW,
|
||||
Uri.parse("https://github.com/jarnedemeulemeester/findroid/blob/main/PRIVACY")
|
||||
)
|
||||
startActivity(intent)
|
||||
true
|
||||
}
|
||||
|
||||
findPreference<Preference>("ossLicenses")?.setOnPreferenceClickListener {
|
||||
startActivity(Intent(requireContext(), OssLicensesMenuActivity::class.java))
|
||||
true
|
||||
|
|
|
@ -53,4 +53,5 @@
|
|||
<string name="version">Version</string>
|
||||
<string name="open_source_licenses">Open source licenses</string>
|
||||
<string name="about">About</string>
|
||||
<string name="privacy_policy">Privacy policy</string>
|
||||
</resources>
|
|
@ -41,6 +41,10 @@
|
|||
|
||||
<PreferenceCategory app:title="@string/about">
|
||||
|
||||
<Preference
|
||||
app:key="privacyPolicy"
|
||||
app:title="@string/privacy_policy" />
|
||||
|
||||
<Preference
|
||||
app:key="ossLicenses"
|
||||
app:title="@string/open_source_licenses" />
|
||||
|
|
Loading…
Reference in a new issue