Loading services/print/java/com/android/server/print/PrintManagerService.java +31 −17 Original line number Diff line number Diff line Loading @@ -627,7 +627,12 @@ public final class PrintManagerService extends SystemService { return userState; } private void handleUserStarted(int userId) { private void handleUserStarted(final int userId) { // This code will touch the remote print spooler which // must be called off the main thread, so post the work. BackgroundThread.getHandler().post(new Runnable() { @Override public void run() { UserState userState; synchronized (mLock) { userState = getOrCreateUserStateLocked(userId); Loading @@ -638,8 +643,15 @@ public final class PrintManagerService extends SystemService { // are from the last boot and no application would query them. userState.removeObsoletePrintJobs(); } }); } private void handleUserStopped(int userId) { private void handleUserStopped(final int userId) { // This code will touch the remote print spooler which // must be called off the main thread, so post the work. BackgroundThread.getHandler().post(new Runnable() { @Override public void run() { synchronized (mLock) { UserState userState = mUserStates.get(userId); if (userState != null) { Loading @@ -648,6 +660,8 @@ public final class PrintManagerService extends SystemService { } } } }); } private int resolveCallingProfileParentLocked(int userId) { if (userId != getCurrentUserId()) { Loading Loading
services/print/java/com/android/server/print/PrintManagerService.java +31 −17 Original line number Diff line number Diff line Loading @@ -627,7 +627,12 @@ public final class PrintManagerService extends SystemService { return userState; } private void handleUserStarted(int userId) { private void handleUserStarted(final int userId) { // This code will touch the remote print spooler which // must be called off the main thread, so post the work. BackgroundThread.getHandler().post(new Runnable() { @Override public void run() { UserState userState; synchronized (mLock) { userState = getOrCreateUserStateLocked(userId); Loading @@ -638,8 +643,15 @@ public final class PrintManagerService extends SystemService { // are from the last boot and no application would query them. userState.removeObsoletePrintJobs(); } }); } private void handleUserStopped(int userId) { private void handleUserStopped(final int userId) { // This code will touch the remote print spooler which // must be called off the main thread, so post the work. BackgroundThread.getHandler().post(new Runnable() { @Override public void run() { synchronized (mLock) { UserState userState = mUserStates.get(userId); if (userState != null) { Loading @@ -648,6 +660,8 @@ public final class PrintManagerService extends SystemService { } } } }); } private int resolveCallingProfileParentLocked(int userId) { if (userId != getCurrentUserId()) { Loading