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

Commit adcb896f authored by Steven Moreland's avatar Steven Moreland
Browse files

Add remaining missing HIDL SystemApi methods.

A couple methods of Java classes which became SystemApis
but were used are still @hide.

Bug: 72480743
Test: hidl_test_java
Change-Id: I0cb82384932ab1758fa7576b2125825c48a4a6c9
parent 36be191d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3520,12 +3520,17 @@ package android.os {
  public class HidlSupport {
    method public static boolean deepEquals(java.lang.Object, java.lang.Object);
    method public static int deepHashCode(java.lang.Object);
    method public static int getPidIfSharable();
    method public static boolean interfacesEqual(android.os.IHwInterface, java.lang.Object);
  }

  public abstract class HwBinder implements android.os.IHwBinder {
    method public static final void configureRpcThreadpool(long, boolean);
    method public static void enableInstrumentation();
    method public static final android.os.IHwBinder getService(java.lang.String, java.lang.String) throws java.util.NoSuchElementException, android.os.RemoteException;
    method public static final android.os.IHwBinder getService(java.lang.String, java.lang.String, boolean) throws java.util.NoSuchElementException, android.os.RemoteException;
    method public static final void joinRpcThreadpool();
    method public final void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
  }

  public class HwBlob {
@@ -3625,6 +3630,8 @@ package android.os {

  public abstract interface IHwBinder {
    method public abstract boolean linkToDeath(android.os.IHwBinder.DeathRecipient, long);
    method public abstract android.os.IHwInterface queryLocalInterface(java.lang.String);
    method public abstract void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
    method public abstract boolean unlinkToDeath(android.os.IHwBinder.DeathRecipient);
  }

+2 −1
Original line number Diff line number Diff line
@@ -212,9 +212,10 @@ public class HidlSupport {
    }

    /**
     * Return PID of process if sharable to clients.
     * Return PID of process only if on a non-user build. For debugging purposes.
     * @hide
     */
    @SystemApi
    public static native int getPidIfSharable();

    /** @hide */
+19 −2
Original line number Diff line number Diff line
@@ -53,14 +53,30 @@ public abstract class HwBinder implements IHwBinder {
    public native final void registerService(String serviceName)
        throws RemoteException;

    /** @hide */
    /**
     * Returns the specified service from the hwservicemanager. Does not retry.
     *
     * @param iface fully-qualified interface name for example foo.bar@1.3::IBaz
     * @param serviceName the instance name of the service for example default.
     * @throws NoSuchElementException when the service is unavailable
     * @hide
     */
    @SystemApi
    public static final IHwBinder getService(
            String iface,
            String serviceName)
        throws RemoteException, NoSuchElementException {
        return getService(iface, serviceName, false /* retry */);
    }
    /** @hide */
    /**
     * Returns the specified service from the hwservicemanager.
     * @param iface fully-qualified interface name for example foo.bar@1.3::IBaz
     * @param serviceName the instance name of the service for example default.
     * @param retry whether to wait for the service to start if it's not already started
     * @throws NoSuchElementException when the service is unavailable
     * @hide
     */
    @SystemApi
    public static native final IHwBinder getService(
            String iface,
            String serviceName,
@@ -111,6 +127,7 @@ public abstract class HwBinder implements IHwBinder {
     * Enable instrumentation if available.
     * @hide
     */
    @SystemApi
    public static void enableInstrumentation() {
        native_report_sysprop_change();
    }
+12 −2
Original line number Diff line number Diff line
@@ -27,12 +27,22 @@ public interface IHwBinder {
    /** @hide */
    public static final int FLAG_ONEWAY = 1;

    /** @hide */
    /**
     * Process a hwbinder transaction.
     *
     * @hide
     */
    @SystemApi
    public void transact(
            int code, HwParcel request, HwParcel reply, int flags)
        throws RemoteException;

    /** @hide */
    /**
     * Return as IHwInterface instance only if this implements descriptor.
     * @param descriptor for example foo.bar@1.0::IBaz
     * @hide
     */
    @SystemApi
    public IHwInterface queryLocalInterface(String descriptor);

    /**