am 77f71cb2: Merge "Follow API changes to NotificationListener." into jb-mr2-dev

* commit '77f71cb226203bf3f87eec749296feb3ecd18f43':
  Follow API changes to NotificationListener.
This commit is contained in:
Daniel Sandler
2013-04-25 16:58:02 -07:00
committed by Android Git Automerger

View File

@@ -206,26 +206,26 @@ public class NotificationStation extends SettingsPreferenceFragment {
: new StatusBarNotification[][] { active, dismissed }) { : new StatusBarNotification[][] { active, dismissed }) {
for (StatusBarNotification sbn : resultset) { for (StatusBarNotification sbn : resultset) {
final HistoricalNotificationInfo info = new HistoricalNotificationInfo(); final HistoricalNotificationInfo info = new HistoricalNotificationInfo();
info.pkg = sbn.pkg; info.pkg = sbn.getPackageName();
info.user = sbn.getUserId(); info.user = sbn.getUserId();
info.icon = loadIconDrawable(info.pkg, info.user, sbn.notification.icon); info.icon = loadIconDrawable(info.pkg, info.user, sbn.getNotification().icon);
info.pkgicon = loadPackageIconDrawable(info.pkg, info.user); info.pkgicon = loadPackageIconDrawable(info.pkg, info.user);
info.pkgname = loadPackageName(info.pkg); info.pkgname = loadPackageName(info.pkg);
if (sbn.notification.extras != null) { if (sbn.getNotification().extras != null) {
info.title = sbn.notification.extras.getString(Notification.EXTRA_TITLE); info.title = sbn.getNotification().extras.getString(Notification.EXTRA_TITLE);
if (info.title == null || "".equals(info.title)) { if (info.title == null || "".equals(info.title)) {
info.title = sbn.notification.extras.getString(Notification.EXTRA_TEXT); info.title = sbn.getNotification().extras.getString(Notification.EXTRA_TEXT);
} }
} }
if (info.title == null || "".equals(info.title)) { if (info.title == null || "".equals(info.title)) {
info.title = sbn.notification.tickerText; info.title = sbn.getNotification().tickerText;
} }
// still nothing? come on, give us something! // still nothing? come on, give us something!
if (info.title == null || "".equals(info.title)) { if (info.title == null || "".equals(info.title)) {
info.title = info.pkgname; info.title = info.pkgname;
} }
info.timestamp = sbn.postTime; info.timestamp = sbn.getPostTime();
info.priority = sbn.notification.priority; info.priority = sbn.getNotification().priority;
logd(" [%d] %s: %s", info.timestamp, info.pkg, info.title); logd(" [%d] %s: %s", info.timestamp, info.pkg, info.title);
info.active = (resultset == active); info.active = (resultset == active);