Skip to content
Commit 6edbf68e authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Explicitly close file stream when initializing quotas.

When the device boots and the StorageStatsService is initialized, we
load the last calculated cache quotas from a file. We were never closing
the FileInputStream and leaked a resource.

By using try-with-resources, we can avoid that.

Bug: 128920416
Test: Manual -- did not crash on a phone that booted a few times.
Change-Id: Ib85e571ddf033caf63eef7c69a91336dad1b55bc
parent f89753c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment