OSDN Git Service

Avoid redundant getAllocatableBytes() calls.
authorJeff Sharkey <jsharkey@android.com>
Tue, 1 May 2018 19:09:28 +0000 (13:09 -0600)
committerJeff Sharkey <jsharkey@android.com>
Tue, 1 May 2018 19:09:30 +0000 (13:09 -0600)
commit41afa65947d5993c1912438e586bbb5ebe46b90d
treed1168519297979be69594da68c5aa0c528ec8548
parent68f36d6b5d5ad4711811160795cab399d247845d
Avoid redundant getAllocatableBytes() calls.

Shuffle around the ordering of resolveInstallVolume() so that we
determine the fitsOnInternal value while doing a drive-by of all
possible target volumes.  This way we only call getAllocatableBytes()
internal storage once.

Bug: 70985520
Test: atest android.content.pm.PackageHelperTests
Change-Id: I8273c239af4a13b1db17f320e15ee0ef2dc89186
core/java/com/android/internal/content/PackageHelper.java