summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTej Singh <singhtejinder@google.com>2021-03-16 00:54:35 -0700
committerTej Singh <singhtejinder@google.com>2021-03-18 21:04:48 -0700
commit91bceaae7add13674282578257f4a1502100b35d (patch)
tree9889b28a3a263c750d1f94fbb9ce584f82127e41 /core
parent185bb9013481106d1763fac5255fe890b861cf11 (diff)
Move service/enums.proto to proto_logging
Add usb contaminent status to service/enums.proto. It was previously in usb.proto, but is an enum. Enums.proto is a better fit because other enums in usb.proto are located in enums.proto, and the enum is also used by atoms.proto. Additionally, move the enums.proto file to proto_logging, since all atoms.proto dependencies should be in proto_logging. Test: m Bug: 182392879 Change-Id: I9ea0a1482336694c446e950ea5cb46b95372b76d Merged-In: I9ea0a1482336694c446e950ea5cb46b95372b76d
Diffstat (limited to 'core')
-rw-r--r--core/proto/android/service/enums.proto40
-rw-r--r--core/proto/android/service/usb.proto13
2 files changed, 2 insertions, 51 deletions
diff --git a/core/proto/android/service/enums.proto b/core/proto/android/service/enums.proto
deleted file mode 100644
index b64e685104b7..000000000000
--- a/core/proto/android/service/enums.proto
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto2";
-package android.service;
-
-option java_outer_classname = "ServiceProtoEnums";
-option java_multiple_files = true;
-
-enum UsbEndPointType {
- USB_ENDPOINT_TYPE_XFER_CONTROL = 0;
- USB_ENDPOINT_TYPE_XFER_ISOC = 1;
- USB_ENDPOINT_TYPE_XFER_BULK = 2;
- USB_ENDPOINT_TYPE_XFER_INT = 3;
-}
-
-enum UsbEndPointDirection {
- USB_ENDPOINT_DIR_OUT = 0;
- USB_ENDPOINT_DIR_IN = 0x80;
-}
-
-enum UsbConnectionRecordMode {
- USB_CONNECTION_RECORD_MODE_CONNECT = 0;
- USB_CONNECTION_RECORD_MODE_CONNECT_BADPARSE = 1;
- USB_CONNECTION_RECORD_MODE_CONNECT_BADDEVICE = 2;
- USB_CONNECTION_RECORD_MODE_DISCONNECT = -1;
-} \ No newline at end of file
diff --git a/core/proto/android/service/usb.proto b/core/proto/android/service/usb.proto
index 40c5a85e1f24..dd313aa81726 100644
--- a/core/proto/android/service/usb.proto
+++ b/core/proto/android/service/usb.proto
@@ -21,8 +21,8 @@ option java_multiple_files = true;
option java_outer_classname = "UsbServiceProto";
import "frameworks/base/core/proto/android/content/component_name.proto";
-import "frameworks/base/core/proto/android/service/enums.proto";
import "frameworks/base/core/proto/android/privacy.proto";
+import "frameworks/proto_logging/stats/enums/service/enums.proto";
message UsbServiceDumpProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -229,15 +229,6 @@ message UsbPortProto {
repeated Mode supported_modes = 2;
}
-/* Same as android.hardware.usb.V1_2.Constants.ContaminantPresenceStatus */
-enum ContaminantPresenceStatus {
- CONTAMINANT_STATUS_UNKNOWN = 0;
- CONTAMINANT_STATUS_NOT_SUPPORTED = 1;
- CONTAMINANT_STATUS_DISABLED = 2;
- CONTAMINANT_STATUS_NOT_DETECTED = 3;
- CONTAMINANT_STATUS_DETECTED = 4;
-}
-
message UsbPortStatusProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -260,7 +251,7 @@ message UsbPortStatusProto {
optional PowerRole power_role = 3;
optional DataRole data_role = 4;
repeated UsbPortStatusRoleCombinationProto role_combinations = 5;
- optional ContaminantPresenceStatus contaminant_presence_status = 6;
+ optional android.service.ContaminantPresenceStatus contaminant_presence_status = 6;
}
message UsbPortStatusRoleCombinationProto {