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
Merged-In: I0cb82384932ab1758fa7576b2125825c48a4a6c9
(cherry picked from commit adcb896fd6)
This commit is contained in:
Steven Moreland
2018-01-25 10:24:07 -08:00
committed by Colin Cross
parent 9312938842
commit ff0a3642e4
4 changed files with 40 additions and 5 deletions

View File

@@ -3164,12 +3164,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 {
@@ -3269,6 +3274,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);
} }

View File

@@ -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 */

View File

@@ -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,
@@ -111,6 +127,7 @@ public abstract class HwBinder implements IHwBinder {
* Enable instrumentation if available. * Enable instrumentation if available.
* @hide * @hide
*/ */
@SystemApi
public static void enableInstrumentation() { public static void enableInstrumentation() {
native_report_sysprop_change(); native_report_sysprop_change();
} }

View File

@@ -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);
/** /**