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

Commit d4b40969 authored by Steven Moreland's avatar Steven Moreland Committed by Android (Google) Code Review
Browse files

Merge changes from topic "hidl-system-api"

* changes:
  Add remaining missing HIDL SystemApi methods.
  HIDL: reportSyspropMethod -> enableInstrumentation
parents d55e3e75 adcb896f
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -3523,12 +3523,17 @@ package android.os {
  public class HidlSupport {
  public class HidlSupport {
    method public static boolean deepEquals(java.lang.Object, java.lang.Object);
    method public static boolean deepEquals(java.lang.Object, java.lang.Object);
    method public static int deepHashCode(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);
    method public static boolean interfacesEqual(android.os.IHwInterface, java.lang.Object);
  }
  }


  public abstract class HwBinder implements android.os.IHwBinder {
  public abstract class HwBinder implements android.os.IHwBinder {
    method public static final void configureRpcThreadpool(long, boolean);
    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 static final void joinRpcThreadpool();
    method public final void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
  }
  }


  public class HwBlob {
  public class HwBlob {
@@ -3628,6 +3633,8 @@ package android.os {


  public abstract interface IHwBinder {
  public abstract interface IHwBinder {
    method public abstract boolean linkToDeath(android.os.IHwBinder.DeathRecipient, long);
    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);
    method public abstract boolean unlinkToDeath(android.os.IHwBinder.DeathRecipient);
  }
  }


+2 −1
Original line number Original line 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
     * @hide
     */
     */
    @SystemApi
    public static native int getPidIfSharable();
    public static native int getPidIfSharable();


    /** @hide */
    /** @hide */
+30 −2
Original line number Original line Diff line number Diff line
@@ -53,14 +53,30 @@ public abstract class HwBinder implements IHwBinder {
    public native final void registerService(String serviceName)
    public native final void registerService(String serviceName)
        throws RemoteException;
        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(
    public static final IHwBinder getService(
            String iface,
            String iface,
            String serviceName)
            String serviceName)
        throws RemoteException, NoSuchElementException {
        throws RemoteException, NoSuchElementException {
        return getService(iface, serviceName, false /* retry */);
        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(
    public static native final IHwBinder getService(
            String iface,
            String iface,
            String serviceName,
            String serviceName,
@@ -107,8 +123,20 @@ public abstract class HwBinder implements IHwBinder {


    private static native void native_report_sysprop_change();
    private static native void native_report_sysprop_change();


    /**
     * Enable instrumentation if available.
     * @hide
     */
    @SystemApi
    public static void enableInstrumentation() {
        native_report_sysprop_change();
    }

    /**
    /**
     * Notifies listeners that a system property has changed
     * Notifies listeners that a system property has changed
     *
     * TODO(b/72480743): remove this method
     *
     * @hide
     * @hide
     */
     */
    public static void reportSyspropChanged() {
    public static void reportSyspropChanged() {
+12 −2
Original line number Original line Diff line number Diff line
@@ -27,12 +27,22 @@ public interface IHwBinder {
    /** @hide */
    /** @hide */
    public static final int FLAG_ONEWAY = 1;
    public static final int FLAG_ONEWAY = 1;


    /** @hide */
    /**
     * Process a hwbinder transaction.
     *
     * @hide
     */
    @SystemApi
    public void transact(
    public void transact(
            int code, HwParcel request, HwParcel reply, int flags)
            int code, HwParcel request, HwParcel reply, int flags)
        throws RemoteException;
        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);
    public IHwInterface queryLocalInterface(String descriptor);


    /**
    /**