Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -839,6 +839,7 @@ package android.content { field public static final String CONTEXTHUB_SERVICE = "contexthub"; field public static final String EUICC_CARD_SERVICE = "euicc_card"; field public static final String HDMI_CONTROL_SERVICE = "hdmi_control"; field public static final String NETD_SERVICE = "netd"; field public static final String NETWORK_SCORE_SERVICE = "network_score"; field public static final String OEM_LOCK_SERVICE = "oem_lock"; field public static final String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"; Loading core/java/android/app/SystemServiceRegistry.java +9 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ import android.net.IConnectivityManager; import android.net.IEthernetManager; import android.net.IIpMemoryStore; import android.net.IIpSecService; import android.net.INetd; import android.net.INetworkPolicyManager; import android.net.IpMemoryStore; import android.net.IpSecManager; Loading Loading @@ -288,6 +289,14 @@ final class SystemServiceRegistry { return new ConnectivityManager(context, service); }}); registerService(Context.NETD_SERVICE, INetd.class, new StaticServiceFetcher<INetd>() { @Override public INetd createService() throws ServiceNotFoundException { return INetd.Stub.asInterface( ServiceManager.getServiceOrThrow(Context.NETD_SERVICE)); } }); registerService(Context.NETWORK_STACK_SERVICE, NetworkStack.class, new StaticServiceFetcher<NetworkStack>() { @Override Loading core/java/android/content/Context.java +10 −0 Original line number Diff line number Diff line Loading @@ -3504,6 +3504,16 @@ public abstract class Context { */ public static final String CONNECTIVITY_SERVICE = "connectivity"; /** * Use with {@link #getSystemService(String)} to retrieve a * {@link android.net.INetd} for communicating with the network stack * @hide * @see #getSystemService(String) * @hide */ @SystemApi public static final String NETD_SERVICE = "netd"; /** * Use with {@link #getSystemService(String)} to retrieve a * {@link NetworkStack} for communicating with the network stack Loading services/net/java/android/net/shared/NetdService.java +2 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net.shared; import android.content.Context; import android.net.INetd; import android.os.RemoteException; import android.os.ServiceManager; Loading @@ -28,7 +29,6 @@ import android.util.Log; */ public class NetdService { private static final String TAG = NetdService.class.getSimpleName(); private static final String NETD_SERVICE_NAME = "netd"; private static final long BASE_TIMEOUT_MS = 100; private static final long MAX_TIMEOUT_MS = 1000; Loading @@ -48,7 +48,7 @@ public class NetdService { // NOTE: ServiceManager does no caching for the netd service, // because netd is not one of the defined common services. final INetd netdInstance = INetd.Stub.asInterface( ServiceManager.getService(NETD_SERVICE_NAME)); ServiceManager.getService(Context.NETD_SERVICE)); if (netdInstance == null) { Log.w(TAG, "WARNING: returning null INetd instance."); } Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -839,6 +839,7 @@ package android.content { field public static final String CONTEXTHUB_SERVICE = "contexthub"; field public static final String EUICC_CARD_SERVICE = "euicc_card"; field public static final String HDMI_CONTROL_SERVICE = "hdmi_control"; field public static final String NETD_SERVICE = "netd"; field public static final String NETWORK_SCORE_SERVICE = "network_score"; field public static final String OEM_LOCK_SERVICE = "oem_lock"; field public static final String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"; Loading
core/java/android/app/SystemServiceRegistry.java +9 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ import android.net.IConnectivityManager; import android.net.IEthernetManager; import android.net.IIpMemoryStore; import android.net.IIpSecService; import android.net.INetd; import android.net.INetworkPolicyManager; import android.net.IpMemoryStore; import android.net.IpSecManager; Loading Loading @@ -288,6 +289,14 @@ final class SystemServiceRegistry { return new ConnectivityManager(context, service); }}); registerService(Context.NETD_SERVICE, INetd.class, new StaticServiceFetcher<INetd>() { @Override public INetd createService() throws ServiceNotFoundException { return INetd.Stub.asInterface( ServiceManager.getServiceOrThrow(Context.NETD_SERVICE)); } }); registerService(Context.NETWORK_STACK_SERVICE, NetworkStack.class, new StaticServiceFetcher<NetworkStack>() { @Override Loading
core/java/android/content/Context.java +10 −0 Original line number Diff line number Diff line Loading @@ -3504,6 +3504,16 @@ public abstract class Context { */ public static final String CONNECTIVITY_SERVICE = "connectivity"; /** * Use with {@link #getSystemService(String)} to retrieve a * {@link android.net.INetd} for communicating with the network stack * @hide * @see #getSystemService(String) * @hide */ @SystemApi public static final String NETD_SERVICE = "netd"; /** * Use with {@link #getSystemService(String)} to retrieve a * {@link NetworkStack} for communicating with the network stack Loading
services/net/java/android/net/shared/NetdService.java +2 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net.shared; import android.content.Context; import android.net.INetd; import android.os.RemoteException; import android.os.ServiceManager; Loading @@ -28,7 +29,6 @@ import android.util.Log; */ public class NetdService { private static final String TAG = NetdService.class.getSimpleName(); private static final String NETD_SERVICE_NAME = "netd"; private static final long BASE_TIMEOUT_MS = 100; private static final long MAX_TIMEOUT_MS = 1000; Loading @@ -48,7 +48,7 @@ public class NetdService { // NOTE: ServiceManager does no caching for the netd service, // because netd is not one of the defined common services. final INetd netdInstance = INetd.Stub.asInterface( ServiceManager.getService(NETD_SERVICE_NAME)); ServiceManager.getService(Context.NETD_SERVICE)); if (netdInstance == null) { Log.w(TAG, "WARNING: returning null INetd instance."); } Loading