SetupWizard: LineageSettings: correct privacy policy link span

* Some languages don't have the ´Privacy policy´-text
   as the last word of the sentence.

Change-Id: I74e342c8d6bbb038db11538905a12c7fef5a84de
This commit is contained in:
Timi Rautamäki
2021-06-13 21:38:53 +02:00
parent bee667cfd3
commit e278fd6c1a

View File

@@ -94,9 +94,10 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
}
}
};
int ppStartIndex = policySummary.indexOf(privacy_policy);
ss.setSpan(clickableSpan,
policySummary.length() - privacy_policy.length() - 1,
policySummary.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
ppStartIndex, ppStartIndex + privacy_policy.length(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
TextView privacyPolicy = (TextView) findViewById(R.id.privacy_policy);
privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance());
privacyPolicy.setText(ss);