[1/N] Replace global userId with per-function argument
To allow reusing DesktopTasksController functions that build WCTs for desktop operations for cases where the intended user is not current (such as during user-switching), this change removes the |userId| member variable from inner functions are replaces it with a |userId| argument to be passed by callers. The source of |userId|s become the TaskInfo.userId when available or ShellController.currentUserId when we do really mean to use the current user. ShellController is the source of truth for Shell, so use that instead of manually tracking user id changes. A follow up change will do the same for usages of |taskRepository|. This is a refactor to prepare for a future change where a transition request with user change info requires restoring the active desk of an incoming user (which would not be "current" yet to SystemUI/Shell) and deactivating the activate desk of the outgoing user. Flag: EXEMPT refactor Bug: 430988310 Bug: 406255019 Test: atest WMShellUnitTest Change-Id: Id4e34724b5728d6739ce7ff56ed93a09494c6ad3
Loading
Please register or sign in to comment