summaryrefslogtreecommitdiff
path: root/libs/androidfw/ZipFileRO.cpp
diff options
context:
space:
mode:
author Caitlin Shkuratov <caitlinshk@google.com> 2023-05-26 21:31:57 +0000
committer Caitlin Shkuratov <caitlinshk@google.com> 2023-05-31 14:03:37 +0000
commit0ade739af20a663d8b37f0f3fd137edbbf3e6dc6 (patch)
tree4c1871eb2136cfafef668f6ceaee289f2fb24e81 /libs/androidfw/ZipFileRO.cpp
parent5026a1699d745f23f300c43f116192cf7185380a (diff)
[Central Surfaces] Make KeyguardRepository.wakefulness a StateFlow.
In order to remove some CentralSurfaces references (specifically mWakeUpComingFromTouch), it would be useful to be able to query the current wakefulness status from KeyguardRepository. However, since wakefulness is currently just a normal Flow, there's no way to get the current value. Converting this flow into a StateFlow gives us a few benefits: 1) Callers can query the flow for the current value instead of needing to collect on the flow. 2) Only one callback total is added to WakefulnessLifecycle, instead of one callback per flow consumer (14 as of this CL). I believe this should be a no-op, since the wakefulness flow was already emitting the current value when the flow starts, which mimicks StateFlow behavior. Bug: 284485594 Test: atest KeyguardRepositoryImplTest Test: manual: verified via local logging that consumers of `wakefulness` still (1) receive new values at the same times as before; (2) receive the correct values. Specifically verified: - LightRevealScrimRepository.nonBiometricRevealEffect is notified whenever wakefulness changes - FromDozingTransitionInteractor.listenerForDozingToLockscreen is notified whenever wakefulness changes - FromPrimaryBouncerTransitionInteractor.listenForPrimaryBouncerToLockscreenOrOccluded fetches most recent value whenever primaryBouncerShowing state changes Change-Id: I792953dd86b367b26540d408c3af9f83c502ea4d
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
0 files changed, 0 insertions, 0 deletions