Loading services/core/java/com/android/server/job/JobSchedulerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public final class JobSchedulerService extends com.android.server.SystemService /** The maximum number of concurrent jobs we run at one time. */ private static final int MAX_JOB_CONTEXTS_COUNT = 8; /** Enforce a per-app limit on scheduled jobs? */ private static final boolean ENFORCE_MAX_JOBS = false; private static final boolean ENFORCE_MAX_JOBS = true; /** The maximum number of jobs that we allow an unprivileged app to schedule */ private static final int MAX_JOBS_PER_APP = 100; Loading services/core/java/com/android/server/job/JobStore.java +13 −1 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ public class JobStore { return null; } final String sourcePackageName = parser.getAttributeValue(null, "sourcePackageName"); String sourcePackageName = parser.getAttributeValue(null, "sourcePackageName"); final String sourceTag = parser.getAttributeValue(null, "sourceTag"); Loading Loading @@ -660,6 +660,18 @@ public class JobStore { jobBuilder.setExtras(extras); parser.nextTag(); // Consume </extras> // Migrate sync jobs forward from earlier, incomplete representation if ("android".equals(sourcePackageName) && extras != null && extras.getBoolean("SyncManagerJob", false)) { sourcePackageName = extras.getString("owningPackage", sourcePackageName); if (DEBUG) { Slog.i(TAG, "Fixing up sync job source package name from 'android' to '" + sourcePackageName + "'"); } } // And now we're done JobStatus js = new JobStatus( jobBuilder.build(), uid, sourcePackageName, sourceUserId, sourceTag, elapsedRuntimes.first, elapsedRuntimes.second); Loading Loading
services/core/java/com/android/server/job/JobSchedulerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public final class JobSchedulerService extends com.android.server.SystemService /** The maximum number of concurrent jobs we run at one time. */ private static final int MAX_JOB_CONTEXTS_COUNT = 8; /** Enforce a per-app limit on scheduled jobs? */ private static final boolean ENFORCE_MAX_JOBS = false; private static final boolean ENFORCE_MAX_JOBS = true; /** The maximum number of jobs that we allow an unprivileged app to schedule */ private static final int MAX_JOBS_PER_APP = 100; Loading
services/core/java/com/android/server/job/JobStore.java +13 −1 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ public class JobStore { return null; } final String sourcePackageName = parser.getAttributeValue(null, "sourcePackageName"); String sourcePackageName = parser.getAttributeValue(null, "sourcePackageName"); final String sourceTag = parser.getAttributeValue(null, "sourceTag"); Loading Loading @@ -660,6 +660,18 @@ public class JobStore { jobBuilder.setExtras(extras); parser.nextTag(); // Consume </extras> // Migrate sync jobs forward from earlier, incomplete representation if ("android".equals(sourcePackageName) && extras != null && extras.getBoolean("SyncManagerJob", false)) { sourcePackageName = extras.getString("owningPackage", sourcePackageName); if (DEBUG) { Slog.i(TAG, "Fixing up sync job source package name from 'android' to '" + sourcePackageName + "'"); } } // And now we're done JobStatus js = new JobStatus( jobBuilder.build(), uid, sourcePackageName, sourceUserId, sourceTag, elapsedRuntimes.first, elapsedRuntimes.second); Loading