summaryrefslogtreecommitdiff
path: root/services/usb
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 /services/usb
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 'services/usb')
-rw-r--r--services/usb/java/com/android/server/usb/UsbPortManager.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbPortManager.java b/services/usb/java/com/android/server/usb/UsbPortManager.java
index ec7d4bd0d8c0..647a2a2ec53d 100644
--- a/services/usb/java/com/android/server/usb/UsbPortManager.java
+++ b/services/usb/java/com/android/server/usb/UsbPortManager.java
@@ -60,9 +60,9 @@ import android.os.Parcelable;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
+import android.service.ServiceProtoEnums;
import android.service.usb.UsbPortInfoProto;
import android.service.usb.UsbPortManagerProto;
-import android.service.usb.UsbServiceProto;
import android.util.ArrayMap;
import android.util.Log;
import android.util.Slog;
@@ -992,15 +992,15 @@ public class UsbPortManager {
private static int convertContaminantDetectionStatusToProto(int contaminantDetectionStatus) {
switch (contaminantDetectionStatus) {
case UsbPortStatus.CONTAMINANT_DETECTION_NOT_SUPPORTED:
- return UsbServiceProto.CONTAMINANT_STATUS_NOT_SUPPORTED;
+ return ServiceProtoEnums.CONTAMINANT_STATUS_NOT_SUPPORTED;
case UsbPortStatus.CONTAMINANT_DETECTION_DISABLED:
- return UsbServiceProto.CONTAMINANT_STATUS_DISABLED;
+ return ServiceProtoEnums.CONTAMINANT_STATUS_DISABLED;
case UsbPortStatus.CONTAMINANT_DETECTION_NOT_DETECTED:
- return UsbServiceProto.CONTAMINANT_STATUS_NOT_DETECTED;
+ return ServiceProtoEnums.CONTAMINANT_STATUS_NOT_DETECTED;
case UsbPortStatus.CONTAMINANT_DETECTION_DETECTED:
- return UsbServiceProto.CONTAMINANT_STATUS_DETECTED;
+ return ServiceProtoEnums.CONTAMINANT_STATUS_DETECTED;
default:
- return UsbServiceProto.CONTAMINANT_STATUS_UNKNOWN;
+ return ServiceProtoEnums.CONTAMINANT_STATUS_UNKNOWN;
}
}