Update privacy filter for incident report protos.

Bug: 153380903
Test: manual build
Change-Id: Iff1910d619983910c1e57e9ac335053415f6fa1a
This commit is contained in:
Wenjie Zhou
2020-04-15 10:35:07 -07:00
parent 23e062deb5
commit 27030cd14e
17 changed files with 38 additions and 37 deletions

View File

@@ -28,13 +28,3 @@ cc_library_static {
"android/bluetooth/smp/enums.proto",
],
}
java_library_host {
name: "protolog-proto",
srcs: [
"android/server/protolog.proto"
],
proto: {
type: "full",
},
}

View File

@@ -41,7 +41,7 @@ message ApplicationExitInfoProto {
optional int64 pss = 11;
optional int64 rss = 12;
optional int64 timestamp = 13;
optional string description = 14;
optional string description = 14 [(.android.privacy).dest = DEST_EXPLICIT];
optional bytes state = 15;
optional string trace_file = 16;
}

View File

@@ -20,8 +20,10 @@ package android.content;
option java_multiple_files = true;
import "frameworks/base/core/proto/android/privacy.proto";
// On disk representation of android.content.LocusId. Currently used by
// com.android.server.people.ConversationInfoProto.
message LocusIdProto {
optional string locus_id = 1;
optional string locus_id = 1 [(.android.privacy).dest = DEST_EXPLICIT];
}

View File

@@ -23,7 +23,7 @@ option java_multiple_files = true;
// Debugging information for android.nfc.cardemulation.AidGroup
message AidGroupProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
option (.android.msg_privacy).dest = DEST_EXPLICIT;
optional string category = 1;
// A group of Application Identifiers. A hexadecimal string, with an even amount of hexadecimal

View File

@@ -25,7 +25,7 @@ option java_multiple_files = true;
// Debugging information for android.nfc.cardemulation.ApduServiceInfo
message ApduServiceInfoProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
option (.android.msg_privacy).dest = DEST_EXPLICIT;
optional .android.content.ComponentNameProto component_name = 1;
optional string description = 2;

View File

@@ -75,8 +75,8 @@ message EnabledNfcFServicesProto {
message RegisteredAidCacheProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
message AidCacheEntry {
optional string key = 1;
optional string category = 2;
optional string key = 1 [(.android.privacy).dest = DEST_EXPLICIT];
optional string category = 2 [(.android.privacy).dest = DEST_EXPLICIT];
optional .android.content.ComponentNameProto default_component = 3;
repeated .android.nfc.cardemulation.ApduServiceInfoProto services = 4;
}
@@ -91,7 +91,7 @@ message AidRoutingManagerProto {
message Route {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 id = 1;
repeated string aids = 2;
repeated string aids = 2 [(.android.privacy).dest = DEST_EXPLICIT];
}
optional int32 default_route = 1;
repeated Route routes = 2;
@@ -108,7 +108,7 @@ message RegisteredT3tIdentifiersCacheProto {
message SystemCodeRoutingManagerProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
message T3tIdentifier {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
option (.android.msg_privacy).dest = DEST_EXPLICIT;
optional string system_code = 1;
optional string nfcid2 = 2;
}

View File

@@ -31,7 +31,7 @@ message NdefMessageProto {
message NdefRecordProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional bytes type = 1;
optional bytes id = 2;
optional bytes type = 1 [(.android.privacy).dest = DEST_EXPLICIT];
optional bytes id = 2 [(.android.privacy).dest = DEST_EXPLICIT];
optional int32 payload_bytes = 3;
}

View File

@@ -24,7 +24,7 @@ option java_multiple_files = true;
// Debugging information for android.nfc.cardemulation.NfcFServiceInfo
message NfcFServiceInfoProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
option (.android.msg_privacy).dest = DEST_EXPLICIT;
optional .android.content.ComponentNameProto component_name = 1;
// Description of the service

View File

@@ -104,7 +104,7 @@ message P2pLinkManagerProto {
optional int32 send_flags = 5;
optional bool send_enabled = 6;
optional bool receive_enabled = 7;
optional string callback_ndef = 8;
optional string callback_ndef = 8 [(.android.privacy).dest = DEST_EXPLICIT];
optional .android.nfc.NdefMessageProto message_to_send = 9;
repeated string uris_to_send = 10 [(.android.privacy).dest = DEST_EXPLICIT];
}

View File

@@ -19,6 +19,8 @@ package com.android.server.notification;
option java_multiple_files = true;
import "frameworks/base/core/proto/android/privacy.proto";
// On disk data store for historical notifications
message NotificationHistoryProto {
message StringPool {
@@ -33,7 +35,7 @@ message NotificationHistoryProto {
optional int32 package_index = 2;
// The name of the NotificationChannel this notification was posted to
optional string channel_name = 3;
optional string channel_name = 3 [(.android.privacy).dest = DEST_EXPLICIT];
// channel_name_index contains the index + 1 of the channel name in the string pool
optional int32 channel_name_index = 4;
@@ -49,9 +51,9 @@ message NotificationHistoryProto {
// The time at which the notification was posted
optional int64 posted_time_ms = 9;
// The title of the notification
optional string title = 10;
optional string title = 10 [(.android.privacy).dest = DEST_EXPLICIT];
// The text of the notification
optional string text = 11;
optional string text = 11 [(.android.privacy).dest = DEST_EXPLICIT];
// The small icon of the notification
optional Icon icon = 12;

View File

@@ -21,6 +21,7 @@ package com.android.server.people;
option java_multiple_files = true;
import "frameworks/base/core/proto/android/content/locusid.proto";
import "frameworks/base/core/proto/android/privacy.proto";
// On disk data of conversation infos for a user and app package.
message ConversationInfosProto {
@@ -40,10 +41,10 @@ message ConversationInfoProto {
optional .android.content.LocusIdProto locus_id_proto = 2;
// The URI of the contact in the conversation.
optional string contact_uri = 3;
optional string contact_uri = 3 [(.android.privacy).dest = DEST_EXPLICIT];
// The notification channel id of the conversation.
optional string notification_channel_id = 4;
optional string notification_channel_id = 4 [(.android.privacy).dest = DEST_EXPLICIT];
// Integer representation of shortcut bit flags.
optional int32 shortcut_flags = 5;
@@ -52,7 +53,7 @@ message ConversationInfoProto {
optional int32 conversation_flags = 6;
// The phone number of the contact.
optional string contact_phone_number = 7;
optional string contact_phone_number = 7 [(.android.privacy).dest = DEST_EXPLICIT];
}
// On disk data of events.

View File

@@ -20,8 +20,12 @@ package com.android.server.protolog;
option java_multiple_files = true;
import "frameworks/base/core/proto/android/privacy.proto";
/* represents a single log entry */
message ProtoLogMessage {
option (.android.msg_privacy).dest = DEST_LOCAL;
/* log statement identifier, created from message string and log level. */
optional sfixed32 message_hash = 1;
/* log time, relative to the elapsed system time clock. */
@@ -40,6 +44,8 @@ message ProtoLogMessage {
Encoded, it should start with 0x9 0x50 0x52 0x4f 0x54 0x4f 0x4c 0x4f 0x47 (.PROTOLOG), such
that they can be easily identified. */
message ProtoLogFileProto {
option (.android.msg_privacy).dest = DEST_LOCAL;
/* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L
(this is needed because enums have to be 32 bits and there's no nice way to put 64bit
constants into .proto files. */

View File

@@ -58,7 +58,7 @@ message SyncStatusProto {
message LastEventInfo {
optional int64 last_event_time = 1; // time since epoch
optional string last_event = 2;
optional string last_event = 2 [(.android.privacy).dest = DEST_EXPLICIT];
}
// Note: version doesn't need to be stored in proto because of how protos store information but
@@ -68,7 +68,7 @@ message SyncStatusProto {
optional int32 last_success_source = 4;
optional int64 last_failure_time = 5; // time since epoch
optional int32 last_failure_source = 6;
optional string last_failure_message = 7;
optional string last_failure_message = 7 [(.android.privacy).dest = DEST_EXPLICIT];
optional int64 initial_failure_time = 8; // time since epoch
optional bool pending = 9;
optional bool initialize = 10;

View File

@@ -112,13 +112,13 @@ message PendingEventProto {
optional int32 flags = 4;
optional int32 type = 5;
optional .android.content.ConfigurationProto config = 6;
optional string shortcut_id = 7;
optional string shortcut_id = 7 [(.android.privacy).dest = DEST_EXPLICIT];
optional int32 standby_bucket = 8;
optional string notification_channel_id = 9;
optional string notification_channel_id = 9 [(.android.privacy).dest = DEST_EXPLICIT];
optional int32 instance_id = 10;
optional string task_root_package = 11;
optional string task_root_class = 12;
optional string locus_id = 13;
optional string locus_id = 13 [(.android.privacy).dest = DEST_EXPLICIT];
}
/**
@@ -128,7 +128,7 @@ message ObfuscatedPackagesProto {
message PackagesMap {
optional int32 package_token = 1;
// The list of strings for each package where their indices are the token
repeated string strings = 2;
repeated string strings = 2 [(.android.privacy).dest = DEST_EXPLICIT];
}
optional int32 counter = 1;

View File

@@ -310,7 +310,7 @@ message ActivityRecordProto {
optional bool visible = 24;
reserved 25; // configuration_container
optional IdentifierProto identifier = 26;
optional string state = 27;
optional string state = 27 [(.android.privacy).dest = DEST_EXPLICIT];
optional bool front_of_task = 28;
optional int32 proc_id = 29;
optional bool translucent = 30;

View File

@@ -166,7 +166,7 @@ message SensorEventsProto {
message RecentEventsLog {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional string name = 1;
optional string name = 1 [(.android.privacy).dest = DEST_EXPLICIT];
optional int32 recent_events_count = 2;
repeated Event events = 3;
}

View File

@@ -6,7 +6,7 @@ java_library_host {
static_libs: [
"protolog-common",
"javaparser",
"protolog-proto",
"platformprotos",
"jsonlib",
],
}