summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Joshua Trask <joshtrask@google.com> 2022-04-01 15:17:50 -0400
committer Matt Casey <mrcasey@google.com> 2022-04-22 16:05:39 +0000
commit6cdd926f43c7cdbfe17a7f03a2f50f6973925af1 (patch)
tree60224600363c476782da6ca2f9d80228700cc3a2 /libs/androidfw/StringPool.cpp
parent31cc9ddb593f5c0169b9d6e05002a2c28b4f91e2 (diff)
Create ResolverComparatorModel interface.
Define the API for interacting with comparator model data; provide implementations for our two current model types; and (as a first step) re-write our legacy ResolverComparators to be implemented internally in terms of their new model types. This is the first CL in a multi-part cleanup of the AbstractResolverComparator design. This demonstrates that the role of an AbstractResolverComparator sub-class amounts to (i.e., Ctrl+F "@Override") some amount of work to prepare model data; some cleanup; and a set query methods against data that *really should be* immutable (separated in this CL as the new ResolverComparatorModel interace). Any remaining responsibilities of the abstract base class would be better handled (in a subsequent CL) by an external controller operating on a ResolverComparatorModel (i.e., preferring composition to inheritance). The async model-preparation steps should also be separated and cleaned up (in a later CL). I believe this to be a pure refactoring with no observable side effects. While the new design aids in implementing the correct "immutable snapshot" style, for now I've written the new ResolverComparatorModel implementations to preserve any possible quirks in the legacy implementations. Nevertheless, if some inadvertant behavior change is introduced as a result of this CL, it's most likely to be a bug-fix where we previously would've mixed in stale data. A later CL will intentionally pursue those fixes. Test: atest ResolverActivityTest ChooserActivityTest Bug: 227486788 Change-Id: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6 Merged-In: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6 (cherry picked from commit 8b5d279d9047487e151ea0be91bb1c19042fedd3)
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions