Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 38a987f8 authored by burakov's avatar burakov
Browse files

[flexiglass] Improvements to lockout state management and rendering:

1. Add a new flow `failedAuthenticationAttempts`, which is updated
directly from the upstream source of truth. This will be needed for the
device wipe dialog, so needs to be independent from lockout.

2. Remove the `lockout` state and associated model, which is now
redundant; we store the lockout end timestamp and failed auth attempts
as separate and independent pieces of state.

3. Unify `setLockoutDuration` with `reportLockoutStarted`.

4. Move the lockout countdown updates to the view-model, because it is a
transient state that is only relevant for presentation (UI message) and
so we can shave off some propagation overhead and complexity.

5. Fix bug where the throttling dialog countdown is updating every
second (it should remain constant).

6. Fix bug where the lockout dialog would be shown again when switching
to a user with an active lockout.

7. Make `AuthenticationRepository` responsible for maintaining the
freshness of the `hasLockoutOccurred` state.

8. Rename `authenticationChallengeResult` to `onAuthenticationResult`,
to convey it's a flow of events rather than state (similar to our
de-facto convention elsewhere), and move it out of the repository.

9. Refactor `AuthenticationInteractorTest` to be more concise, readable
and robust.

Fix: 314962784
Fix: 316117169
Bug: 314757822
Bug: 306559035
Test: Added unit tests.
Test: Existing unit tests still pass.
Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT
Change-Id: Ic3050c4c0b117c3e61c35092f14c7c6ce32cb908
parent 1b5c9f37
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment