Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd1ec4f7 authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan Committed by Android (Google) Code Review
Browse files

Merge changes from topic "211677613"

* changes:
  Add Vts test for enableUsbDataWhileDocked interface
  Add fields to infer UsbPortStatus and allow enabling usb while docked
parents 395e94b7 f8832359
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ package android.hardware.usb;
interface IUsb {
  oneway void enableContaminantPresenceDetection(in String portName, in boolean enable, long transactionId);
  oneway void enableUsbData(in String portName, boolean enable, long transactionId);
  oneway void enableUsbDataWhileDocked(in String portName, long transactionId);
  oneway void queryPortStatus(long transactionId);
  oneway void setCallback(in android.hardware.usb.IUsbCallback callback);
  oneway void switchRole(in String portName, in android.hardware.usb.PortRole role, long transactionId);
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ interface IUsbCallback {
  oneway void notifyPortStatusChange(in android.hardware.usb.PortStatus[] currentPortStatus, in android.hardware.usb.Status retval);
  oneway void notifyRoleSwitchStatus(in String portName, in android.hardware.usb.PortRole newRole, in android.hardware.usb.Status retval, long transactionId);
  oneway void notifyEnableUsbDataStatus(in String portName, boolean enable, in android.hardware.usb.Status retval, long transactionId);
  oneway void notifyEnableUsbDataWhileDockedStatus(in String portName, in android.hardware.usb.Status retval, long transactionId);
  oneway void notifyContaminantEnabledStatus(in String portName, boolean enable, in android.hardware.usb.Status retval, long transactionId);
  oneway void notifyQueryPortStatus(in String portName, in android.hardware.usb.Status retval, long transactionId);
  oneway void notifyLimitPowerTransferStatus(in String portName, boolean limit, in android.hardware.usb.Status retval, long transactionId);
+2 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ parcelable PortStatus {
  android.hardware.usb.ContaminantProtectionStatus contaminantProtectionStatus = android.hardware.usb.ContaminantProtectionStatus.NONE;
  boolean supportsEnableContaminantPresenceDetection;
  android.hardware.usb.ContaminantDetectionStatus contaminantDetectionStatus = android.hardware.usb.ContaminantDetectionStatus.NOT_SUPPORTED;
  boolean usbDataEnabled;
  android.hardware.usb.UsbDataStatus[] usbDataStatus;
  boolean powerTransferLimited;
  android.hardware.usb.PowerBrickStatus powerBrickStatus;
}
+40 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.usb;
@VintfStability
enum PowerBrickStatus {
  UNKNOWN = 0,
  CONNECTED = 1,
  NOT_CONNECTED = 2,
}
+44 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.usb;
@VintfStability
enum UsbDataStatus {
  UNKNOWN = 0,
  ENABLED = 1,
  DISABLED_OVERHEAT = 2,
  DISABLED_CONTAMINANT = 3,
  DISABLED_DOCK = 4,
  DISABLED_FORCE = 5,
  DISABLED_DEBUG = 6,
}
Loading