Split out the ipsec API surface and use framework-connectivity-tiramisu

(cherry picked from commit 1dad7aa006492035293e68080aeaf606df02618a)
Bug: 204153604
Test: TH
Change-Id: I6cc8aef6a0ab9ce4bcef2797196b1d1b3687acca
Merged-In: I6cc8aef6a0ab9ce4bcef2797196b1d1b3687acca
This commit is contained in:
Aaron Huang
2022-01-12 15:11:01 +08:00
committed by Lorenzo Colitti
parent 9ae3337516
commit b944ff1540
4 changed files with 12 additions and 30 deletions

View File

@@ -1008,16 +1008,10 @@ public class IpSecService extends IIpSecService.Stub {
*
* @param context Binder context for this service
*/
private IpSecService(Context context) {
public IpSecService(Context context) {
this(context, new Dependencies());
}
static IpSecService create(Context context)
throws InterruptedException {
final IpSecService service = new IpSecService(context);
return service;
}
@NonNull
private AppOpsManager getAppOpsManager() {
AppOpsManager appOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
@@ -1054,26 +1048,6 @@ public class IpSecService extends IIpSecService.Stub {
}
}
/** Called by system server when system is ready. */
public void systemReady() {
if (isNetdAlive()) {
Log.d(TAG, "IpSecService is ready");
} else {
Log.wtf(TAG, "IpSecService not ready: failed to connect to NetD Native Service!");
}
}
synchronized boolean isNetdAlive() {
try {
if (mNetd == null) {
return false;
}
return mNetd.isAlive();
} catch (RemoteException re) {
return false;
}
}
/**
* Checks that the provided InetAddress is valid for use in an IPsec SA. The address must not be
* a wildcard address and must be in a numeric form such as 1.2.3.4 or 2001::1.
@@ -1896,7 +1870,6 @@ public class IpSecService extends IIpSecService.Stub {
mContext.enforceCallingOrSelfPermission(DUMP, TAG);
pw.println("IpSecService dump:");
pw.println("NetdNativeService Connection: " + (isNetdAlive() ? "alive" : "dead"));
pw.println();
pw.println("mUserResourceTracker:");