Fix Opp notifications timestamp not correct issue

Should set the value of Notification.when before calling
setLatestEventInfo()

Dr No:Eastham
Bug: 2292381
diff --git a/src/com/android/bluetooth/opp/BluetoothOppNotification.java b/src/com/android/bluetooth/opp/BluetoothOppNotification.java
index c4a4591..345ec89 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppNotification.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppNotification.java
@@ -303,6 +303,7 @@
             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 @@
             intent.setData(contentUri);
             n.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
 
-            n.when = timeStamp;
-
             mNotificationMgr.notify(id, n);
         }
         cursor.close();
@@ -342,6 +341,8 @@
             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 @@
             intent.setData(contentUri);
             n.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
 
-            n.when = timeStamp;
             mNotificationMgr.notify(id, n);
         }
         cursor.close();