Merge "Split out the ethernet API surface and use framework-connectivity-t"
This commit is contained in:
@@ -34,8 +34,9 @@ public final class ConnectivityFrameworkInitializerTiramisu {
|
||||
private ConnectivityFrameworkInitializerTiramisu() {}
|
||||
|
||||
/**
|
||||
* Called by {@link SystemServiceRegistry}'s static initializer and registers nsd services to
|
||||
* {@link Context}, so that {@link Context#getSystemService} can return them.
|
||||
* Called by {@link SystemServiceRegistry}'s static initializer and registers NetworkStats, nsd,
|
||||
* ipsec and ethernet services to {@link Context}, so that {@link Context#getSystemService} can
|
||||
* return them.
|
||||
*
|
||||
* @throws IllegalStateException if this is called anywhere besides
|
||||
* {@link SystemServiceRegistry}.
|
||||
@@ -68,5 +69,14 @@ public final class ConnectivityFrameworkInitializerTiramisu {
|
||||
return new NetworkStatsManager(context, service);
|
||||
}
|
||||
);
|
||||
|
||||
SystemServiceRegistry.registerContextAwareService(
|
||||
Context.ETHERNET_SERVICE,
|
||||
EthernetManager.class,
|
||||
(context, serviceBinder) -> {
|
||||
IEthernetManager service = IEthernetManager.Stub.asInterface(serviceBinder);
|
||||
return new EthernetManager(context, service);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import android.os.Build;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.android.internal.annotations.GuardedBy;
|
||||
import com.android.internal.os.BackgroundThread;
|
||||
import com.android.modules.utils.BackgroundThread;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
Reference in New Issue
Block a user