diff options
author | Joe Onorato <joeo@google.com> | 2016-12-20 08:18:32 -0800 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2016-12-20 22:28:56 -0800 |
commit | 7669012623a18855913c84ec0690066fbfd823ea (patch) | |
tree | edca24d00ab306b3abeae8777b189159a174eb26 | |
parent | fe9a2a799f0f388c7c531454b8ec964ed8497499 (diff) |
Clean up file names for protos
Test: cts-tradefed run singleCommand cts -d --module CtsIncidentHostTestCases
Change-Id: Iea2fc81768082e8e01afa8df86e113665020e7f6
-rw-r--r-- | core/proto/android/content/component_name.proto | 6 | ||||
-rw-r--r-- | core/proto/android/content/configuration.proto | 32 | ||||
-rw-r--r-- | core/proto/android/content/locale.proto | 8 | ||||
-rw-r--r-- | core/proto/android/os/incident.proto (renamed from core/proto/android/os/incident_proto.proto) | 18 | ||||
-rw-r--r-- | core/proto/android/service/fingerprint.proto (renamed from core/proto/android/service/fingerprint_proto.proto) | 19 | ||||
-rw-r--r-- | tools/incident_report/main.cpp | 2 | ||||
-rw-r--r-- | tools/incident_section_gen/main.cpp | 2 |
7 files changed, 44 insertions, 43 deletions
diff --git a/core/proto/android/content/component_name.proto b/core/proto/android/content/component_name.proto index 7908af9d2a36..90f6ffb3781a 100644 --- a/core/proto/android/content/component_name.proto +++ b/core/proto/android/content/component_name.proto @@ -14,7 +14,7 @@ * limitations under the License. */ -syntax = "proto2"; +syntax = "proto3"; option java_package = "android.content"; option java_multiple_files = true; @@ -25,7 +25,7 @@ package android.content; * An android.content.ComponentName object. */ message ComponentNameProto { - optional string package_name = 1; - optional string class_name = 2; + string package_name = 1; + string class_name = 2; } diff --git a/core/proto/android/content/configuration.proto b/core/proto/android/content/configuration.proto index 683e7aacd3ad..f46b73afa750 100644 --- a/core/proto/android/content/configuration.proto +++ b/core/proto/android/content/configuration.proto @@ -14,7 +14,7 @@ * limitations under the License. */ -syntax = "proto2"; +syntax = "proto3"; option java_package = "android.content"; option java_multiple_files = true; @@ -27,21 +27,21 @@ import "frameworks/base/core/proto/android/content/locale.proto"; * An android resource configuration. */ message ConfigurationProto { - optional float font_scale = 1; - optional uint32 mcc = 2; - optional uint32 mnc = 3; + float font_scale = 1; + uint32 mcc = 2; + uint32 mnc = 3; repeated LocaleProto locales = 4; - optional uint32 screen_layout = 5; - optional uint32 touchscreen = 6; - optional uint32 keyboard_hidden = 7; - optional uint32 hard_keyboard_hidden = 8; - optional uint32 navigation = 9; - optional uint32 navigation_hidden = 10; - optional uint32 orientation = 11; - optional uint32 ui_mode = 12; - optional uint32 screen_width_dp = 13; - optional uint32 screen_height_dp = 14; - optional uint32 smallest_screen_width_dp = 15; - optional uint32 density_dpi = 16; + uint32 screen_layout = 5; + uint32 touchscreen = 6; + uint32 keyboard_hidden = 7; + uint32 hard_keyboard_hidden = 8; + uint32 navigation = 9; + uint32 navigation_hidden = 10; + uint32 orientation = 11; + uint32 ui_mode = 12; + uint32 screen_width_dp = 13; + uint32 screen_height_dp = 14; + uint32 smallest_screen_width_dp = 15; + uint32 density_dpi = 16; } diff --git a/core/proto/android/content/locale.proto b/core/proto/android/content/locale.proto index 55ce68eed15f..961b10b72fa2 100644 --- a/core/proto/android/content/locale.proto +++ b/core/proto/android/content/locale.proto @@ -14,7 +14,7 @@ * limitations under the License. */ -syntax = "proto2"; +syntax = "proto3"; option java_package = "android.content"; option java_multiple_files = true; @@ -22,8 +22,8 @@ option java_multiple_files = true; package android.content; message LocaleProto { - optional string language = 1; - optional string country = 2; - optional string variant = 3; + string language = 1; + string country = 2; + string variant = 3; } diff --git a/core/proto/android/os/incident_proto.proto b/core/proto/android/os/incident.proto index 1708b8135567..ec2f32b630a0 100644 --- a/core/proto/android/os/incident_proto.proto +++ b/core/proto/android/os/incident.proto @@ -14,13 +14,13 @@ * limitations under the License. */ -syntax = "proto2"; +syntax = "proto3"; -option java_package = "android.os"; option java_multiple_files = true; +option java_outer_classname = "IncidentProtoMetadata"; import "frameworks/base/libs/incident/proto/android/privacy.proto"; -import "frameworks/base/core/proto/android/service/fingerprint_proto.proto"; +import "frameworks/base/core/proto/android/service/fingerprint.proto"; package android.os; @@ -32,7 +32,7 @@ message IncidentHeaderProto { CAUSE_CRASH = 3; } - optional Cause cause = 1; + Cause cause = 1; } message IncidentProto { @@ -40,13 +40,13 @@ message IncidentProto { repeated IncidentHeaderProto header = 1; // Device information - //optional SystemProperties system_properties = 1000; + //SystemProperties system_properties = 1000; // Linux services - //optional Procrank procrank = 2000; - //optional PageTypeInfo page_type_info = 2001; - //optional KernelWakeSources kernel_wake_sources = 2002; + //Procrank procrank = 2000; + //PageTypeInfo page_type_info = 2001; + //KernelWakeSources kernel_wake_sources = 2002; // System Services - optional android.service.fingerprint.FingerprintServiceDumpProto fingerprint = 3000; + android.service.fingerprint.FingerprintServiceDumpProto fingerprint = 3000; } diff --git a/core/proto/android/service/fingerprint_proto.proto b/core/proto/android/service/fingerprint.proto index b2c500029661..79dba8615c87 100644 --- a/core/proto/android/service/fingerprint_proto.proto +++ b/core/proto/android/service/fingerprint.proto @@ -14,11 +14,12 @@ * limitations under the License. */ -syntax = "proto2"; +syntax = "proto3"; package android.service.fingerprint; option java_multiple_files = true; +option java_outer_classname = "FingerprintServiceProto"; message FingerprintServiceDumpProto { // Each log may include multiple tuples of (user_id, num_fingerprints). @@ -27,30 +28,30 @@ message FingerprintServiceDumpProto { message FingerprintUserStatsProto { // Should be 0, 10, 11, 12, etc. where 0 is the owner. - optional int32 user_id = 1; + int32 user_id = 1; // The number of fingerprints registered to this user. - optional int32 num_fingerprints = 2; + int32 num_fingerprints = 2; // Normal fingerprint authentications (e.g. lockscreen). - optional FingerprintActionStatsProto normal = 3; + FingerprintActionStatsProto normal = 3; // Crypto authentications (e.g. to unlock password storage, make secure // purchases, etc). - optional FingerprintActionStatsProto crypto = 4; + FingerprintActionStatsProto crypto = 4; } message FingerprintActionStatsProto { // Number of accepted fingerprints. - optional int32 accept = 1; + int32 accept = 1; // Number of rejected fingerprints. - optional int32 reject = 2; + int32 reject = 2; // Total number of acquisitions. Should be >= accept+reject due to poor // image acquisition in some cases (too fast, too slow, dirty sensor, etc.) - optional int32 acquire = 3; + int32 acquire = 3; // Total number of lockouts. - optional int32 lockout = 4; + int32 lockout = 4; } diff --git a/tools/incident_report/main.cpp b/tools/incident_report/main.cpp index a814847e41f7..884b8e49d08d 100644 --- a/tools/incident_report/main.cpp +++ b/tools/incident_report/main.cpp @@ -17,7 +17,7 @@ #include "generic_message.h" #include "printer.h" -#include <frameworks/base/core/proto/android/os/incident_proto.pb.h> +#include <frameworks/base/core/proto/android/os/incident.pb.h> #include <google/protobuf/wire_format.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/io/zero_copy_stream_impl.h> diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp index d0048105d9fe..15f622cf9461 100644 --- a/tools/incident_section_gen/main.cpp +++ b/tools/incident_section_gen/main.cpp @@ -15,7 +15,7 @@ */ -#include <frameworks/base/core/proto/android/os/incident_proto.pb.h> +#include <frameworks/base/core/proto/android/os/incident.pb.h> #include <map> |