Merge "Fix crash & history text" into rvc-dev am: cea962b18a
Change-Id: I6ff720e887fbff03664b4235af60d6e064ce1c75
This commit is contained in:
@@ -4924,6 +4924,8 @@
|
|||||||
<string name="importance_from_user">You set the importance of these notifications.</string>
|
<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="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] -->
|
<!-- 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>
|
<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] -->
|
<!-- Message to user that app is trying to create user for a specified account. [CHAR LIMIT=none] -->
|
||||||
|
|||||||
@@ -3908,4 +3908,7 @@
|
|||||||
<java-symbol type="string" name="loading" />
|
<java-symbol type="string" name="loading" />
|
||||||
|
|
||||||
<java-symbol type="array" name="config_toastCrossUserPackages" />
|
<java-symbol type="array" name="config_toastCrossUserPackages" />
|
||||||
|
|
||||||
|
<java-symbol type="string" name="notification_history_title_placeholder" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -570,17 +570,17 @@ public class NotificationManagerService extends SystemService {
|
|||||||
|
|
||||||
public StatusBarNotification[] getArray(int count, boolean includeSnoozed) {
|
public StatusBarNotification[] getArray(int count, boolean includeSnoozed) {
|
||||||
if (count == 0) count = mBufferSize;
|
if (count == 0) count = mBufferSize;
|
||||||
final StatusBarNotification[] a
|
List<StatusBarNotification> a = new ArrayList();
|
||||||
= new StatusBarNotification[Math.min(count, mBuffer.size())];
|
|
||||||
Iterator<Pair<StatusBarNotification, Integer>> iter = descendingIterator();
|
Iterator<Pair<StatusBarNotification, Integer>> iter = descendingIterator();
|
||||||
int i=0;
|
int i=0;
|
||||||
while (iter.hasNext() && i < count) {
|
while (iter.hasNext() && i < count) {
|
||||||
Pair<StatusBarNotification, Integer> pair = iter.next();
|
Pair<StatusBarNotification, Integer> pair = iter.next();
|
||||||
if (pair.second != REASON_SNOOZED || includeSnoozed) {
|
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;
|
CharSequence title = null;
|
||||||
if (n.extras != null) {
|
if (n.extras != null) {
|
||||||
title = n.extras.getCharSequence(Notification.EXTRA_TITLE);
|
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