Move #nativeWaitForService into CommonConnectivityJni
AServiceManager_waitForService sytem APIs currently only callable via dlsym(): b/376759605. When built with sdk_version current, the NDK stubs for "sdk" variants only include NDK APIs, excluding #systemapi APIs. Flag: EXEMPT Mechanical refactors Test: atest ServiceManagerWrapperIntegrationTest Change-Id: I48f690d771c7905e79e463617ded772f753cc854
This commit is contained in:
parent
eb7d854d5f
commit
f250ade6fa
1 changed files with 53 additions and 115 deletions
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
package com.android.net.module.util;
|
||||
|
||||
import android.annotation.RequiresApi;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.system.ErrnoException;
|
||||
|
||||
/**
|
||||
|
|
@ -48,4 +51,15 @@ public class CommonConnectivityJni {
|
|||
* @throws ErrnoException if setting expiration time is failed.
|
||||
*/
|
||||
public static native void setTimerFdTime(int fd, long timeMs) throws ErrnoException;
|
||||
|
||||
/**
|
||||
* Returns the specified service from the service manager.
|
||||
*
|
||||
* If the service is not running, service manager will attempt to start it, and this function
|
||||
* will wait for it to be ready.
|
||||
*
|
||||
* @return {@code null} only if there are permission problems or fatal errors
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.S)
|
||||
public static native IBinder waitForService(String serviceName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue