summaryrefslogtreecommitdiff
path: root/java/src-debug
diff options
context:
space:
mode:
author 1 <mrcasey@google.com> 2023-05-01 21:09:50 +0000
committer 1 <mrcasey@google.com> 2023-05-08 16:36:53 +0000
commit7cc1eb3e660decca55d42105835d7935ef444613 (patch)
treea12ceb303f0069199d52c88f3d3b2b011ef96648 /java/src-debug
parentd572ef6c2ba73880edecd66c86835e78763d9400 (diff)
Use a ViewState to preserve refinement state
Refinement manager keeps its own state across config changes so that it can receive callbacks on the ResultReceiver. ChooserActivity can watch for the state of refinement completion and launch the refined TargetInfo if refinement succeeds, otherwise just finish(). If onResume happens when refinement is in progress, ChooserActivity will finish, as this is expected to be abandonment of the refinement process without a result. But, onResume also happens during a config change during refinement, and the activity must not finish in those cases. The logic for this is contained within ChooserRefinementManager, with ChooserActivity only needing to pass along a couple of lifecycle events. Add a bunch of test coverage to new and old functionality. Also fix some kotlin nullability errors in TargetInfo tests that sysui studio was complaining about. Bug: 279514914 Test: atest ChooserRefinementManagerTest Test: manually test the refinement flow in Photos, both completing and cancelling the process, rotating at various points. Change-Id: I2b22155894e29b062c78b4af20e8fe0683d40bea
Diffstat (limited to 'java/src-debug')
0 files changed, 0 insertions, 0 deletions