mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Merge pull request #77 from loki-project/legal
Update Legal Copy & URLs
This commit is contained in:
commit
384020de95
@ -65,17 +65,16 @@
|
|||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:text="Copy" />
|
android:text="Copy" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/termsButton"
|
android:id="@+id/termsTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
||||||
android:layout_marginLeft="@dimen/massive_spacing"
|
android:layout_marginLeft="@dimen/massive_spacing"
|
||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="@color/transparent"
|
android:textColorLink="@color/text"
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textSize="@dimen/very_small_font_size"
|
android:textSize="@dimen/very_small_font_size"
|
||||||
android:textColor="@color/text"
|
android:textColor="@color/text"
|
||||||
android:text="By using this service, you agree to our Terms and Conditions and Privacy Statement" />
|
android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -55,17 +55,16 @@
|
|||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:text="Continue" />
|
android:text="Continue" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/termsButton"
|
android:id="@+id/termsTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
||||||
android:layout_marginLeft="@dimen/massive_spacing"
|
android:layout_marginLeft="@dimen/massive_spacing"
|
||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="@color/transparent"
|
android:textColorLink="@color/text"
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textSize="@dimen/very_small_font_size"
|
android:textSize="@dimen/very_small_font_size"
|
||||||
android:textColor="@color/text"
|
android:textColor="@color/text"
|
||||||
android:text="By using this service, you agree to our Terms and Conditions and Privacy Statement" />
|
android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -66,17 +66,16 @@
|
|||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:text="Copy" />
|
android:text="Copy" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/termsButton"
|
android:id="@+id/termsTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
||||||
android:layout_marginLeft="@dimen/massive_spacing"
|
android:layout_marginLeft="@dimen/massive_spacing"
|
||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="@color/transparent"
|
android:textColorLink="@color/text"
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textSize="@dimen/very_small_font_size"
|
android:textSize="@dimen/very_small_font_size"
|
||||||
android:textColor="@color/text"
|
android:textColor="@color/text"
|
||||||
android:text="By using this service, you agree to our Terms and Conditions and Privacy Statement" />
|
android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -55,17 +55,16 @@
|
|||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:text="Continue" />
|
android:text="Continue" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/termsButton"
|
android:id="@+id/termsTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
android:layout_height="@dimen/onboarding_button_bottom_offset"
|
||||||
android:layout_marginLeft="@dimen/massive_spacing"
|
android:layout_marginLeft="@dimen/massive_spacing"
|
||||||
android:layout_marginRight="@dimen/massive_spacing"
|
android:layout_marginRight="@dimen/massive_spacing"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="@color/transparent"
|
android:textColorLink="@color/text"
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textSize="@dimen/very_small_font_size"
|
android:textSize="@dimen/very_small_font_size"
|
||||||
android:textColor="@color/text"
|
android:textColor="@color/text"
|
||||||
android:text="By using this service, you agree to our Terms and Conditions and Privacy Statement" />
|
android:text="By using this service, you agree to our Terms of Service and Privacy Policy" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -10,7 +10,10 @@ import android.os.Bundle
|
|||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.text.Spannable
|
import android.text.Spannable
|
||||||
import android.text.SpannableStringBuilder
|
import android.text.SpannableStringBuilder
|
||||||
|
import android.text.method.LinkMovementMethod
|
||||||
|
import android.text.style.ClickableSpan
|
||||||
import android.text.style.StyleSpan
|
import android.text.style.StyleSpan
|
||||||
|
import android.view.View
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import kotlinx.android.synthetic.main.activity_register.*
|
import kotlinx.android.synthetic.main.activity_register.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
@ -45,11 +48,23 @@ class RegisterActivity : BaseActionBarActivity() {
|
|||||||
setUpActionBarSessionLogo()
|
setUpActionBarSessionLogo()
|
||||||
registerButton.setOnClickListener { register() }
|
registerButton.setOnClickListener { register() }
|
||||||
copyButton.setOnClickListener { copyPublicKey() }
|
copyButton.setOnClickListener { copyPublicKey() }
|
||||||
val termsExplanation = SpannableStringBuilder("By using this service, you agree to our Terms and Conditions and Privacy Statement")
|
val termsExplanation = SpannableStringBuilder("By using this service, you agree to our Terms of Service and Privacy Policy")
|
||||||
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 40, 60, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 40, 56, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 65, 82, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
termsExplanation.setSpan(object : ClickableSpan() {
|
||||||
termsButton.text = termsExplanation
|
|
||||||
termsButton.setOnClickListener { showTerms() }
|
override fun onClick(widget: View) {
|
||||||
|
openURL("https://getsession.org/legal/#tos")
|
||||||
|
}
|
||||||
|
}, 40, 56, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 61, 75, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsExplanation.setSpan(object : ClickableSpan() {
|
||||||
|
|
||||||
|
override fun onClick(widget: View) {
|
||||||
|
openURL("https://getsession.org/privacy-policy/")
|
||||||
|
}
|
||||||
|
}, 61, 75, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsTextView.movementMethod = LinkMovementMethod.getInstance()
|
||||||
|
termsTextView.text = termsExplanation
|
||||||
updateKeyPair()
|
updateKeyPair()
|
||||||
}
|
}
|
||||||
// endregion
|
// endregion
|
||||||
@ -142,9 +157,9 @@ class RegisterActivity : BaseActionBarActivity() {
|
|||||||
Toast.makeText(this, R.string.activity_register_public_key_copied_message, Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, R.string.activity_register_public_key_copied_message, Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showTerms() {
|
private fun openURL(url: String) {
|
||||||
try {
|
try {
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/loki-project/loki-messenger-android/blob/master/privacy-policy.md"))
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Toast.makeText(this, "Couldn't open link", Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, "Couldn't open link", Toast.LENGTH_SHORT).show()
|
||||||
|
@ -6,7 +6,10 @@ import android.net.Uri
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.Spannable
|
import android.text.Spannable
|
||||||
import android.text.SpannableStringBuilder
|
import android.text.SpannableStringBuilder
|
||||||
|
import android.text.method.LinkMovementMethod
|
||||||
|
import android.text.style.ClickableSpan
|
||||||
import android.text.style.StyleSpan
|
import android.text.style.StyleSpan
|
||||||
|
import android.view.View
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import kotlinx.android.synthetic.main.activity_restore.*
|
import kotlinx.android.synthetic.main.activity_restore.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
@ -38,11 +41,23 @@ class RestoreActivity : BaseActionBarActivity() {
|
|||||||
setContentView(R.layout.activity_restore)
|
setContentView(R.layout.activity_restore)
|
||||||
mnemonicEditText.imeOptions = mnemonicEditText.imeOptions or 16777216 // Always use incognito keyboard
|
mnemonicEditText.imeOptions = mnemonicEditText.imeOptions or 16777216 // Always use incognito keyboard
|
||||||
restoreButton.setOnClickListener { restore() }
|
restoreButton.setOnClickListener { restore() }
|
||||||
val termsExplanation = SpannableStringBuilder("By using this service, you agree to our Terms and Conditions and Privacy Statement")
|
val termsExplanation = SpannableStringBuilder("By using this service, you agree to our Terms of Service and Privacy Policy")
|
||||||
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 40, 60, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 40, 56, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 65, 82, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
termsExplanation.setSpan(object : ClickableSpan() {
|
||||||
termsButton.text = termsExplanation
|
|
||||||
termsButton.setOnClickListener { showTerms() }
|
override fun onClick(widget: View) {
|
||||||
|
openURL("https://getsession.org/legal/#tos")
|
||||||
|
}
|
||||||
|
}, 40, 56, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsExplanation.setSpan(StyleSpan(Typeface.BOLD), 61, 75, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsExplanation.setSpan(object : ClickableSpan() {
|
||||||
|
|
||||||
|
override fun onClick(widget: View) {
|
||||||
|
openURL("https://getsession.org/privacy-policy/")
|
||||||
|
}
|
||||||
|
}, 61, 75, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
termsTextView.movementMethod = LinkMovementMethod.getInstance()
|
||||||
|
termsTextView.text = termsExplanation
|
||||||
}
|
}
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -97,9 +112,9 @@ class RestoreActivity : BaseActionBarActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showTerms() {
|
private fun openURL(url: String) {
|
||||||
try {
|
try {
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/loki-project/loki-messenger-android/blob/master/privacy-policy.md"))
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Toast.makeText(this, "Couldn't open link", Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, "Couldn't open link", Toast.LENGTH_SHORT).show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user