Remove NETWORK_STACK_SERVICE constant am: 4fb0137726

Change-Id: I5bf4b96601324620bd4db2ae8f04a877627568be
This commit is contained in:
Remi NGUYEN VAN
2020-03-23 03:48:01 +00:00
committed by Automerger Merge Worker
5 changed files with 17 additions and 14 deletions

View File

@@ -1544,7 +1544,6 @@ package android.content {
field public static final String NETD_SERVICE = "netd"; field public static final String NETD_SERVICE = "netd";
field public static final String NETWORK_POLICY_SERVICE = "netpolicy"; field public static final String NETWORK_POLICY_SERVICE = "netpolicy";
field public static final String NETWORK_SCORE_SERVICE = "network_score"; field public static final String NETWORK_SCORE_SERVICE = "network_score";
field public static final String NETWORK_STACK_SERVICE = "network_stack";
field public static final String OEM_LOCK_SERVICE = "oem_lock"; field public static final String OEM_LOCK_SERVICE = "oem_lock";
field public static final String PERMISSION_SERVICE = "permission"; field public static final String PERMISSION_SERVICE = "permission";
field public static final String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"; field public static final String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block";
@@ -4671,6 +4670,7 @@ package android.net {
} }
public class NetworkStack { public class NetworkStack {
method @Nullable public static android.os.IBinder getService();
field public static final String PERMISSION_MAINLINE_NETWORK_STACK = "android.permission.MAINLINE_NETWORK_STACK"; field public static final String PERMISSION_MAINLINE_NETWORK_STACK = "android.permission.MAINLINE_NETWORK_STACK";
} }

View File

@@ -658,7 +658,6 @@ package android.content {
field public static final String BUGREPORT_SERVICE = "bugreport"; field public static final String BUGREPORT_SERVICE = "bugreport";
field public static final String CONTENT_CAPTURE_MANAGER_SERVICE = "content_capture"; field public static final String CONTENT_CAPTURE_MANAGER_SERVICE = "content_capture";
field public static final String ETHERNET_SERVICE = "ethernet"; field public static final String ETHERNET_SERVICE = "ethernet";
field public static final String NETWORK_STACK_SERVICE = "network_stack";
field public static final String PERMISSION_SERVICE = "permission"; field public static final String PERMISSION_SERVICE = "permission";
field public static final String ROLLBACK_SERVICE = "rollback"; field public static final String ROLLBACK_SERVICE = "rollback";
field public static final String STATUS_BAR_SERVICE = "statusbar"; field public static final String STATUS_BAR_SERVICE = "statusbar";
@@ -1519,6 +1518,7 @@ package android.net {
} }
public class NetworkStack { public class NetworkStack {
method @Nullable public static android.os.IBinder getService();
field public static final String PERMISSION_MAINLINE_NETWORK_STACK = "android.permission.MAINLINE_NETWORK_STACK"; field public static final String PERMISSION_MAINLINE_NETWORK_STACK = "android.permission.MAINLINE_NETWORK_STACK";
} }

View File

@@ -347,14 +347,6 @@ final class SystemServiceRegistry {
} }
}); });
registerService(Context.NETWORK_STACK_SERVICE, IBinder.class,
new StaticServiceFetcher<IBinder>() {
@Override
public IBinder createService() {
return ServiceManager.getService(Context.NETWORK_STACK_SERVICE);
}
});
registerService(Context.TETHERING_SERVICE, TetheringManager.class, registerService(Context.TETHERING_SERVICE, TetheringManager.class,
new CachedServiceFetcher<TetheringManager>() { new CachedServiceFetcher<TetheringManager>() {
@Override @Override

View File

@@ -3864,8 +3864,6 @@ public abstract class Context {
* @hide * @hide
* @see NetworkStackClient * @see NetworkStackClient
*/ */
@SystemApi
@TestApi
public static final String NETWORK_STACK_SERVICE = "network_stack"; public static final String NETWORK_STACK_SERVICE = "network_stack";
/** /**

View File

@@ -19,15 +19,17 @@ import static android.Manifest.permission.NETWORK_STACK;
import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.annotation.TestApi; import android.annotation.TestApi;
import android.content.Context; import android.content.Context;
import android.os.IBinder;
import android.os.ServiceManager;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
/** /**
* * Constants and utilities for client code communicating with the network stack service.
* Constants for client code communicating with the network stack service.
* @hide * @hide
*/ */
@SystemApi @SystemApi
@@ -43,6 +45,17 @@ public class NetworkStack {
public static final String PERMISSION_MAINLINE_NETWORK_STACK = public static final String PERMISSION_MAINLINE_NETWORK_STACK =
"android.permission.MAINLINE_NETWORK_STACK"; "android.permission.MAINLINE_NETWORK_STACK";
/**
* Get an {@link IBinder} representing the NetworkStack stable AIDL Interface, if registered.
* @hide
*/
@Nullable
@SystemApi
@TestApi
public static IBinder getService() {
return ServiceManager.getService(Context.NETWORK_STACK_SERVICE);
}
private NetworkStack() {} private NetworkStack() {}
/** /**