public int stopUser(int userHandle, IStopUserCallback.Stub stub) { synchronized (mPidsSelfLocked) { int N = mPidsSelfLocked.size(); while (N-- > 0) { ProcessRecord r = mPidsSelfLocked.valueAt(N); if (r.userId == userHandle) { killProcess(r.pid); } } } try { stub.userStopped(userHandle); } catch (RemoteException e) { e.printStackTrace(); } return 0; }