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

Commit ee452ee5 authored by Eric Fischer's avatar Eric Fischer
Browse files

Combine the "Permission Requested" title and subtitle into one string.

The translators don't get the strings in order, so having a single sentence
split across two strings makes it difficult to get good translations.
parent fc5f1026
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -714,11 +714,14 @@ public class AccountManagerService extends IAccountManager.Stub {

        Notification n = new Notification(android.R.drawable.stat_sys_warning, null,
                0 /* when */);
        final CharSequence subtitleFormatString =
                mContext.getText(R.string.permission_request_notification_subtitle);
        final String titleAndSubtitle =
                mContext.getString(R.string.permission_request_notification_with_subtitle,
                account.name);
        final int index = titleAndSubtitle.indexOf('\n');
        final String title = titleAndSubtitle.substring(0, index);
        final String subtitle = titleAndSubtitle.substring(index + 1);
        n.setLatestEventInfo(mContext,
                mContext.getText(R.string.permission_request_notification_title),
                String.format(subtitleFormatString.toString(), account.name),
                title, subtitle,
                PendingIntent.getActivity(mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT));
        ((NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE))
                .notify(getCredentialPermissionNotificationId(account, authTokenType, uid), n);
+1 −1
Original line number Diff line number Diff line
@@ -1962,7 +1962,7 @@
    <string name="allow">Allow</string>
    <string name="deny">Deny</string>
    <string name="permission_request_notification_title">Permission Requested</string>
    <string name="permission_request_notification_subtitle">for account <xliff:g id="account" example="foo@gmail.com">%s</xliff:g></string>
    <string name="permission_request_notification_with_subtitle">Permission Requested\nfor account <xliff:g id="account" example="foo@gmail.com">%s</xliff:g></string>

    <!-- Label to show for a service that is running because it is an input method. -->
    <string name="input_method_binding_label">Input method</string>