mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
Show a link for privacy policy.
This commit is contained in:
parent
b39a7ac939
commit
f72f75ee61
@ -185,6 +185,15 @@
|
|||||||
android:textColor="@color/gray50"
|
android:textColor="@color/gray50"
|
||||||
android:text="@android:string/cancel"/>
|
android:text="@android:string/cancel"/>
|
||||||
|
|
||||||
|
<TextView style="@style/Registration.Description"
|
||||||
|
android:id="@+id/terms_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:textColor="#73B7F0"
|
||||||
|
android:text="@string/RegistrationActivity_terms_and_privacy"/>
|
||||||
|
|
||||||
<TextView style="@style/Registration.Description"
|
<TextView style="@style/Registration.Description"
|
||||||
android:id="@+id/registration_information"
|
android:id="@+id/registration_information"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -194,31 +203,15 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/registration_activity__registration_will_transmit_some_contact_information_to_the_server_temporariliy"/>
|
android:text="@string/registration_activity__registration_will_transmit_some_contact_information_to_the_server_temporariliy"/>
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/information_link_container"
|
|
||||||
android:clickable="true"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginBottom="16dip">
|
|
||||||
|
|
||||||
<ImageView android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clickable="false"
|
|
||||||
android:src="@drawable/ic_info_white_18dp"
|
|
||||||
android:tint="#73B7F0"/>
|
|
||||||
|
|
||||||
<TextView style="@style/Registration.Description"
|
<TextView style="@style/Registration.Description"
|
||||||
android:id="@+id/information_label"
|
android:id="@+id/information_label"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="3dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_horizontal"
|
||||||
android:textColor="#73B7F0"
|
android:textColor="#73B7F0"
|
||||||
android:text="@string/RegistrationActivity_more_information"/>
|
android:text="@string/RegistrationActivity_more_information"/>
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -559,6 +559,8 @@
|
|||||||
<string name="RegistrationActivity_i_understand">I understand</string>
|
<string name="RegistrationActivity_i_understand">I understand</string>
|
||||||
<string name="RegistrationActivity_play_services_error">Play Services Error</string>
|
<string name="RegistrationActivity_play_services_error">Play Services Error</string>
|
||||||
<string name="RegistrationActivity_google_play_services_is_updating_or_unavailable">Google Play Services is updating or temporarily unavailable. Please try again.</string>
|
<string name="RegistrationActivity_google_play_services_is_updating_or_unavailable">Google Play Services is updating or temporarily unavailable. Please try again.</string>
|
||||||
|
<string name="RegistrationActivity_terms_and_privacy">Terms & Privacy Policy</string>
|
||||||
|
<string name="RegistrationActivity_no_browser">Unable to open this link. No web browser found.</string>
|
||||||
<string name="RegistrationActivity_more_information">More information</string>
|
<string name="RegistrationActivity_more_information">More information</string>
|
||||||
<string name="RegistrationActivity_less_information">Less information</string>
|
<string name="RegistrationActivity_less_information">Less information</string>
|
||||||
<string name="RegistrationActivity_signal_needs_access_to_your_contacts_and_media_in_order_to_connect_with_friends">Signal needs access to your contacts and media in order to connect with friends, exchange messages, and make secure calls</string>
|
<string name="RegistrationActivity_signal_needs_access_to_your_contacts_and_media_in_order_to_connect_with_friends">Signal needs access to your contacts and media in order to connect with friends, exchange messages, and make secure calls</string>
|
||||||
|
@ -3,11 +3,13 @@ package org.thoughtcrime.securesms;
|
|||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
@ -118,6 +120,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
|
|||||||
private TextView countryCode;
|
private TextView countryCode;
|
||||||
private TextView number;
|
private TextView number;
|
||||||
private CircularProgressButton createButton;
|
private CircularProgressButton createButton;
|
||||||
|
private TextView termsLinkView;
|
||||||
private TextView informationView;
|
private TextView informationView;
|
||||||
private TextView informationToggleText;
|
private TextView informationToggleText;
|
||||||
private TextView title;
|
private TextView title;
|
||||||
@ -183,7 +186,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
|
|||||||
private void initializeResources() {
|
private void initializeResources() {
|
||||||
TextView skipButton = findViewById(R.id.skip_button);
|
TextView skipButton = findViewById(R.id.skip_button);
|
||||||
TextView restoreSkipButton = findViewById(R.id.skip_restore_button);
|
TextView restoreSkipButton = findViewById(R.id.skip_restore_button);
|
||||||
View informationToggle = findViewById(R.id.information_link_container);
|
View termsLinkView = findViewById(R.id.terms_label);
|
||||||
|
|
||||||
this.countrySpinner = findViewById(R.id.country_spinner);
|
this.countrySpinner = findViewById(R.id.country_spinner);
|
||||||
this.countryCode = findViewById(R.id.country_code);
|
this.countryCode = findViewById(R.id.country_code);
|
||||||
@ -219,9 +222,10 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
|
|||||||
this.number.addTextChangedListener(new NumberChangedListener());
|
this.number.addTextChangedListener(new NumberChangedListener());
|
||||||
this.createButton.setOnClickListener(v -> handleRegister());
|
this.createButton.setOnClickListener(v -> handleRegister());
|
||||||
this.callMeCountDownView.setOnClickListener(v -> handlePhoneCallRequest());
|
this.callMeCountDownView.setOnClickListener(v -> handlePhoneCallRequest());
|
||||||
skipButton.setOnClickListener(v -> handleCancel());
|
|
||||||
informationToggle.setOnClickListener(new InformationToggleListener());
|
|
||||||
|
|
||||||
|
skipButton.setOnClickListener(v -> handleCancel());
|
||||||
|
informationToggleText.setOnClickListener(new InformationToggleListener());
|
||||||
|
termsLinkView.setOnClickListener(this::onTermsLinkClicked);
|
||||||
restoreSkipButton.setOnClickListener(v -> displayInitialView(true));
|
restoreSkipButton.setOnClickListener(v -> displayInitialView(true));
|
||||||
|
|
||||||
if (getIntent().getBooleanExtra(RE_REGISTRATION_EXTRA, false)) {
|
if (getIntent().getBooleanExtra(RE_REGISTRATION_EXTRA, false)) {
|
||||||
@ -984,6 +988,15 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onTermsLinkClicked(View v) {
|
||||||
|
try {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://signal.org/legal"));
|
||||||
|
startActivity(intent);
|
||||||
|
} catch (ActivityNotFoundException e) {
|
||||||
|
Toast.makeText(this, R.string.RegistrationActivity_no_browser, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onEvent(FullBackupBase.BackupEvent event) {
|
public void onEvent(FullBackupBase.BackupEvent event) {
|
||||||
if (event.getCount() == 0) restoreBackupProgress.setText(R.string.RegistrationActivity_checking);
|
if (event.getCount() == 0) restoreBackupProgress.setText(R.string.RegistrationActivity_checking);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user