summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Joshua Trask <joshtrask@google.com> 2022-03-30 14:25:10 -0400
committer Matt Casey <mrcasey@google.com> 2022-04-22 16:09:09 +0000
commitdc029cbba741d1ee8776bc65845d7294fd16da49 (patch)
tree7099e364ffd70bcfc32d5f4ee0912058ce0d0153 /libs/androidfw/StringPool.cpp
parent31cc9ddb593f5c0169b9d6e05002a2c28b4f91e2 (diff)
Clean up ResolverListAdapter::rebuildList().
Behaviorally, this is *almost* a pure refactoring. It does make one very minor logic change(*) that could hypothetically fix a race condition, although no particular bugs have ever been observed as a result (nor do they seem especially probable), and it's unknown what the severity would be if they ever were to occur. Additionally, this change clarifies existing comments and adds more inline documentation to help understand the rebuildList() flow. Code cleanup identifies a few areas where the current design seems a little clumsy, noted with new "TODO" comments in the code. There's room for more improvement, but this function plays an important role in preparing Sharesheet targets, so it's good to bring attention to these thorny requirements. For justifications of behavioral equivalence and other metacognitive notes, see comments in the code review. (*) The one behavior change is called out in code review comments; briefly, the line of code that sends a synchronous "results pending" event used to follow the line that started the async flow that would result in a "results complete" event. This could hypothetically race if the async work finished and sent "results complete" before we got to the "results pending" line. Bug: 227486788 Test: `atest ChooserActivityTest` (no behavior changes expected) Change-Id: I2e74d68579be8b34716ba2202ac2a08361008400 Merged-In: I2e74d68579be8b34716ba2202ac2a08361008400 (cherry picked from commit 1e42cad19be895f016a5fb349d3f57a0972a8b9a)
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions