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

Commit 2417c84a authored by Becca Hughes's avatar Becca Hughes
Browse files

Update strings for new settings design

This updates the strings for the new settings
design as per the new spec.

Screenshots:
https://hsv.googleplex.com/5257279109595136
https://hsv.googleplex.com/5049022822744064
https://hsv.googleplex.com/6177842804031488

Change-Id: I6ff705d2bfab9de4ca2e8d49763b5405e3d2d2c3
Test: Manual test
Bug: 300979487
parent a8fa24cc
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -10813,9 +10813,37 @@
        ]]>
    </string>
    <!-- Message of the warning dialog for disabling the credential provider (new strings for 24Q3). [CHAR_LIMIT=NONE] -->
    <string name="credman_confirmation_message_new_ui">
        <![CDATA[
        <b>Turn off all services?</b>
        <br/>
        <br/>
        Passwords, passkeys, and other saved info won\'t be available for autofill when you sign in
        ]]>
    </string>
    <!-- Message of the warning dialog for setting a new preferred credential provider (new strings for 24Q3). [CHAR_LIMIT=NONE] -->
    <string name="credman_autofill_confirmation_message_new_ui">
        <![CDATA[
        <b>Change your preferred service to <xliff:g id="app_name" example="Provider">%1$s</xliff:g>\?</b>
        <br/>
        <br/>
        New passwords, passkeys, and other info will be saved here from now on.
        <xliff:g id="app_name" example="Provider">%1$s</xliff:g> may use what\'s on your
        screen to determine what can be autofilled
        ]]>
    </string>
    <!-- Title of the warning dialog for enabling the credential provider. [CHAR_LIMIT=NONE] -->
    <string name="credman_enable_confirmation_message_title">Use %1$s\?</string>
    <!-- Title of the error dialog when too many credential providers are selected (new strings for 24Q3). [CHAR_LIMIT=NONE] -->
    <string name="credman_limit_error_msg_title">You can only have 5 services on</string>
    <!-- Message of the error dialog when too many credential providers are selected (new strings for 24Q3). [CHAR_LIMIT=NONE] -->
    <string name="credman_limit_error_msg">Turn off at least 1 service to add another</string>
    <!-- Message of the warning dialog for enabling the credential provider. [CHAR_LIMIT=NONE] -->
    <string name="credman_enable_confirmation_message">%1$s uses what\'s on your screen to determine what can be autofilled.</string>
+12 −2
Original line number Diff line number Diff line
@@ -899,8 +899,18 @@ public class CredentialManagerPreferenceController extends BasePreferenceControl
        @Override
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            return new AlertDialog.Builder(getActivity())
                    .setTitle(getContext().getString(R.string.credman_error_message_title))
                    .setMessage(getContext().getString(R.string.credman_error_message))
                    .setTitle(
                            getContext()
                                    .getString(
                                            Flags.newSettingsUi()
                                                    ? R.string.credman_limit_error_msg_title
                                                    : R.string.credman_error_message_title))
                    .setMessage(
                            getContext()
                                    .getString(
                                            Flags.newSettingsUi()
                                                    ? R.string.credman_limit_error_msg
                                                    : R.string.credman_error_message))
                    .setPositiveButton(android.R.string.ok, this)
                    .create();
        }
+10 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.content.pm.ServiceInfo;
import android.credentials.CredentialManager;
import android.credentials.CredentialProviderInfo;
import android.credentials.SetEnabledProvidersException;
import android.credentials.flags.Flags;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -305,14 +306,21 @@ public class DefaultCombinedPicker extends DefaultAppPickerFragment {
    protected CharSequence getConfirmationMessage(CandidateInfo appInfo) {
        // If we are selecting none then show a warning label.
        if (appInfo == null) {
            final String message = getContext().getString(R.string.credman_confirmation_message);
            final String message =
                    getContext()
                            .getString(
                                    Flags.newSettingsUi()
                                            ? R.string.credman_confirmation_message_new_ui
                                            : R.string.credman_confirmation_message);
            return Html.fromHtml(message);
        }
        final CharSequence appName = appInfo.loadLabel();
        final String message =
                getContext()
                        .getString(
                                R.string.credman_autofill_confirmation_message,
                                Flags.newSettingsUi()
                                        ? R.string.credman_autofill_confirmation_message_new_ui
                                        : R.string.credman_autofill_confirmation_message,
                                Html.escapeHtml(appName));
        return Html.fromHtml(message);
    }