summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorNoah Zimmt <noahz@google.com>2019-07-26 16:37:49 -0700
committerNoah Zimmt <noahz@google.com>2019-08-12 16:43:16 +0000
commite42bc52da02bc2124811dceb241b6e707f2f4c0c (patch)
treeb2ff24f8dfdee9bf9d7bb463fff8daa860b91910 /graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
parentb25580718908af3f8295f29479f24979fcc2fe8e (diff)
Reduce calls to installd when resolving volume
Optimizes PackageHelper#resolveInstallVolume to aggressively avoid querying volume storage statistics unless absolutely neeeded. The previous implementation queries storage data for each volume on the device before evaluating which volume to select. The new implementation defers querying storage stats for a given volume until it is absolutely neccessary. For example, if the application is already installed to a particular volume, only that volume needs to be queried for available space. In addition, querying for available space on a volume is done in two steps. The first step does not take into account freeable cache; only if this pessimistic assessment of available space fails do we call installd to obtain cache information. Bug: 138450974 Test: atest frameworks/base/core/tests/coretests/src/android/content/pm/PackageHelperTests.java && atest cts/tests/tests/os/src/android/os/storage/cts/StorageManagerTest.java Change-Id: I403318de364d41019cb3d43e93b91cdd06fe1b9c
Diffstat (limited to 'graphics/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions