Loading services/print/java/com/android/server/print/PrintManagerService.java +8 −2 Original line number Diff line number Diff line Loading @@ -555,8 +555,14 @@ public final class PrintManagerService extends SystemService { // to handle it as the change may affect ongoing print jobs. UserState userState = getOrCreateUserStateLocked(getChangingUserId()); boolean stoppedSomePackages = false; Iterator<PrintServiceInfo> iterator = userState.getEnabledPrintServices() .iterator(); List<PrintServiceInfo> enabledServices = userState .getEnabledPrintServices(); if (enabledServices == null) { return false; } Iterator<PrintServiceInfo> iterator = enabledServices.iterator(); while (iterator.hasNext()) { ComponentName componentName = iterator.next().getComponentName(); String componentPackage = componentName.getPackageName(); Loading services/print/java/com/android/server/print/UserState.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.content.pm.PackageManager.GET_META_DATA; import static android.content.pm.PackageManager.GET_SERVICES; import static android.content.pm.PackageManager.MATCH_DEBUG_TRIAGED_MISSING; import android.annotation.Nullable; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -336,7 +337,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks { mSpooler.setPrintJobState(printJobId, PrintJobInfo.STATE_QUEUED, null); } public List<PrintServiceInfo> getEnabledPrintServices() { public @Nullable List<PrintServiceInfo> getEnabledPrintServices() { synchronized (mLock) { List<PrintServiceInfo> enabledServices = null; final int installedServiceCount = mInstalledServices.size(); Loading Loading
services/print/java/com/android/server/print/PrintManagerService.java +8 −2 Original line number Diff line number Diff line Loading @@ -555,8 +555,14 @@ public final class PrintManagerService extends SystemService { // to handle it as the change may affect ongoing print jobs. UserState userState = getOrCreateUserStateLocked(getChangingUserId()); boolean stoppedSomePackages = false; Iterator<PrintServiceInfo> iterator = userState.getEnabledPrintServices() .iterator(); List<PrintServiceInfo> enabledServices = userState .getEnabledPrintServices(); if (enabledServices == null) { return false; } Iterator<PrintServiceInfo> iterator = enabledServices.iterator(); while (iterator.hasNext()) { ComponentName componentName = iterator.next().getComponentName(); String componentPackage = componentName.getPackageName(); Loading
services/print/java/com/android/server/print/UserState.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.content.pm.PackageManager.GET_META_DATA; import static android.content.pm.PackageManager.GET_SERVICES; import static android.content.pm.PackageManager.MATCH_DEBUG_TRIAGED_MISSING; import android.annotation.Nullable; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -336,7 +337,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks { mSpooler.setPrintJobState(printJobId, PrintJobInfo.STATE_QUEUED, null); } public List<PrintServiceInfo> getEnabledPrintServices() { public @Nullable List<PrintServiceInfo> getEnabledPrintServices() { synchronized (mLock) { List<PrintServiceInfo> enabledServices = null; final int installedServiceCount = mInstalledServices.size(); Loading