OSDN Git Service

Change timestamp type from int to long, timestamp(now) overflows int
authorMatthew Xie <mattx@google.com>
Fri, 15 Jun 2012 21:47:10 +0000 (14:47 -0700)
committerMatthew Xie <mattx@google.com>
Fri, 15 Jun 2012 21:47:10 +0000 (14:47 -0700)
BluetoothOppNotification NotificationItem.timeStamp is int, too
small to be a timestamp
bug 6670668

Change-Id: Ieec5377bac3b8c7fbaa24d059ad5957ba9a0544f

src/com/android/bluetooth/opp/BluetoothOppNotification.java

index a5b913d..7589850 100644 (file)
@@ -115,7 +115,7 @@ class BluetoothOppNotification {
 
         int totalTotal = 0; // total bytes for current transfer
 
-        int timeStamp = 0; // Database time stamp. Used for sorting ongoing transfers.
+        long timeStamp = 0; // Database time stamp. Used for sorting ongoing transfers.
 
         String description; // the text above progress bar
 
@@ -238,7 +238,7 @@ class BluetoothOppNotification {
 
         mNotifications.clear();
         for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
-            int timeStamp = cursor.getInt(timestampIndex);
+            long timeStamp = cursor.getLong(timestampIndex);
             int dir = cursor.getInt(directionIndex);
             int id = cursor.getInt(idIndex);
             int total = cursor.getInt(totalBytesIndex);