Use LiveData for adding a role holder in role request.
Due to the async nature of role operations, we need an object to take care of the RoleManager.addRoleHolderAsUser() callback, keep track of the state while avoiding leaking a surrounding context. ViewModel and LiveData is a good fit for this scenario. Bug: 110557011 Test: build Change-Id: Id6ad1c92d7046ecfbc232ef0133b0566d4f7750c
Loading
Please register or sign in to comment