Merge "Only apply the early network agent creation on B" into main
This commit is contained in:
commit
4e2efc94f5
2 changed files with 10 additions and 3 deletions
|
|
@ -1938,8 +1938,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||
mUseDeclaredMethodsForCallbacksEnabled =
|
||||
mDeps.isFeatureNotChickenedOut(context,
|
||||
ConnectivityFlags.USE_DECLARED_METHODS_FOR_CALLBACKS);
|
||||
mQueueNetworkAgentEventsInSystemServer =
|
||||
mDeps.isFeatureNotChickenedOut(context,
|
||||
mQueueNetworkAgentEventsInSystemServer = mDeps.isAtLeastB()
|
||||
&& mDeps.isFeatureNotChickenedOut(context,
|
||||
ConnectivityFlags.QUEUE_NETWORK_AGENT_EVENTS_IN_SYSTEM_SERVER);
|
||||
// registerUidFrozenStateChangedCallback is only available on U+
|
||||
mQueueCallbacksForFrozenApps = mDeps.isAtLeastU()
|
||||
|
|
|
|||
|
|
@ -2241,7 +2241,8 @@ public class ConnectivityServiceTest {
|
|||
private static final int VERSION_T = 3;
|
||||
private static final int VERSION_U = 4;
|
||||
private static final int VERSION_V = 5;
|
||||
private static final int VERSION_MAX = VERSION_V;
|
||||
private static final int VERSION_B = 6;
|
||||
private static final int VERSION_MAX = VERSION_B;
|
||||
private int mSdkLevel = VERSION_UNMOCKED;
|
||||
|
||||
private void setBuildSdk(final int sdkLevel) {
|
||||
|
|
@ -2270,6 +2271,12 @@ public class ConnectivityServiceTest {
|
|||
: mSdkLevel >= VERSION_U;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAtLeastB() {
|
||||
return mSdkLevel == VERSION_UNMOCKED ? super.isAtLeastB()
|
||||
: mSdkLevel >= VERSION_B;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BpfNetMaps getBpfNetMaps(Context context, INetd netd,
|
||||
InterfaceTracker interfaceTracker) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue