Remove ServiceManager usage from IpSecTransform
Remove ServiceManager hidden API dependency because this class is going to be moved into mainline module. Thus have IpSecTransform calls createTransform and deleteTransform through IpSecManager to remove the ServiceManager usage. Bug: 204153604 Test: FrameworksNetTests Change-Id: Iba48da4aecac1080684d5a7e7e7ca2e31219591a
This commit is contained in:
@@ -27,6 +27,7 @@ import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.annotations.PolicyDirection;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceSpecificException;
|
||||
@@ -980,6 +981,29 @@ public final class IpSecManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public IpSecTransformResponse createTransform(IpSecConfig config, IBinder binder,
|
||||
String callingPackage) {
|
||||
try {
|
||||
return mService.createTransform(config, binder, callingPackage);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public void deleteTransform(int resourceId) {
|
||||
try {
|
||||
mService.deleteTransform(resourceId);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance of IpSecManager within an application context.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user