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

Commit 3e77c6f3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I824c99fa,I1ce03549

* changes:
  Usb: Remove unused interface methods and constants
  Usb: Fix incorrect mapping of port mode constants
parents 085797df e49272ac
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -66,10 +66,6 @@ public final class UsbGadgetAidl implements UsbGadgetHal {
        return GADGET_HAL_V2_0;
    }

    @Override
    public void systemReady() {
    }

    public void serviceDied() {
        logAndPrint(Log.ERROR, mPw, "Usb Gadget AIDL hal service died");
        synchronized (mGadgetProxyLock) {
+0 −63
Original line number Diff line number Diff line
@@ -28,69 +28,6 @@ import java.lang.String;
 * @hide
 */
public interface UsbGadgetHal {
    /**
     * Power role: This USB port can act as a source (provide power).
     * @hide
     */
    public static final int HAL_POWER_ROLE_SOURCE = 1;

    /**
     * Power role: This USB port can act as a sink (receive power).
     * @hide
     */
    public static final int HAL_POWER_ROLE_SINK = 2;

    @IntDef(prefix = { "HAL_POWER_ROLE_" }, value = {
            HAL_POWER_ROLE_SOURCE,
            HAL_POWER_ROLE_SINK
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface HalUsbPowerRole{}

    /**
     * Data role: This USB port can act as a host (access data services).
     * @hide
     */
    public static final int HAL_DATA_ROLE_HOST = 1;

    /**
     * Data role: This USB port can act as a device (offer data services).
     * @hide
     */
    public static final int HAL_DATA_ROLE_DEVICE = 2;

    @IntDef(prefix = { "HAL_DATA_ROLE_" }, value = {
            HAL_DATA_ROLE_HOST,
            HAL_DATA_ROLE_DEVICE
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface HalUsbDataRole{}

    /**
     * This USB port can act as a downstream facing port (host).
     *
     * @hide
     */
    public static final int HAL_MODE_DFP = 1;

    /**
     * This USB port can act as an upstream facing port (device).
     *
     * @hide
     */
    public static final int HAL_MODE_UFP = 2;
    @IntDef(prefix = { "HAL_MODE_" }, value = {
            HAL_MODE_DFP,
            HAL_MODE_UFP,
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface HalUsbPortMode{}

    /**
     * UsbPortManager would call this when the system is done booting.
     */
    public void systemReady();

    /**
     * This function is used to query the USB functions included in the
     * current USB configuration.
+0 −4
Original line number Diff line number Diff line
@@ -123,10 +123,6 @@ public final class UsbGadgetHidl implements UsbGadgetHal {
        }
    }

    @Override
    public void systemReady() {
    }

    static boolean isServicePresent(IndentingPrintWriter pw) {
        try {
            IUsbGadget.getService(true);
+3 −3
Original line number Diff line number Diff line
@@ -70,17 +70,17 @@ public interface UsbPortHal {
     *
     * @hide
     */
    public static final int HAL_MODE_DFP = 1;
    public static final int HAL_MODE_UFP = 1;

    /**
     * This USB port can act as an upstream facing port (device).
     *
     * @hide
     */
    public static final int HAL_MODE_UFP = 2;
    public static final int HAL_MODE_DFP = 2;
    @IntDef(prefix = { "HAL_MODE_" }, value = {
            HAL_MODE_DFP,
            HAL_MODE_UFP,
            HAL_MODE_DFP,
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface HalUsbPortMode{}