Loading
Move getUserSwitchability from UserManager to UserManagerService.
UserManager.getUserSwitchability was calling telecomManager.isInCall method to see whether there is an ongoing phone call. Since the call was made from client side, it was causing a SecurityException when switcing users via adb command and breaking CtsMultiUserHostTestCases tests. This CL moves all the logic from UserManager to UserManagerService, and calls telecomManager.isInCall() with Binder.clearCallingIdentity. Bug: 257538981 Bug: 261505371 Test: atest CtsMultiUserHostTestCases Change-Id: Idfca1fcb89688d08878b908ceed9c64f1e7091d3