Merge change 23383 into eclair

* changes:
  Combine the "Permission Requested" title and subtitle into one string.
This commit is contained in:
Android (Google) Code Review
2009-09-16 14:36:56 -04:00
2 changed files with 8 additions and 5 deletions

View File

@@ -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);

View File

@@ -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>