Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c25df89c authored by Winson Chiu's avatar Winson Chiu
Browse files

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
parent 677d1884
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