OSDN Git Service

Fix a bug where the package stats query timeout may crash.
authorDaniel Nishi <dhnishi@google.com>
Thu, 22 Dec 2016 19:06:51 +0000 (11:06 -0800)
committerDaniel Nishi <dhnishi@google.com>
Thu, 22 Dec 2016 19:32:33 +0000 (11:32 -0800)
commitcf76a16e660a361670745b043198b797ccd86747
tree48871860c02a0cb43faf49fa59dc5b47b0e5f6aa
parent683dbf1fc6d28ba5008779627bf4faf8cd14106c
Fix a bug where the package stats query timeout may crash.

This adds a null-check to verify that we got real data before
trying to use it and increases the timeout time to reduce the
likelihood of timing out.

Test: FrameworkServicesTests
Bug: 33836034
Change-Id: Ia1ad4aba05c5c4fb8688fc9fc94df344f736e396
services/core/java/com/android/server/storage/DiskStatsLoggingService.java
services/tests/servicestests/src/com/android/server/storage/DiskStatsLoggingServiceTest.java