Park RemoteAuth Manager and Service

Limit the amount of parked code built into Connectivity module

Test: built successfully.
Bug: 300522527
Change-Id: I87d7516011c469aa89fc7e67cf03c4ee8aa1bb9b
This commit is contained in:
Igor Zaslavsky
2023-09-21 09:26:31 +00:00
parent 487191dbe6
commit e336586353
4 changed files with 3 additions and 28 deletions

View File

@@ -28,7 +28,6 @@ import com.android.server.connectivity.ConnectivityNativeService;
import com.android.server.ethernet.EthernetService;
import com.android.server.ethernet.EthernetServiceImpl;
import com.android.server.nearby.NearbyService;
import com.android.server.remoteauth.RemoteAuthService;
import com.android.server.thread.ThreadNetworkService;
/**
@@ -43,7 +42,6 @@ public final class ConnectivityServiceInitializer extends SystemService {
private final NsdService mNsdService;
private final NearbyService mNearbyService;
private final EthernetServiceImpl mEthernetServiceImpl;
private final RemoteAuthService mRemoteAuthService;
private final ThreadNetworkService mThreadNetworkService;
public ConnectivityServiceInitializer(Context context) {
@@ -56,7 +54,6 @@ public final class ConnectivityServiceInitializer extends SystemService {
mConnectivityNative = createConnectivityNativeService(context);
mNsdService = createNsdService(context);
mNearbyService = createNearbyService(context);
mRemoteAuthService = createRemoteAuthService(context);
mThreadNetworkService = createThreadNetworkService(context);
}
@@ -94,12 +91,6 @@ public final class ConnectivityServiceInitializer extends SystemService {
/* allowIsolated= */ false);
}
if (mRemoteAuthService != null) {
Log.i(TAG, "Registering " + RemoteAuthService.SERVICE_NAME);
publishBinderService(RemoteAuthService.SERVICE_NAME, mRemoteAuthService,
/* allowIsolated= */ false);
}
if (mThreadNetworkService != null) {
Log.i(TAG, "Registering " + ThreadNetworkManager.SERVICE_NAME);
publishBinderService(ThreadNetworkManager.SERVICE_NAME, mThreadNetworkService,
@@ -164,19 +155,6 @@ public final class ConnectivityServiceInitializer extends SystemService {
}
}
/** Return RemoteAuth service instance */
private RemoteAuthService createRemoteAuthService(final Context context) {
if (!SdkLevel.isAtLeastV()) return null;
try {
return new RemoteAuthService(context);
} catch (UnsupportedOperationException e) {
// RemoteAuth is not yet supported in all branches
// TODO: remove catch clause when it is available.
Log.i(TAG, "Skipping unsupported service " + RemoteAuthService.SERVICE_NAME);
return null;
}
}
/**
* Return EthernetServiceImpl instance or null if current SDK is lower than T or Ethernet
* service isn't necessary.