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

Skip to content
Commit 762af00c authored by helencheuk's avatar helencheuk
Browse files

[Contextual Edu] Display edu notification

Display education notification when UiType received is Notification in ContextualEduUiCoordinator
Add title and content for the notification. Tutorial will be launched when user taps the edu notification.

Add userId to GestureEduModel and EducationInfo for 2 reasons:
1) "educationTriggered" in KeyboardTouchpadEduInteractor is a StateFlow which only emits values that are distinct from the previous item.
All users shares the same KeyboardTouchpadEduInteractor so it is necessary to know which user the education is for, otherwise same education of 2 different users will not both be emitted for UI to display.
e.g. If BACK notification of user0 and user10 are set to be value of "_educationTriggered" consecutively without userId, ContextualEduUiCoordinator will only receive the 1st value to display and not receive the 2nd one.
2) notifyAsUser is used to display notification in ContextualEduUiCoordinator, we need to pass in userId to call this method

New variable userId is added in UserContextualEducationRepository because of its responsibility to maintain edu data based on user change.

Bug: 358633150
Test: ContextualEduUiCoordinatorTest
Test: ContextualEducationRepositoryTest
Flag: com.android.systemui.keyboard_touchpad_contextual_education

Change-Id: I84d1f550b3741421fb35463aa0b95acd8308b4b8
parent 1d94f565
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment