Loading apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java +16 −16 Original line number Diff line number Diff line Loading @@ -598,7 +598,6 @@ public final class JobStatus { long lastSuccessfulRunTime, long lastFailedRunTime, long cumulativeExecutionTimeMs, int internalFlags, int dynamicConstraints) { this.job = job; this.callingUid = callingUid; this.standbyBucket = standbyBucket; mNamespace = namespace; Loading Loading @@ -626,6 +625,22 @@ public final class JobStatus { this.sourceTag = tag; } // This needs to be done before setting the field variable. if (job.getRequiredNetwork() != null) { // Later, when we check if a given network satisfies the required // network, we need to know the UID that is requesting it, so push // the source UID into place. final JobInfo.Builder builder = new JobInfo.Builder(job); builder.setRequiredNetwork(new NetworkRequest.Builder(job.getRequiredNetwork()) .setUids(Collections.singleton(new Range<>(this.sourceUid, this.sourceUid))) .build()); // Don't perform validation checks at this point since we've already passed the // initial validation check. job = builder.build(false, false); } this.job = job; final String bnNamespace = namespace == null ? "" : "@" + namespace + "@"; this.batteryName = this.sourceTag != null ? bnNamespace + this.sourceTag + ":" + job.getService().getPackageName() Loading Loading @@ -708,21 +723,6 @@ public final class JobStatus { updateNetworkBytesLocked(); if (job.getRequiredNetwork() != null) { // Later, when we check if a given network satisfies the required // network, we need to know the UID that is requesting it, so push // our source UID into place. final JobInfo.Builder builder = new JobInfo.Builder(job); final NetworkRequest.Builder requestBuilder = new NetworkRequest.Builder(job.getRequiredNetwork()); requestBuilder.setUids( Collections.singleton(new Range<Integer>(this.sourceUid, this.sourceUid))); builder.setRequiredNetwork(requestBuilder.build()); // Don't perform validation checks at this point since we've already passed the // initial validation check. job = builder.build(false, false); } updateMediaBackupExemptionStatus(); } Loading Loading
apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java +16 −16 Original line number Diff line number Diff line Loading @@ -598,7 +598,6 @@ public final class JobStatus { long lastSuccessfulRunTime, long lastFailedRunTime, long cumulativeExecutionTimeMs, int internalFlags, int dynamicConstraints) { this.job = job; this.callingUid = callingUid; this.standbyBucket = standbyBucket; mNamespace = namespace; Loading Loading @@ -626,6 +625,22 @@ public final class JobStatus { this.sourceTag = tag; } // This needs to be done before setting the field variable. if (job.getRequiredNetwork() != null) { // Later, when we check if a given network satisfies the required // network, we need to know the UID that is requesting it, so push // the source UID into place. final JobInfo.Builder builder = new JobInfo.Builder(job); builder.setRequiredNetwork(new NetworkRequest.Builder(job.getRequiredNetwork()) .setUids(Collections.singleton(new Range<>(this.sourceUid, this.sourceUid))) .build()); // Don't perform validation checks at this point since we've already passed the // initial validation check. job = builder.build(false, false); } this.job = job; final String bnNamespace = namespace == null ? "" : "@" + namespace + "@"; this.batteryName = this.sourceTag != null ? bnNamespace + this.sourceTag + ":" + job.getService().getPackageName() Loading Loading @@ -708,21 +723,6 @@ public final class JobStatus { updateNetworkBytesLocked(); if (job.getRequiredNetwork() != null) { // Later, when we check if a given network satisfies the required // network, we need to know the UID that is requesting it, so push // our source UID into place. final JobInfo.Builder builder = new JobInfo.Builder(job); final NetworkRequest.Builder requestBuilder = new NetworkRequest.Builder(job.getRequiredNetwork()); requestBuilder.setUids( Collections.singleton(new Range<Integer>(this.sourceUid, this.sourceUid))); builder.setRequiredNetwork(requestBuilder.build()); // Don't perform validation checks at this point since we've already passed the // initial validation check. job = builder.build(false, false); } updateMediaBackupExemptionStatus(); } Loading