Add PackageManagerLocal snapshot APIs
Exposes 2 separate types, one for unfiltered, another for filtered, for the package data snapshot APIs. Unfiltered can be reused for multiple callers by calling filtered() on it. Each type exposes the most performant variant of the API available. Unfiltered offers the entire PackageState map as-is, as it doesn't require any filtering or copying. The filtered variant offers getPackageState which will do filtering at call time, or forAllPackageStates if someone really needs all of them. The hope is that this method naming causes the caller to only invoke it if the majority of states are actually needed. Bug: 235462722 Test: atest PackageManagerLocalSnapshotTest Change-Id: Ib0bf4f05f12cace681020015d099866b3740dbfe
Loading
Please register or sign in to comment