Added privacy policy link on about page

This commit is contained in:
Sylvain Berfini 2019-04-11 10:45:10 +02:00
parent 95444bf563
commit fa5922bb72
5 changed files with 44 additions and 3 deletions

View file

@ -20,8 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import android.app.Fragment; import android.app.Fragment;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -66,6 +68,19 @@ public class AboutFragment extends Fragment implements OnClickListener {
getString(R.string.about_version), getString(R.string.about_version),
BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")")); BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")"));
TextView privacyPolicy = view.findViewById(R.id.privaci_policy_link);
privacyPolicy.setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View v) {
Intent browserIntent =
new Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.about_privacy_policy_link)));
startActivity(browserIntent);
}
});
mSendLogButton = view.findViewById(R.id.send_log); mSendLogButton = view.findViewById(R.id.send_log);
mSendLogButton.setOnClickListener(this); mSendLogButton.setOnClickListener(this);
mSendLogButton.setVisibility( mSendLogButton.setVisibility(

View file

@ -96,15 +96,27 @@
android:textColorLink="@color/primary_color" /> android:textColorLink="@color/primary_color" />
<TextView <TextView
android:id="@+id/about_text" android:id="@+id/privaci_policy_link"
style="@style/about_license_font" style="@style/about_license_font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:autoLink="web"
android:paddingTop="10dp"
android:gravity="center"
android:text="@string/about_privacy_policy"
android:textColorLink="@color/primary_color"/>
<TextView
android:id="@+id/about_text"
style="@style/link_font"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="20dp" android:paddingBottom="20dp"
android:text="@string/about_text" android:text="@string/about_text" />
android:textSize="18sp" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -73,6 +73,18 @@
android:text="@string/about_link" android:text="@string/about_link"
android:textColorLink="@color/primary_color" /> android:textColorLink="@color/primary_color" />
<TextView
android:id="@+id/privaci_policy_link"
style="@style/link_font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:autoLink="web"
android:paddingTop="10dp"
android:gravity="center"
android:text="@string/about_privacy_policy"
android:textColorLink="@color/primary_color" />
<TextView <TextView
android:id="@+id/about_text" android:id="@+id/about_text"
style="@style/about_license_font" style="@style/about_license_font"

View file

@ -11,6 +11,7 @@
<string name="about_link" translatable="false">https://linphone.org</string> <string name="about_link" translatable="false">https://linphone.org</string>
<string name="download_link" translatable="false">https://linphone.org/download</string> <string name="download_link" translatable="false">https://linphone.org/download</string>
<string name="recover_password_link" translatable="false">https://linphone.org/freesip/recover</string> <string name="recover_password_link" translatable="false">https://linphone.org/freesip/recover</string>
<string name="about_privacy_policy_link" translatable="false">https://www.linphone.org/terms-and-privacy</string>
<!-- Textual mention of the app name --> <!-- Textual mention of the app name -->
<string name="user_agent" translatable="false">LinphoneAndroid</string> <string name="user_agent" translatable="false">LinphoneAndroid</string>

View file

@ -13,6 +13,7 @@
<string name="about_version">Linphone Android %s</string> <string name="about_version">Linphone Android %s</string>
<string name="about_liblinphone_version">Linphone Core %s</string> <string name="about_liblinphone_version">Linphone Core %s</string>
<string name="about_liblinphone_sdk_version">Linphone SDK %s</string> <string name="about_liblinphone_sdk_version">Linphone SDK %s</string>
<string name="about_privacy_policy">Visit our privacy policy</string>
<string name="sync_account_name">linphone contacts</string> <string name="sync_account_name">linphone contacts</string>
<!-- Notifications --> <!-- Notifications -->