Remove spurious WTF on pre-U devices.
aosp/2162425 added a WTF if a NetworkAgent changed state before its native network has been created. This was intended to apply only to the new U+ codepath, where networks are always created immediately as soon as their agents register them. But the WTF is logged on pre-U devices as well. Fix this so that the WTF is only logged when the new codepath is running. Fix: 285999421 Test: TH Change-Id: I28bda08a006978ab760fe8891bf5cf15b536201a
This commit is contained in:
@@ -4480,7 +4480,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
if (state == NetworkInfo.State.CONNECTED) return true;
|
if (state == NetworkInfo.State.CONNECTED) return true;
|
||||||
if (state != NetworkInfo.State.CONNECTING) {
|
if (state != NetworkInfo.State.CONNECTING) {
|
||||||
// TODO: throw if no WTFs are observed in the field.
|
// TODO: throw if no WTFs are observed in the field.
|
||||||
Log.wtf(TAG, "Uncreated network in invalid state: " + state);
|
if (shouldCreateNetworksImmediately()) {
|
||||||
|
Log.wtf(TAG, "Uncreated network in invalid state: " + state);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return nai.isVPN() || shouldCreateNetworksImmediately();
|
return nai.isVPN() || shouldCreateNetworksImmediately();
|
||||||
|
|||||||
Reference in New Issue
Block a user