Loading apex/jobscheduler/service/java/com/android/server/job/JobConcurrencyManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -1518,8 +1518,8 @@ class JobConcurrencyManager { @WorkType final int workType) { final List<StateController> controllers = mService.mControllers; final int numControllers = controllers.size(); final PowerManager.WakeLock wl = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, jobStatus.getTag()); final PowerManager.WakeLock wl = mPowerManager.newWakeLock( PowerManager.PARTIAL_WAKE_LOCK, jobStatus.getWakelockTag()); wl.setWorkSource(mService.deriveWorkSource( jobStatus.getSourceUid(), jobStatus.getSourcePackageName())); wl.setReferenceCounted(false); Loading apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -5512,7 +5512,6 @@ public class JobSchedulerService extends com.android.server.SystemService pw.print("Evaluated bias: "); pw.println(JobInfo.getBiasString(bias)); pw.print("Tag: "); pw.println(job.getTag()); pw.print("Enq: "); TimeUtils.formatDuration(job.madePending - nowUptime, pw); pw.decreaseIndent(); Loading apex/jobscheduler/service/java/com/android/server/job/JobServiceContext.java +2 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,8 @@ public final class JobServiceContext implements ServiceConnection { // it was inflated from disk with not-yet-coherent delay/deadline bounds. job.clearPersistedUtcTimes(); mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, job.getTag()); mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, job.getWakelockTag()); mWakeLock.setWorkSource( mService.deriveWorkSource(job.getSourceUid(), job.getSourcePackageName())); mWakeLock.setReferenceCounted(false); Loading apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java +15 −6 Original line number Diff line number Diff line Loading @@ -253,7 +253,12 @@ public final class JobStatus { /** An ID that can be used to uniquely identify the job when logging statsd metrics. */ private final long mLoggingJobId; final String tag; /** * Tag to identify the wakelock held for this job. Lazily loaded in * {@link #getWakelockTag()} since it's not typically needed until the job is about to run. */ @Nullable private String mWakelockTag; /** Whether this job was scheduled by one app on behalf of another. */ final boolean mIsProxyJob; Loading Loading @@ -627,7 +632,6 @@ public final class JobStatus { this.batteryName = this.sourceTag != null ? bnNamespace + this.sourceTag + ":" + job.getService().getPackageName() : bnNamespace + job.getService().flattenToShortString(); this.tag = "*job*/" + this.batteryName + "#" + job.getId(); final String componentPackage = job.getService().getPackageName(); mIsProxyJob = !this.sourcePackageName.equals(componentPackage); Loading Loading @@ -1321,8 +1325,13 @@ public final class JobStatus { return batteryName; } public String getTag() { return tag; /** Return the String to be used as the tag for the wakelock held for this job. */ @NonNull public String getWakelockTag() { if (mWakelockTag == null) { mWakelockTag = "*job*/" + this.batteryName; } return mWakelockTag; } public int getBias() { Loading Loading @@ -2639,7 +2648,7 @@ public final class JobStatus { @NeverCompile // Avoid size overhead of debugging code. public void dump(IndentingPrintWriter pw, boolean full, long nowElapsed) { UserHandle.formatUid(pw, callingUid); pw.print(" tag="); pw.println(tag); pw.print(" tag="); pw.println(getWakelockTag()); pw.print("Source: uid="); UserHandle.formatUid(pw, getSourceUid()); pw.print(" user="); pw.print(getSourceUserId()); Loading Loading @@ -2955,7 +2964,7 @@ public final class JobStatus { final long token = proto.start(fieldId); proto.write(JobStatusDumpProto.CALLING_UID, callingUid); proto.write(JobStatusDumpProto.TAG, tag); proto.write(JobStatusDumpProto.TAG, getWakelockTag()); proto.write(JobStatusDumpProto.SOURCE_UID, getSourceUid()); proto.write(JobStatusDumpProto.SOURCE_USER_ID, getSourceUserId()); proto.write(JobStatusDumpProto.SOURCE_PACKAGE_NAME, getSourcePackageName()); Loading Loading
apex/jobscheduler/service/java/com/android/server/job/JobConcurrencyManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -1518,8 +1518,8 @@ class JobConcurrencyManager { @WorkType final int workType) { final List<StateController> controllers = mService.mControllers; final int numControllers = controllers.size(); final PowerManager.WakeLock wl = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, jobStatus.getTag()); final PowerManager.WakeLock wl = mPowerManager.newWakeLock( PowerManager.PARTIAL_WAKE_LOCK, jobStatus.getWakelockTag()); wl.setWorkSource(mService.deriveWorkSource( jobStatus.getSourceUid(), jobStatus.getSourcePackageName())); wl.setReferenceCounted(false); Loading
apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -5512,7 +5512,6 @@ public class JobSchedulerService extends com.android.server.SystemService pw.print("Evaluated bias: "); pw.println(JobInfo.getBiasString(bias)); pw.print("Tag: "); pw.println(job.getTag()); pw.print("Enq: "); TimeUtils.formatDuration(job.madePending - nowUptime, pw); pw.decreaseIndent(); Loading
apex/jobscheduler/service/java/com/android/server/job/JobServiceContext.java +2 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,8 @@ public final class JobServiceContext implements ServiceConnection { // it was inflated from disk with not-yet-coherent delay/deadline bounds. job.clearPersistedUtcTimes(); mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, job.getTag()); mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, job.getWakelockTag()); mWakeLock.setWorkSource( mService.deriveWorkSource(job.getSourceUid(), job.getSourcePackageName())); mWakeLock.setReferenceCounted(false); Loading
apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java +15 −6 Original line number Diff line number Diff line Loading @@ -253,7 +253,12 @@ public final class JobStatus { /** An ID that can be used to uniquely identify the job when logging statsd metrics. */ private final long mLoggingJobId; final String tag; /** * Tag to identify the wakelock held for this job. Lazily loaded in * {@link #getWakelockTag()} since it's not typically needed until the job is about to run. */ @Nullable private String mWakelockTag; /** Whether this job was scheduled by one app on behalf of another. */ final boolean mIsProxyJob; Loading Loading @@ -627,7 +632,6 @@ public final class JobStatus { this.batteryName = this.sourceTag != null ? bnNamespace + this.sourceTag + ":" + job.getService().getPackageName() : bnNamespace + job.getService().flattenToShortString(); this.tag = "*job*/" + this.batteryName + "#" + job.getId(); final String componentPackage = job.getService().getPackageName(); mIsProxyJob = !this.sourcePackageName.equals(componentPackage); Loading Loading @@ -1321,8 +1325,13 @@ public final class JobStatus { return batteryName; } public String getTag() { return tag; /** Return the String to be used as the tag for the wakelock held for this job. */ @NonNull public String getWakelockTag() { if (mWakelockTag == null) { mWakelockTag = "*job*/" + this.batteryName; } return mWakelockTag; } public int getBias() { Loading Loading @@ -2639,7 +2648,7 @@ public final class JobStatus { @NeverCompile // Avoid size overhead of debugging code. public void dump(IndentingPrintWriter pw, boolean full, long nowElapsed) { UserHandle.formatUid(pw, callingUid); pw.print(" tag="); pw.println(tag); pw.print(" tag="); pw.println(getWakelockTag()); pw.print("Source: uid="); UserHandle.formatUid(pw, getSourceUid()); pw.print(" user="); pw.print(getSourceUserId()); Loading Loading @@ -2955,7 +2964,7 @@ public final class JobStatus { final long token = proto.start(fieldId); proto.write(JobStatusDumpProto.CALLING_UID, callingUid); proto.write(JobStatusDumpProto.TAG, tag); proto.write(JobStatusDumpProto.TAG, getWakelockTag()); proto.write(JobStatusDumpProto.SOURCE_UID, getSourceUid()); proto.write(JobStatusDumpProto.SOURCE_USER_ID, getSourceUserId()); proto.write(JobStatusDumpProto.SOURCE_PACKAGE_NAME, getSourcePackageName()); Loading