Add some disabled logging and another test case for reapplying the notification views.
Change-Id: I839d7771ab42a5d508ce7d15385f6ac6a4e3be83
This commit is contained in:
@@ -349,6 +349,16 @@ public class PhoneStatusBarService extends StatusBarService {
|
||||
|
||||
final RemoteViews contentView = notification.notification.contentView;
|
||||
|
||||
if (false) {
|
||||
Slog.d(TAG, "old notification: when=" + oldNotification.notification.when
|
||||
+ " ongoing=" + oldNotification.isOngoing()
|
||||
+ " expanded=" + oldEntry.expanded
|
||||
+ " contentView=" + oldContentView);
|
||||
Slog.d(TAG, "new notification: when=" + notification.notification.when
|
||||
+ " ongoing=" + oldNotification.isOngoing()
|
||||
+ " contentView=" + contentView);
|
||||
}
|
||||
|
||||
// Can we just reapply the RemoteViews in place? If when didn't change, the order
|
||||
// didn't change.
|
||||
if (notification.notification.when == oldNotification.notification.when
|
||||
|
||||
@@ -44,6 +44,7 @@ public class NotificationTestList extends TestActivity
|
||||
Vibrator mVibrator = new Vibrator();
|
||||
Handler mHandler = new Handler();
|
||||
|
||||
long mActivityCreateTime = System.currentTimeMillis();
|
||||
long mChronometerBase = 0;
|
||||
|
||||
@Override
|
||||
@@ -421,7 +422,7 @@ public class NotificationTestList extends TestActivity
|
||||
new Test("Persistent #1") {
|
||||
public void run() {
|
||||
Notification n = new Notification(R.drawable.icon1, "tick tick tick",
|
||||
System.currentTimeMillis());
|
||||
mActivityCreateTime);
|
||||
n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
|
||||
"This is a notification!!!", makeIntent());
|
||||
mNM.notify(1, n);
|
||||
@@ -481,6 +482,16 @@ public class NotificationTestList extends TestActivity
|
||||
}
|
||||
},
|
||||
|
||||
new Test("Persistent #1 - different icon") {
|
||||
public void run() {
|
||||
Notification n = new Notification(R.drawable.icon2, null,
|
||||
mActivityCreateTime);
|
||||
n.setLatestEventInfo(NotificationTestList.this, "Persistent #1",
|
||||
"This is the same notification!!!", makeIntent());
|
||||
mNM.notify(1, n);
|
||||
}
|
||||
},
|
||||
|
||||
new Test("Chronometer Start") {
|
||||
public void run() {
|
||||
Notification n = new Notification(R.drawable.icon2, "me me me me",
|
||||
|
||||
Reference in New Issue
Block a user