Loading apex/jobscheduler/framework/java/android/app/job/JobParameters.java +19 −11 Original line number Diff line number Diff line Loading @@ -45,25 +45,25 @@ public class JobParameters implements Parcelable { /** @hide */ public static final int INTERNAL_STOP_REASON_CANCELED = JobProtoEnums.STOP_REASON_CANCELLED; // 0. JobProtoEnums.INTERNAL_STOP_REASON_CANCELLED; // 0. /** @hide */ public static final int INTERNAL_STOP_REASON_CONSTRAINTS_NOT_SATISFIED = JobProtoEnums.STOP_REASON_CONSTRAINTS_NOT_SATISFIED; // 1. JobProtoEnums.INTERNAL_STOP_REASON_CONSTRAINTS_NOT_SATISFIED; // 1. /** @hide */ public static final int INTERNAL_STOP_REASON_PREEMPT = JobProtoEnums.STOP_REASON_PREEMPT; // 2. JobProtoEnums.INTERNAL_STOP_REASON_PREEMPT; // 2. /** * The job ran for at least its minimum execution limit. * @hide */ public static final int INTERNAL_STOP_REASON_TIMEOUT = JobProtoEnums.STOP_REASON_TIMEOUT; // 3. JobProtoEnums.INTERNAL_STOP_REASON_TIMEOUT; // 3. /** @hide */ public static final int INTERNAL_STOP_REASON_DEVICE_IDLE = JobProtoEnums.STOP_REASON_DEVICE_IDLE; // 4. JobProtoEnums.INTERNAL_STOP_REASON_DEVICE_IDLE; // 4. /** @hide */ public static final int INTERNAL_STOP_REASON_DEVICE_THERMAL = JobProtoEnums.STOP_REASON_DEVICE_THERMAL; // 5. JobProtoEnums.INTERNAL_STOP_REASON_DEVICE_THERMAL; // 5. /** * The job is in the {@link android.app.usage.UsageStatsManager#STANDBY_BUCKET_RESTRICTED} * bucket. Loading @@ -71,26 +71,30 @@ public class JobParameters implements Parcelable { * @hide */ public static final int INTERNAL_STOP_REASON_RESTRICTED_BUCKET = JobProtoEnums.STOP_REASON_RESTRICTED_BUCKET; // 6. JobProtoEnums.INTERNAL_STOP_REASON_RESTRICTED_BUCKET; // 6. /** * The app was uninstalled. * @hide */ public static final int INTERNAL_STOP_REASON_UNINSTALL = 7; public static final int INTERNAL_STOP_REASON_UNINSTALL = JobProtoEnums.INTERNAL_STOP_REASON_UNINSTALL; // 7. /** * The app's data was cleared. * @hide */ public static final int INTERNAL_STOP_REASON_DATA_CLEARED = 8; public static final int INTERNAL_STOP_REASON_DATA_CLEARED = JobProtoEnums.INTERNAL_STOP_REASON_DATA_CLEARED; // 8. /** * @hide */ public static final int INTERNAL_STOP_REASON_RTC_UPDATED = 9; public static final int INTERNAL_STOP_REASON_RTC_UPDATED = JobProtoEnums.INTERNAL_STOP_REASON_RTC_UPDATED; // 9. /** * The app called jobFinished() on its own. * @hide */ public static final int INTERNAL_STOP_REASON_SUCCESSFUL_FINISH = 10; public static final int INTERNAL_STOP_REASON_SUCCESSFUL_FINISH = JobProtoEnums.INTERNAL_STOP_REASON_SUCCESSFUL_FINISH; // 10. /** * All the stop reason codes. This should be regarded as an immutable array at runtime. Loading @@ -109,6 +113,10 @@ public class JobParameters implements Parcelable { INTERNAL_STOP_REASON_DEVICE_IDLE, INTERNAL_STOP_REASON_DEVICE_THERMAL, INTERNAL_STOP_REASON_RESTRICTED_BUCKET, INTERNAL_STOP_REASON_UNINSTALL, INTERNAL_STOP_REASON_DATA_CLEARED, INTERNAL_STOP_REASON_RTC_UPDATED, INTERNAL_STOP_REASON_SUCCESSFUL_FINISH, }; /** Loading apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -1088,7 +1088,7 @@ public class JobSchedulerService extends com.android.server.SystemService FrameworkStatsLog.write_non_chained(FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED, uId, null, jobStatus.getBatteryName(), FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED__STATE__SCHEDULED, JobProtoEnums.STOP_REASON_UNKNOWN, jobStatus.getStandbyBucket(), JobProtoEnums.INTERNAL_STOP_REASON_UNKNOWN, jobStatus.getStandbyBucket(), jobStatus.getJobId(), jobStatus.hasChargingConstraint(), jobStatus.hasBatteryNotLowConstraint(), Loading @@ -1099,7 +1099,8 @@ public class JobSchedulerService extends com.android.server.SystemService jobStatus.hasConnectivityConstraint(), jobStatus.hasContentTriggerConstraint(), jobStatus.isRequestedExpeditedJob(), /* isRunningAsExpeditedJob */ false); /* isRunningAsExpeditedJob */ false, JobProtoEnums.STOP_REASON_UNDEFINED); // 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 Loading apex/jobscheduler/service/java/com/android/server/job/JobServiceContext.java +6 −3 Original line number Diff line number Diff line Loading @@ -314,7 +314,8 @@ public final class JobServiceContext implements ServiceConnection { FrameworkStatsLog.write_non_chained(FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED, job.getSourceUid(), null, job.getBatteryName(), FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED__STATE__STARTED, JobProtoEnums.STOP_REASON_UNKNOWN, job.getStandbyBucket(), job.getJobId(), JobProtoEnums.INTERNAL_STOP_REASON_UNKNOWN, job.getStandbyBucket(), job.getJobId(), job.hasChargingConstraint(), job.hasBatteryNotLowConstraint(), job.hasStorageNotLowConstraint(), Loading @@ -324,7 +325,8 @@ public final class JobServiceContext implements ServiceConnection { job.hasConnectivityConstraint(), job.hasContentTriggerConstraint(), job.isRequestedExpeditedJob(), job.shouldTreatAsExpeditedJob()); job.shouldTreatAsExpeditedJob(), JobProtoEnums.STOP_REASON_UNDEFINED); try { mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid()); } catch (RemoteException e) { Loading Loading @@ -923,7 +925,8 @@ public final class JobServiceContext implements ServiceConnection { completedJob.hasConnectivityConstraint(), completedJob.hasContentTriggerConstraint(), completedJob.isRequestedExpeditedJob(), completedJob.startedAsExpeditedJob); completedJob.startedAsExpeditedJob, mParams.getStopReason()); try { mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), mRunningJob.getSourceUid(), internalStopReason); Loading core/proto/android/os/batterystats.proto +1 −1 Original line number Diff line number Diff line Loading @@ -642,7 +642,7 @@ message UidProto { message ReasonCount { option (android.msg_privacy).dest = DEST_AUTOMATIC; optional android.app.job.StopReasonEnum name = 1; optional android.app.job.InternalStopReasonEnum name = 1; optional int32 count = 2; } repeated ReasonCount reason_count = 2; Loading core/proto/android/server/jobscheduler.proto +3 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ message JobSchedulerServiceDumpProto { message JobRestriction { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.app.job.StopReasonEnum reason = 1; optional .android.app.job.InternalStopReasonEnum reason = 1; optional bool is_restricting = 2; } Loading Loading @@ -856,7 +856,7 @@ message DataSetProto { message StopReasonCount { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.app.job.StopReasonEnum reason = 1; optional .android.app.job.InternalStopReasonEnum reason = 1; optional int32 count = 2; } repeated StopReasonCount stop_reasons = 9; Loading Loading @@ -907,7 +907,7 @@ message JobPackageHistoryProto { optional int32 job_id = 4; optional string tag = 5; // Only valid for STOP_JOB or STOP_PERIODIC_JOB Events. optional .android.app.job.StopReasonEnum stop_reason = 6; optional .android.app.job.InternalStopReasonEnum stop_reason = 6; } repeated HistoryEvent history_event = 1; } Loading Loading
apex/jobscheduler/framework/java/android/app/job/JobParameters.java +19 −11 Original line number Diff line number Diff line Loading @@ -45,25 +45,25 @@ public class JobParameters implements Parcelable { /** @hide */ public static final int INTERNAL_STOP_REASON_CANCELED = JobProtoEnums.STOP_REASON_CANCELLED; // 0. JobProtoEnums.INTERNAL_STOP_REASON_CANCELLED; // 0. /** @hide */ public static final int INTERNAL_STOP_REASON_CONSTRAINTS_NOT_SATISFIED = JobProtoEnums.STOP_REASON_CONSTRAINTS_NOT_SATISFIED; // 1. JobProtoEnums.INTERNAL_STOP_REASON_CONSTRAINTS_NOT_SATISFIED; // 1. /** @hide */ public static final int INTERNAL_STOP_REASON_PREEMPT = JobProtoEnums.STOP_REASON_PREEMPT; // 2. JobProtoEnums.INTERNAL_STOP_REASON_PREEMPT; // 2. /** * The job ran for at least its minimum execution limit. * @hide */ public static final int INTERNAL_STOP_REASON_TIMEOUT = JobProtoEnums.STOP_REASON_TIMEOUT; // 3. JobProtoEnums.INTERNAL_STOP_REASON_TIMEOUT; // 3. /** @hide */ public static final int INTERNAL_STOP_REASON_DEVICE_IDLE = JobProtoEnums.STOP_REASON_DEVICE_IDLE; // 4. JobProtoEnums.INTERNAL_STOP_REASON_DEVICE_IDLE; // 4. /** @hide */ public static final int INTERNAL_STOP_REASON_DEVICE_THERMAL = JobProtoEnums.STOP_REASON_DEVICE_THERMAL; // 5. JobProtoEnums.INTERNAL_STOP_REASON_DEVICE_THERMAL; // 5. /** * The job is in the {@link android.app.usage.UsageStatsManager#STANDBY_BUCKET_RESTRICTED} * bucket. Loading @@ -71,26 +71,30 @@ public class JobParameters implements Parcelable { * @hide */ public static final int INTERNAL_STOP_REASON_RESTRICTED_BUCKET = JobProtoEnums.STOP_REASON_RESTRICTED_BUCKET; // 6. JobProtoEnums.INTERNAL_STOP_REASON_RESTRICTED_BUCKET; // 6. /** * The app was uninstalled. * @hide */ public static final int INTERNAL_STOP_REASON_UNINSTALL = 7; public static final int INTERNAL_STOP_REASON_UNINSTALL = JobProtoEnums.INTERNAL_STOP_REASON_UNINSTALL; // 7. /** * The app's data was cleared. * @hide */ public static final int INTERNAL_STOP_REASON_DATA_CLEARED = 8; public static final int INTERNAL_STOP_REASON_DATA_CLEARED = JobProtoEnums.INTERNAL_STOP_REASON_DATA_CLEARED; // 8. /** * @hide */ public static final int INTERNAL_STOP_REASON_RTC_UPDATED = 9; public static final int INTERNAL_STOP_REASON_RTC_UPDATED = JobProtoEnums.INTERNAL_STOP_REASON_RTC_UPDATED; // 9. /** * The app called jobFinished() on its own. * @hide */ public static final int INTERNAL_STOP_REASON_SUCCESSFUL_FINISH = 10; public static final int INTERNAL_STOP_REASON_SUCCESSFUL_FINISH = JobProtoEnums.INTERNAL_STOP_REASON_SUCCESSFUL_FINISH; // 10. /** * All the stop reason codes. This should be regarded as an immutable array at runtime. Loading @@ -109,6 +113,10 @@ public class JobParameters implements Parcelable { INTERNAL_STOP_REASON_DEVICE_IDLE, INTERNAL_STOP_REASON_DEVICE_THERMAL, INTERNAL_STOP_REASON_RESTRICTED_BUCKET, INTERNAL_STOP_REASON_UNINSTALL, INTERNAL_STOP_REASON_DATA_CLEARED, INTERNAL_STOP_REASON_RTC_UPDATED, INTERNAL_STOP_REASON_SUCCESSFUL_FINISH, }; /** Loading
apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -1088,7 +1088,7 @@ public class JobSchedulerService extends com.android.server.SystemService FrameworkStatsLog.write_non_chained(FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED, uId, null, jobStatus.getBatteryName(), FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED__STATE__SCHEDULED, JobProtoEnums.STOP_REASON_UNKNOWN, jobStatus.getStandbyBucket(), JobProtoEnums.INTERNAL_STOP_REASON_UNKNOWN, jobStatus.getStandbyBucket(), jobStatus.getJobId(), jobStatus.hasChargingConstraint(), jobStatus.hasBatteryNotLowConstraint(), Loading @@ -1099,7 +1099,8 @@ public class JobSchedulerService extends com.android.server.SystemService jobStatus.hasConnectivityConstraint(), jobStatus.hasContentTriggerConstraint(), jobStatus.isRequestedExpeditedJob(), /* isRunningAsExpeditedJob */ false); /* isRunningAsExpeditedJob */ false, JobProtoEnums.STOP_REASON_UNDEFINED); // 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 Loading
apex/jobscheduler/service/java/com/android/server/job/JobServiceContext.java +6 −3 Original line number Diff line number Diff line Loading @@ -314,7 +314,8 @@ public final class JobServiceContext implements ServiceConnection { FrameworkStatsLog.write_non_chained(FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED, job.getSourceUid(), null, job.getBatteryName(), FrameworkStatsLog.SCHEDULED_JOB_STATE_CHANGED__STATE__STARTED, JobProtoEnums.STOP_REASON_UNKNOWN, job.getStandbyBucket(), job.getJobId(), JobProtoEnums.INTERNAL_STOP_REASON_UNKNOWN, job.getStandbyBucket(), job.getJobId(), job.hasChargingConstraint(), job.hasBatteryNotLowConstraint(), job.hasStorageNotLowConstraint(), Loading @@ -324,7 +325,8 @@ public final class JobServiceContext implements ServiceConnection { job.hasConnectivityConstraint(), job.hasContentTriggerConstraint(), job.isRequestedExpeditedJob(), job.shouldTreatAsExpeditedJob()); job.shouldTreatAsExpeditedJob(), JobProtoEnums.STOP_REASON_UNDEFINED); try { mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid()); } catch (RemoteException e) { Loading Loading @@ -923,7 +925,8 @@ public final class JobServiceContext implements ServiceConnection { completedJob.hasConnectivityConstraint(), completedJob.hasContentTriggerConstraint(), completedJob.isRequestedExpeditedJob(), completedJob.startedAsExpeditedJob); completedJob.startedAsExpeditedJob, mParams.getStopReason()); try { mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), mRunningJob.getSourceUid(), internalStopReason); Loading
core/proto/android/os/batterystats.proto +1 −1 Original line number Diff line number Diff line Loading @@ -642,7 +642,7 @@ message UidProto { message ReasonCount { option (android.msg_privacy).dest = DEST_AUTOMATIC; optional android.app.job.StopReasonEnum name = 1; optional android.app.job.InternalStopReasonEnum name = 1; optional int32 count = 2; } repeated ReasonCount reason_count = 2; Loading
core/proto/android/server/jobscheduler.proto +3 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ message JobSchedulerServiceDumpProto { message JobRestriction { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.app.job.StopReasonEnum reason = 1; optional .android.app.job.InternalStopReasonEnum reason = 1; optional bool is_restricting = 2; } Loading Loading @@ -856,7 +856,7 @@ message DataSetProto { message StopReasonCount { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.app.job.StopReasonEnum reason = 1; optional .android.app.job.InternalStopReasonEnum reason = 1; optional int32 count = 2; } repeated StopReasonCount stop_reasons = 9; Loading Loading @@ -907,7 +907,7 @@ message JobPackageHistoryProto { optional int32 job_id = 4; optional string tag = 5; // Only valid for STOP_JOB or STOP_PERIODIC_JOB Events. optional .android.app.job.StopReasonEnum stop_reason = 6; optional .android.app.job.InternalStopReasonEnum stop_reason = 6; } repeated HistoryEvent history_event = 1; } Loading