Commit 4c3d5777 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Add screen with Privacy policy.

parent 54ad0d87
......@@ -26,6 +26,7 @@ import
import ru.terrakok.gitlabclient.ui.privacypolicy.PrivacyPolicyFragment
import ru.terrakok.gitlabclient.ui.project.ProjectFlowFragment
import ru.terrakok.gitlabclient.ui.project.ProjectFragment
import ru.terrakok.gitlabclient.ui.project.ProjectInfoFragment
......@@ -90,6 +91,7 @@ object Screens {
const val EXTERNAL_BROWSER_FLOW = "external browser flow"
const val SHARE_FLOW = "share flow"
const val CALL_FLOW = "call flow"
const val PRIVACY_POLICY_FLOW = "privacy policy flow"
fun createIntent(flowKey: String, data: Any?) = when (flowKey) {
Screens.EXTERNAL_BROWSER_FLOW -> Intent(Intent.ACTION_VIEW, Uri.parse(data as String))
......@@ -162,6 +164,8 @@ object Screens {
Screens.ISSUE_SCREEN -> IssueFragment()
Screens.ISSUE_INFO_SCREEN -> IssueInfoFragment()
Screens.ISSUE_NOTES_SCREEN -> IssueNotesFragment()
Screens.PRIVACY_POLICY_FLOW -> PrivacyPolicyFragment()
else -> null
\ No newline at end of file
......@@ -40,6 +40,8 @@ class AboutPresenter @Inject constructor(
fun onShowLibrariesClicked() = router.startFlow(Screens.APP_LIBRARIES_FLOW)
fun onPrivacyPolicyClicked() = router.startFlow(Screens.PRIVACY_POLICY_FLOW)
fun onDeveloperClicked(id: Long) = router.startFlow(Screens.USER_FLOW, id)
fun onMenuPressed() =
......@@ -42,6 +42,7 @@ class AboutFragment : BaseFragment(), AboutView {
toolbar.setNavigationOnClickListener { presenter.onMenuPressed() }
feedbackView.setOnClickListener { tryOpenLink(supportUrl) }
librariesView.setOnClickListener { presenter.onShowLibrariesClicked() }
privacyPolicyView.setOnClickListener { presenter.onPrivacyPolicyClicked() }
override fun showAppInfo(appInfo: AppInfo) {
package ru.terrakok.gitlabclient.ui.privacypolicy
import android.os.Bundle
import android.view.View
import ru.terrakok.cicerone.Router
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.toothpick.DI
import toothpick.Toothpick
import javax.inject.Inject
* Created by Konstantin Tskhovrebov (aka @terrakok) on 26.09.18.
class PrivacyPolicyFragment : BaseFragment() {
override val layoutRes = R.layout.fragment_privacy_policy
lateinit var router: Router
override fun onCreate(savedInstanceState: Bundle?) {
Toothpick.inject(this, Toothpick.openScope(DI.APP_SCOPE))
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
toolbar.setNavigationOnClickListener { onBackPressed() }
okButton.setOnClickListener { onBackPressed() }
webView.loadData(PRIVACY_POLICY_HTML, null, null)
override fun onBackPressed() {
private const val PRIVACY_POLICY_HTML: String = """
<!DOCTYPE html>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width'>
<title>Privacy Policy</title>
<style> body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; padding:1em; } </style>
<h2>Privacy Policy</h2> <p> Konstantin Tskhovrebov built the GitFox app as an Open Source app. This SERVICE is provided by Konstantin Tskhovrebov at no cost and is intended for use as is.
</p> <p>This page is used to inform visitors regarding my policies with the collection, use, and
disclosure of Personal Information if anyone decided to use my Service.
</p> <p>If you choose to use my Service, then you agree to the collection and use of information in relation
to this policy. The Personal Information that I collect is used for providing and improving the
Service. I will not use or share your information with anyone except as described
in this Privacy Policy.
</p> <p>The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible
at GitFox unless otherwise defined in this Privacy Policy.
</p> <p><strong>Information Collection and Use</strong></p> <p>For a better experience, while using our Service, I may require you to provide us with certain
personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way.
</p> <p>The app does use third party services that may collect information used to identify you.</p> <div><p>Link to privacy policy of third party service providers used by the app</p> <ul><!----> <!----> <li><a href="" target="_blank">Firebase Analytics</a></li> <!----> <li><a href="" target="_blank">Crashlytics</a></li> <!----> <!----></ul></div> <p><strong>Log Data</strong></p> <p> I want to inform you that whenever you use my Service, in a case of an
error in the app I collect data and information (through third party products) on your phone
called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address,
device name, operating system version, the configuration of the app when utilizing my Service,
the time and date of your use of the Service, and other statistics.
</p> <p><strong>Cookies</strong></p> <p>Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These
are sent to your browser from the websites that you visit and are stored on your device's internal memory.
</p> <p>This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries
that use “cookies” to collect information and improve their services. You have the option to either
accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to
refuse our cookies, you may not be able to use some portions of this Service.
</p> <p><strong>Service Providers</strong></p> <p> I may employ third-party companies and individuals due to the following reasons:</p> <ul><li>To facilitate our Service;</li> <li>To provide the Service on our behalf;</li> <li>To perform Service-related services; or</li> <li>To assist us in analyzing how our Service is used.</li></ul> <p> I want to inform users of this Service that these third parties have access to your
Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they
are obligated not to disclose or use the information for any other purpose.
</p> <p><strong>Security</strong></p> <p> I value your trust in providing us your Personal Information, thus we are striving
to use commercially acceptable means of protecting it. But remember that no method of transmission over
the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee
its absolute security.
</p> <p><strong>Links to Other Sites</strong></p> <p>This Service may contain links to other sites. If you click on a third-party link, you will be directed
to that site. Note that these external sites are not operated by me. Therefore, I strongly
advise you to review the Privacy Policy of these websites. I have no control over
and assume no responsibility for the content, privacy policies, or practices of any third-party sites
or services.
</p> <p><strong>Children’s Privacy</strong></p> <p>These Services do not address anyone under the age of 13. I do not knowingly collect
personally identifiable information from children under 13. In the case I discover that a child
under 13 has provided me with personal information, I immediately delete this from
our servers. If you are a parent or guardian and you are aware that your child has provided us with personal
information, please contact me so that I will be able to do necessary actions.
</p> <p><strong>Changes to This Privacy Policy</strong></p> <p> I may update our Privacy Policy from time to time. Thus, you are advised to review
this page periodically for any changes. I will notify you of any changes by posting
the new Privacy Policy on this page. These changes are effective immediately after they are posted on
this page.
</p> <p><strong>Contact Us</strong></p> <p>If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact
\ No newline at end of file
<vector android:height="24dp"
android:pathData="M15,15L3,15v2h12v-2zM15,7L3,7v2h12L15,7zM3,13h18v-2L3,11v2zM3,21h18v-2L3,19v2zM3,3v2h18L21,3L3,3z" />
......@@ -92,6 +92,18 @@
android:textSize="16sp" />
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""
app:title="@string/privacy_policy" />
android:layout_weight="1" />
app:backgroundTint="@color/colorAccent" />
......@@ -153,4 +153,7 @@
<string name="menu_project_info">Info</string>
<string name="menu_project_issue">Issues</string>
<string name="menu_project_merge_request">Merge Requests</string>
<!--Privacy policy screen-->
<string name="privacy_policy">Privacy policy</string>
buildscript {
ext.kotlinVersion = '1.2.70'
ext.kotlinVersion = '1.2.71'
repositories {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment