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
Loading
Please register or sign in to comment