Merge "Fix crash & history text" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cea962b18a
@@ -4924,6 +4924,8 @@
|
||||
<string name="importance_from_user">You set the importance of these notifications.</string>
|
||||
<string name="importance_from_person">This is important because of the people involved.</string>
|
||||
|
||||
<string name="notification_history_title_placeholder">Custom app notification</string>
|
||||
|
||||
<!-- Message to user that app trying to create user for an account that already exists. [CHAR LIMIT=none] -->
|
||||
<string name="user_creation_account_exists">Allow <xliff:g id="app" example="Gmail">%1$s</xliff:g> to create a new User with <xliff:g id="account" example="foobar@gmail.com">%2$s</xliff:g> (a User with this account already exists) ?</string>
|
||||
<!-- Message to user that app is trying to create user for a specified account. [CHAR LIMIT=none] -->
|
||||
|
||||
@@ -3907,4 +3907,7 @@
|
||||
<java-symbol type="string" name="loading" />
|
||||
|
||||
<java-symbol type="array" name="config_toastCrossUserPackages" />
|
||||
|
||||
<java-symbol type="string" name="notification_history_title_placeholder" />
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -570,17 +570,17 @@ public class NotificationManagerService extends SystemService {
|
||||
|
||||
public StatusBarNotification[] getArray(int count, boolean includeSnoozed) {
|
||||
if (count == 0) count = mBufferSize;
|
||||
final StatusBarNotification[] a
|
||||
= new StatusBarNotification[Math.min(count, mBuffer.size())];
|
||||
List<StatusBarNotification> a = new ArrayList();
|
||||
Iterator<Pair<StatusBarNotification, Integer>> iter = descendingIterator();
|
||||
int i=0;
|
||||
while (iter.hasNext() && i < count) {
|
||||
Pair<StatusBarNotification, Integer> pair = iter.next();
|
||||
if (pair.second != REASON_SNOOZED || includeSnoozed) {
|
||||
a[i++] = pair.first;
|
||||
i++;
|
||||
a.add(pair.first);
|
||||
}
|
||||
}
|
||||
return a;
|
||||
return a.toArray(new StatusBarNotification[a.size()]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2697,8 +2697,13 @@ public class NotificationManagerService extends SystemService {
|
||||
CharSequence title = null;
|
||||
if (n.extras != null) {
|
||||
title = n.extras.getCharSequence(Notification.EXTRA_TITLE);
|
||||
if (title == null) {
|
||||
title = n.extras.getCharSequence(Notification.EXTRA_TITLE_BIG);
|
||||
}
|
||||
}
|
||||
return title == null? null : String.valueOf(title);
|
||||
return title == null ? getContext().getResources().getString(
|
||||
com.android.internal.R.string.notification_history_title_placeholder)
|
||||
: String.valueOf(title);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user