From 6ee2d0e0405a074cf827e0c0ac4bfbffd1850cea Mon Sep 17 00:00:00 2001 From: Lixin Yue Date: Mon, 2 Nov 2009 15:51:05 +0800 Subject: [PATCH] Fix Opp notifications timestamp not correct issue Should set the value of Notification.when before calling setLatestEventInfo() Dr No:Eastham Bug: 2292381 --- src/com/android/bluetooth/opp/BluetoothOppNotification.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/bluetooth/opp/BluetoothOppNotification.java b/src/com/android/bluetooth/opp/BluetoothOppNotification.java index c4a4591a..345ec89a 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppNotification.java +++ b/src/com/android/bluetooth/opp/BluetoothOppNotification.java @@ -303,6 +303,7 @@ class BluetoothOppNotification { intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName()); intent.setData(contentUri); + n.when = timeStamp; n.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(mContext, 0, intent, 0)); @@ -311,8 +312,6 @@ class BluetoothOppNotification { intent.setData(contentUri); n.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0); - n.when = timeStamp; - mNotificationMgr.notify(id, n); } cursor.close(); @@ -342,6 +341,8 @@ class BluetoothOppNotification { Intent intent = new Intent(Constants.ACTION_INCOMING_FILE_CONFIRM); intent.setClassName(Constants.THIS_PACKAGE_NAME, BluetoothOppReceiver.class.getName()); intent.setData(contentUri); + + n.when = timeStamp; n.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(mContext, 0, intent, 0)); @@ -350,7 +351,6 @@ class BluetoothOppNotification { intent.setData(contentUri); n.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0); - n.when = timeStamp; mNotificationMgr.notify(id, n); } cursor.close(); -- 2.11.0