diff options
| author | 2023-04-19 11:03:48 -0400 | |
|---|---|---|
| committer | 2023-04-27 15:27:14 -0400 | |
| commit | b0e25804072680d2ff4cc102a42dee38a16f3828 (patch) | |
| tree | 233c04ee807176dd96b5ada7f0ce8c85fcffaae5 /libs/androidfw/ZipFileRO.cpp | |
| parent | 3a2bda18c40dd4701cc0f0487930af9053a41419 (diff) | |
Add support for lazy conditions
Conditions now define a start strategy, which determines how they are
run. START_EAGERLY is how conditions function today, it starts the
condition immediately and doesn't stop it.
START_LAZILY will wait to start the condition until the previous one has
emitted a value which did not short-circuit. For AND operand, this means
the previous condition must have emitted true. For OR operand, it would
be false.
START_WHEN_NEEDED is similar to lazy, but will also cancel the condition
when not needed. This can be used for expensive conditions, such as the
low light condition, since it keeps the lowlight sensor on.
Bug: 278875229
Test: atest CombinedConditionTest
Change-Id: Ie81f74357f1d37c771fa91d097fef85ab11fa604
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
0 files changed, 0 insertions, 0 deletions