Fix UsageStats begin and end timestamp bug.

UsageStatsProtoV2 was not correctly assigning the begin and end
timestamps when reading data from disk. Correctly update the timestamps
when all data has been read from disk.

Bug: 143558600
Bug: 143472799
Test: atest android.app.usage.cts.UsageStatsTest#testPackageUsageStatsIntervals
Test: atest UsageStatsRestoreHostSideTest
Change-Id: Ib436e661744ea82429ee3fb679a16a6e26697050
1 file changed