Add flag to test BpfNetMaps refactoring
Following CLs will switch previous codepath (JNI) and new codepath (Java) for bpf map operations based on this flag. Bug: 217624062 Test: atest BpfNetMapsTest Change-Id: I74f10d5c97390993acea110f6528ef8980bb2aa4
This commit is contained in:
@@ -1399,8 +1399,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
* @param netd
|
||||
* @return BpfNetMaps implementation.
|
||||
*/
|
||||
public BpfNetMaps getBpfNetMaps(INetd netd) {
|
||||
return new BpfNetMaps(netd);
|
||||
public BpfNetMaps getBpfNetMaps(Context context, INetd netd) {
|
||||
return new BpfNetMaps(context, netd);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1529,7 +1529,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
mProxyTracker = mDeps.makeProxyTracker(mContext, mHandler);
|
||||
|
||||
mNetd = netd;
|
||||
mBpfNetMaps = mDeps.getBpfNetMaps(netd);
|
||||
mBpfNetMaps = mDeps.getBpfNetMaps(mContext, netd);
|
||||
mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
|
||||
mLocationPermissionChecker = mDeps.makeLocationPermissionChecker(mContext);
|
||||
|
||||
Reference in New Issue
Block a user