Adding privacy tags to JobScheduler and co.
Bug: 72393215
Test: Android builds
Change-Id: Ife5c32a58f6de830274ea13964154dcc10728820
diff --git a/core/proto/android/server/jobscheduler.proto b/core/proto/android/server/jobscheduler.proto
index 739fca3..304e63f 100644
--- a/core/proto/android/server/jobscheduler.proto
+++ b/core/proto/android/server/jobscheduler.proto
@@ -29,13 +29,18 @@
import "frameworks/base/core/proto/android/os/bundle.proto";
import "frameworks/base/core/proto/android/os/persistablebundle.proto";
import "frameworks/base/core/proto/android/server/forceappstandbytracker.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
message JobSchedulerServiceDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional ConstantsProto settings = 1;
repeated int32 started_users = 2;
message RegisteredJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional JobStatusDumpProto dump = 2;
@@ -56,6 +61,8 @@
// Which uids are currently in the foreground.
message PriorityOverride {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
// Use sint32 instead of an enum since priorities can technically be
// negative.
@@ -71,6 +78,8 @@
optional JobPackageTrackerDumpProto package_tracker = 8;
message PendingJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional JobStatusDumpProto dump = 2;
optional sint32 evaluated_priority = 3;
@@ -81,12 +90,18 @@
// From a service that has currently active or pending jobs.
message ActiveJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message InactiveJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 time_since_stopped_ms = 1;
// This is not always provided.
optional string stopped_reason = 2;
}
message RunningJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
// How long this job has been running for.
optional int64 running_duration_ms = 2;
@@ -119,6 +134,8 @@
// A com.android.server.job.JobSchedulerService.Constants object.
message ConstantsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Minimum # of idle jobs that must be ready in order to force the JMS to
// schedule things early.
optional int32 min_idle_count = 1;
@@ -187,10 +204,16 @@
}
message StateControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message AppIdleController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_parole_on = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional string source_package_name = 3;
@@ -201,9 +224,13 @@
repeated TrackedJob tracked_jobs = 2;
}
message BackgroundJobsController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional com.android.server.ForceAppStandbyTrackerProto force_app_standby_tracker = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional string source_package_name = 3;
@@ -217,6 +244,8 @@
repeated TrackedJob tracked_jobs = 2;
}
message BatteryController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_on_stable_power = 1;
optional bool is_battery_not_low = 2;
@@ -226,15 +255,21 @@
optional int32 last_broadcast_sequence_number = 4;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 5;
}
message ConnectivityController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_connected = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional .android.net.NetworkRequestProto required_network = 3;
@@ -242,31 +277,47 @@
repeated TrackedJob tracked_jobs = 2;
}
message ContentObserverController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 1;
message Observer {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 user_id = 1;
message TriggerContentData {
- optional string uri = 1;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string uri = 1 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
optional int32 flags = 2;
// A
// com.android.server.job.controllers.ContentObserverController.JobInstance
// object.
message JobInstance {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional int64 trigger_content_update_delay_ms = 3;
optional int64 trigger_content_max_delay_ms = 4;
- repeated string changed_authorities = 5;
- repeated string changed_uris = 6;
+ repeated string changed_authorities = 5 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
+ repeated string changed_uris = 6 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
}
repeated JobInstance jobs = 3;
}
@@ -275,10 +326,14 @@
repeated Observer observers = 2;
}
message DeviceIdleJobsController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// True when in device idle mode.
optional bool is_device_idle_mode = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional string source_package_name = 3;
@@ -293,30 +348,42 @@
repeated TrackedJob tracked_jobs = 2;
}
message IdleController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_idle = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 2;
}
message StorageController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_storage_not_low = 1;
optional int32 last_broadcast_sequence_number = 2;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 3;
}
message TimeController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 now_elapsed_realtime = 1;
optional int64 time_until_next_delay_alarm_ms = 2;
optional int64 time_until_next_deadline_alarm_ms = 3;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
@@ -347,6 +414,8 @@
// A com.android.server.job.JobPackageTracker.DataSet object.
message DataSetProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 start_clock_time_ms = 1;
// How much time has elapsed since the DataSet was instantiated.
optional int64 elapsed_time_ms = 2;
@@ -355,10 +424,14 @@
// Represents a com.android.server.job.JobPackageTracker.PackageEntry
// object, but with some extra data.
message PackageEntryProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string package_name = 2;
message State {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 duration_ms = 1;
optional int32 count = 2;
}
@@ -377,6 +450,8 @@
optional bool active_top = 8;
message StopReasonCount {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.app.JobParametersProto.CancelReason reason = 1;
optional int32 count = 2;
}
@@ -390,19 +465,27 @@
// Dump from com.android.server.job.GrantedUriPermissions.
message GrantedUriPermissionsDumpProto {
- optional int32 flags = 1;
- optional int32 source_user_id = 2;
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
+ optional int32 flags = 1 [ (.android.privacy).dest = DEST_AUTOMATIC ];
+ optional int32 source_user_id = 2 [
+ (.android.privacy).dest = DEST_AUTOMATIC
+ ];
optional string tag = 3;
optional string permission_owner = 4;
repeated string uris = 5;
}
message JobPackageTrackerDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated DataSetProto historical_stats = 1;
optional DataSetProto current_stats = 2;
}
message JobPackageHistoryProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Event {
UNKNOWN = 0;
START_JOB = 1;
@@ -411,12 +494,14 @@
STOP_PERIODIC_JOB = 4;
}
message HistoryEvent {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional Event event = 1;
optional int64 time_since_event_ms = 2;
optional int32 uid = 3;
// Job IDs can technically be negative.
optional int32 job_id = 4;
- optional string tag = 5;
+ optional string tag = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
// Only valid for STOP_JOB or STOP_PERIODIC_JOB Events.
optional .android.app.JobParametersProto.CancelReason stop_reason = 6;
}
@@ -424,17 +509,23 @@
}
message JobStatusShortInfoProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 calling_uid = 1;
// Job IDs can technically be negative.
optional int32 job_id = 2;
- optional string battery_name = 3;
+ optional string battery_name = 3 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
}
// Dump from a com.android.server.job.controllers.JobStatus object.
message JobStatusDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// The UID that scheduled the job.
optional int32 calling_uid = 1;
- optional string tag = 2;
+ optional string tag = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
// The UID for which the job is being run.
optional int32 source_uid = 3;
@@ -444,6 +535,8 @@
// Custom dump of android.app.job.JobInfo object.
message JobInfo {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.content.ComponentNameProto service = 1;
optional bool is_periodic = 2;
@@ -461,8 +554,10 @@
optional bool requires_device_idle = 10;
message TriggerContentUri {
- optional int32 flags = 1;
- optional string uri = 2;
+ optional int32 flags = 1 [
+ (.android.privacy).dest = DEST_AUTOMATIC
+ ];
+ optional string uri = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
repeated TriggerContentUri trigger_content_uris = 11;
optional int64 trigger_content_update_delay_ms = 12;
@@ -482,6 +577,8 @@
optional int64 max_execution_delay_ms = 21;
message Backoff {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Policy {
BACKOFF_POLICY_LINEAR = 0;
BACKOFF_POLICY_EXPONENTIAL = 1;
@@ -524,13 +621,19 @@
// Controllers that are currently tracking the job.
repeated TrackingController tracking_controllers = 11;
- repeated string changed_authorities = 12;
- repeated string changed_uris = 13;
+ repeated string changed_authorities = 12 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
+ repeated string changed_uris = 13 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
optional .android.net.NetworkProto network = 14;
// Only the desired data from an android.app.job.JobWorkItem object.
message JobWorkItem {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 work_id = 1;
optional int32 delivery_count = 2;
optional .android.content.IntentProto intent = 3;