summaryrefslogtreecommitdiff
path: root/libs/androidfw/ObbFile.cpp
diff options
context:
space:
mode:
author burakov <burakov@google.com> 2023-09-14 14:32:10 +0000
committer Danny Burakov <burakov@google.com> 2023-09-25 20:49:11 +0000
commit426a11d7a1a7af3c494630b8f8b472fda7511ff3 (patch)
tree19af2956e63db13fd182c556871603b4962a9fb9 /libs/androidfw/ObbFile.cpp
parent3d5051963366ee0ea51a28b8eabbbac1eb425fa9 (diff)
[flexiglass] Bouncer refactoring, improvements and fixes.
1. Store `AuthMethodBouncerViewModel`s polymorphically. 2. Extract most of the common logic of the bouncer sub-view-models into the parent `AuthMethodBouncerViewModel`, to ensure behavior consistency and remove some code duplication. This fixes some bugs like the error message not always being cleared when the input is cleared. 3. Represent the authentication attempt result more explicitly via a dedicated enum, to prevent confusion when handling a `null` vs `false` result. 4. Fix a memory leak when switching the authentication method. 5. Assign child view models of `BouncerViewModel` a temporary coroutine scope, so we can dispose of them properly when the authentication method is switched. 6. Move the "skip-authentication" business logic from `BouncerViewModel` to `BouncerInteractor`. 7. Remove `minPatternLength` from `BouncerViewModel` and `BouncerInteractor`. 8. Make view-model unit tests more concise by extracting the setup code (setting the authentication method, locking the device and opening the bouncer) to a helper function. Fix: 300441917 Test: Unit tests still pass. Test: Manually tested the 3 different bouncer auth methods and verified they still work as expected. Change-Id: I711df14547d8b10caf275890b4de6cbdd3177c36
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions