OSDN Git Service

Fix UsageStats to report correct endTime from XML
authorEdward Cunningham <ejc@google.com>
Thu, 26 Feb 2015 23:33:30 +0000 (00:33 +0100)
committerEdward Cunningham <ejc@google.com>
Thu, 26 Feb 2015 23:33:30 +0000 (00:33 +0100)
Bug: 19529542
Change-Id: Iacb1a245a40c6b88ae15740797217f59d5fca1e6

services/usage/java/com/android/server/usage/UsageStatsXmlV1.java

index ef95a7b..bfb71c5 100644 (file)
@@ -191,7 +191,7 @@ final class UsageStatsXmlV1 {
             statsOut.events.clear();
         }
 
-        statsOut.endTime = XmlUtils.readLongAttribute(parser, END_TIME_ATTR);
+        statsOut.endTime = statsOut.beginTime + XmlUtils.readLongAttribute(parser, END_TIME_ATTR);
 
         int eventCode;
         int outerDepth = parser.getDepth();