Merge "Add new fields to ScheduledJobStateChanged."

This commit is contained in:
TreeHugger Robot
2021-11-29 20:14:24 +00:00
committed by Android (Google) Code Review
3 changed files with 21 additions and 3 deletions

View File

@@ -1371,7 +1371,11 @@ public class JobSchedulerService extends com.android.server.SystemService
jobStatus.hasContentTriggerConstraint(),
jobStatus.isRequestedExpeditedJob(),
/* isRunningAsExpeditedJob */ false,
JobProtoEnums.STOP_REASON_UNDEFINED);
JobProtoEnums.STOP_REASON_UNDEFINED,
jobStatus.getJob().isPrefetch(),
jobStatus.getJob().getPriority(),
jobStatus.getEffectivePriority(),
jobStatus.getNumFailures());
// If the job is immediately ready to run, then we can just immediately
// put it in the pending list and try to schedule it. This is especially

View File

@@ -356,7 +356,11 @@ public final class JobServiceContext implements ServiceConnection {
job.hasContentTriggerConstraint(),
job.isRequestedExpeditedJob(),
job.shouldTreatAsExpeditedJob(),
JobProtoEnums.STOP_REASON_UNDEFINED);
JobProtoEnums.STOP_REASON_UNDEFINED,
job.getJob().isPrefetch(),
job.getJob().getPriority(),
job.getEffectivePriority(),
job.getNumFailures());
try {
mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid());
} catch (RemoteException e) {
@@ -1028,7 +1032,11 @@ public final class JobServiceContext implements ServiceConnection {
completedJob.hasContentTriggerConstraint(),
completedJob.isRequestedExpeditedJob(),
completedJob.startedAsExpeditedJob,
mParams.getStopReason());
mParams.getStopReason(),
completedJob.getJob().isPrefetch(),
completedJob.getJob().getPriority(),
completedJob.getEffectivePriority(),
completedJob.getNumFailures());
try {
mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), mRunningJob.getSourceUid(),
internalStopReason);

View File

@@ -50,6 +50,12 @@
{"include-filter": "com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testMeteredNetworkAccess_expeditedJob"},
{"include-filter": "com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testNonMeteredNetworkAccess_expeditedJob"}
]
},
{
"name": "CtsStatsdAtomHostTestCases",
"options": [
{"include-filter": "android.cts.statsdatom.jobscheduler"}
]
}
]
}