Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 070a852f authored by Michael Bestas's avatar Michael Bestas
Browse files

SUW: Remove hardcoded string references to LineageOS

* Use os_name string

Change-Id: I1d59482122d85e39aaa4cbf15ac9e43b8598251d
parent 79ce7a4f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,7 @@
                    android:layout_height="wrap_content">
                    android:layout_height="wrap_content">


                    <TextView
                    <TextView
                        android:id="@+id/intro_restore_subtitle"
                        android:layout_width="match_parent"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/intro_restore_subtitle"
                        android:text="@string/intro_restore_subtitle"
+5 −5
Original line number Original line Diff line number Diff line
@@ -65,11 +65,11 @@
    <string name="accessibility_settings">Accessibility settings</string>
    <string name="accessibility_settings">Accessibility settings</string>


    <string name="setup_services">LineageOS features</string>
    <string name="setup_services">LineageOS features</string>
    <string name="services_explanation" product="tablet">These services work for you to extend the capabilities of your tablet. Data will be used in accordance with LineageOS\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
    <string name="services_explanation" product="tablet">These services work for you to extend the capabilities of your tablet. Data will be used in accordance with <xliff:g id="name" example="LineageOS">%1$s</xliff:g>\'s <xliff:g id="name" example="Privacy Policy">%2$s</xliff:g>.</string>
    <string name="services_explanation" product="default">These services work for you to extend the capabilities of your phone. Data will be used in accordance with LineageOS\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
    <string name="services_explanation" product="default">These services work for you to extend the capabilities of your phone. Data will be used in accordance with <xliff:g id="name" example="LineageOS">%1$s</xliff:g>\'s <xliff:g id="name" example="Privacy Policy">%2$s</xliff:g>.</string>
    <string name="services_privacy_policy">Privacy Policy</string>
    <string name="services_privacy_policy">Privacy Policy</string>
    <string name="services_help_improve_cm">Help improve <xliff:g id="name" example="LineageOS">%s</xliff:g></string>
    <string name="services_help_improve_cm">Help improve <xliff:g id="name" example="LineageOS">%s</xliff:g></string>
    <string name="services_metrics_label"><xliff:g id="name" example="Help improve LineageOS">%1$s</xliff:g> by automatically sending diagnostic and usage data to LineageOS. This information can’t be used to identify you and lends a hand to teams working on things like battery life, app performance, and new <xliff:g id="name" example="LineageOS">%2$s</xliff:g> features.</string>
    <string name="services_metrics_label"><xliff:g id="name" example="Help improve LineageOS">%1$s</xliff:g> by automatically sending diagnostic and usage data to <xliff:g id="name" example="LineageOS">%2$s</xliff:g>. This information can’t be used to identify you and lends a hand to teams working on things like battery life, app performance, and new <xliff:g id="name" example="LineageOS">%3$s</xliff:g> features.</string>
    <string name="services_os_nav_keys_label"><b>Use on screen navigation keys</b> instead of hardware keys.</string>
    <string name="services_os_nav_keys_label"><b>Use on screen navigation keys</b> instead of hardware keys.</string>


    <!-- Biometric setup -->
    <!-- Biometric setup -->
@@ -95,8 +95,8 @@


    <!-- Backup Restore -->
    <!-- Backup Restore -->
    <string name="intro_restore_title">Restore apps and data</string>
    <string name="intro_restore_title">Restore apps and data</string>
    <string name="intro_restore_subtitle" product="tablet">If you have a backup from your last LineageOS tablet, you can restore it here.</string>
    <string name="intro_restore_subtitle" product="tablet">If you have a backup from your last <xliff:g id="name" example="LineageOS">%s</xliff:g> tablet, you can restore it here.</string>
    <string name="intro_restore_subtitle" product="default">If you have a backup from your last LineageOS phone, you can restore it here.</string>
    <string name="intro_restore_subtitle" product="default">If you have a backup from your last <xliff:g id="name" example="LineageOS">%s</xliff:g> phone, you can restore it here.</string>
    <string name="intro_restore_button">Restore from backup</string>
    <string name="intro_restore_button">Restore from backup</string>


    <!-- Update Recovery -->
    <!-- Update Recovery -->
+4 −3
Original line number Original line Diff line number Diff line
@@ -72,8 +72,9 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
        super.onCreate(savedInstanceState);
        super.onCreate(savedInstanceState);
        mSetupWizardApp = (SetupWizardApp) getApplication();
        mSetupWizardApp = (SetupWizardApp) getApplication();
        setNextText(R.string.next);
        setNextText(R.string.next);
        String os_name = getString(R.string.os_name);
        String privacy_policy = getString(R.string.services_privacy_policy);
        String privacy_policy = getString(R.string.services_privacy_policy);
        String policySummary = getString(R.string.services_explanation, privacy_policy);
        String policySummary = getString(R.string.services_explanation, os_name, privacy_policy);
        SpannableString ss = new SpannableString(policySummary);
        SpannableString ss = new SpannableString(policySummary);
        ClickableSpan clickableSpan = new ClickableSpan() {
        ClickableSpan clickableSpan = new ClickableSpan() {
            @Override
            @Override
@@ -100,9 +101,9 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
        View metricsRow = findViewById(R.id.metrics);
        View metricsRow = findViewById(R.id.metrics);
        metricsRow.setOnClickListener(mMetricsClickListener);
        metricsRow.setOnClickListener(mMetricsClickListener);
        String metricsHelpImproveLineage =
        String metricsHelpImproveLineage =
                getString(R.string.services_help_improve_cm, getString(R.string.os_name));
                getString(R.string.services_help_improve_cm, os_name);
        String metricsSummary = getString(R.string.services_metrics_label,
        String metricsSummary = getString(R.string.services_metrics_label,
                metricsHelpImproveLineage, getString(R.string.os_name));
                metricsHelpImproveLineage, os_name, os_name);
        final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary);
        final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary);
        metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
        metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
                0, metricsHelpImproveLineage.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
                0, metricsHelpImproveLineage.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+10 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,8 @@ import static org.lineageos.setupwizard.SetupWizardApp.REQUEST_CODE_RESTORE;


import android.app.Activity;
import android.app.Activity;
import android.content.Intent;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;


import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupcompat.util.WizardManagerHelper;
import static com.google.android.setupcompat.util.ResultCodes.RESULT_SKIP;
import static com.google.android.setupcompat.util.ResultCodes.RESULT_SKIP;
@@ -32,6 +34,14 @@ import org.lineageos.setupwizard.SubBaseActivity;


public class RestoreIntroActivity extends SubBaseActivity {
public class RestoreIntroActivity extends SubBaseActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final TextView restoreSubtitle = (TextView) findViewById(R.id.intro_restore_subtitle);
        restoreSubtitle.setText(getString(R.string.intro_restore_subtitle,
                getString(R.string.os_name)));
    }

    @Override
    @Override
    protected void onStartSubactivity() {
    protected void onStartSubactivity() {
        setNextAllowed(true);
        setNextAllowed(true);