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

Commit e49272ac authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan
Browse files

Usb: Remove unused interface methods and constants

Clean up unused interface methods and constants in
USB gadget HAL.

Bug: 287516105
Change-Id: I824c99fa23499936037b637095084ce9cd31881d
parent ba3ffc6c
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);