/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | NetworkInfoTest.kt | 92 val networkInfo = NetworkInfo(TYPE_MOBILE, TelephonyManager.NETWORK_TYPE_LTE, in testConstructor() constant 95 assertEquals(TYPE_MOBILE, networkInfo.type) in testConstructor() 96 assertEquals(TelephonyManager.NETWORK_TYPE_LTE, networkInfo.subtype) in testConstructor() 97 assertEquals(MOBILE_TYPE_NAME, networkInfo.typeName) in testConstructor() 98 assertEquals(LTE_SUBTYPE_NAME, networkInfo.subtypeName) in testConstructor() 99 assertEquals(DetailedState.IDLE, networkInfo.detailedState) in testConstructor() 100 assertEquals(State.UNKNOWN, networkInfo.state) in testConstructor() 101 assertNull(networkInfo.reason) in testConstructor() 102 assertNull(networkInfo.extraInfo) in testConstructor() 121 val networkInfo = NetworkInfo(TYPE_MOBILE, TelephonyManager.NETWORK_TYPE_LTE, in testSetDetailedState() constant [all …]
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | NetworkState.java | 38 public final NetworkInfo networkInfo; field in NetworkState 47 networkInfo = null; in NetworkState() 63 public NetworkState(@NonNull NetworkInfo networkInfo, @NonNull LinkProperties linkProperties, in NetworkState() argument 66 this(networkInfo.getType(), networkInfo, linkProperties, in NetworkState() 70 public NetworkState(int legacyNetworkType, @NonNull NetworkInfo networkInfo, in NetworkState() argument 74 this.networkInfo = networkInfo; in NetworkState() 83 if (VALIDATE_ROAMING_STATE && networkInfo != null && networkCapabilities != null) { in NetworkState() 84 if (networkInfo.isRoaming() == networkCapabilities in NetworkState() 86 Log.wtf("NetworkState", "Roaming state disagreement between " + networkInfo in NetworkState() 94 networkInfo = in.readParcelable(null); in NetworkState() [all …]
|
D | NetworkAgent.java | 1125 public final void sendNetworkInfo(NetworkInfo networkInfo) { in sendNetworkInfo() argument 1126 queueOrSendNetworkInfo(networkInfo); in sendNetworkInfo() 1129 private void queueOrSendNetworkInfo(NetworkInfo networkInfo) { in queueOrSendNetworkInfo() argument 1130 final NetworkInfo ni = new NetworkInfo(networkInfo); in queueOrSendNetworkInfo()
|
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app2/src/com/android/cts/netpolicy/hostside/app2/ |
D | Common.java | 94 NetworkInfo networkInfo) { in createNetworkCheckResult() argument 98 checkResult.networkInfo = networkInfo; in createNetworkCheckResult() 209 final NetworkInfo networkInfo = cm.getActiveNetworkInfo(); in checkNetworkStatus() local 212 + "\n\tactiveNetworkInfo: " + networkInfo + "\n\tURL: " + address); in checkNetworkStatus() 230 networkInfo); in checkNetworkStatus()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivityservice/ |
D | CSActiveNetworkInfoTest.kt | 62 val networkInfo = cm.activeNetworkInfo in nc() constant 63 assertNotNull(networkInfo) in nc() 65 assertEquals(BLOCKED, networkInfo.detailedState) in nc() 67 assertEquals(CONNECTED, networkInfo.detailedState) in nc()
|
/packages/apps/StorageManager/src/com/android/storagemanager/automatic/ |
D | JobPreconditions.java | 31 NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network); in isWifiConnected() local 32 if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI in isWifiConnected() 33 && networkInfo.isConnected()) { in isWifiConnected()
|
/packages/modules/Connectivity/tests/cts/net/util/java/android/net/cts/util/ |
D | CtsNetUtils.java | 622 NetworkInfo networkInfo = null; in onReceive() local 628 networkInfo = intent.getExtras() in onReceive() 631 networkInfo); in onReceive() 636 networkInfo = this.mCm.getNetworkInfo(network); in onReceive() 637 if (networkInfo == null) { in onReceive() 649 assertNotNull("ConnectivityActionReceiver didn't find NetworkInfo", networkInfo); in onReceive() 650 int networkType = networkInfo.getType(); in onReceive() 651 State networkState = networkInfo.getState(); in onReceive() 653 if (networkType == mNetworkType && networkInfo.getState() == mNetState) { in onReceive()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/p2p/ |
D | WifiP2pSettingsTest.java | 200 final NetworkInfo networkInfo = mock(NetworkInfo.class); in lastGroupForm_whenGroupFormInWifiP2pInfoIsFalse_beSetAsFalse() local 201 doReturn(true).when(networkInfo).isConnected(); in lastGroupForm_whenGroupFormInWifiP2pInfoIsFalse_beSetAsFalse() 206 bundle.putParcelable(WifiP2pManager.EXTRA_NETWORK_INFO, networkInfo); in lastGroupForm_whenGroupFormInWifiP2pInfoIsFalse_beSetAsFalse() 217 final NetworkInfo networkInfo = mock(NetworkInfo.class); in lastGroupForm_whenGroupFormInWifiP2pInfoIsTrue_beSetAsTrue() local 218 doReturn(true).when(networkInfo).isConnected(); in lastGroupForm_whenGroupFormInWifiP2pInfoIsTrue_beSetAsTrue() 223 bundle.putParcelable(WifiP2pManager.EXTRA_NETWORK_INFO, networkInfo); in lastGroupForm_whenGroupFormInWifiP2pInfoIsTrue_beSetAsTrue() 288 final NetworkInfo networkInfo = mock(NetworkInfo.class); in noLastGroupForm_whenP2pDisconnected_shouldStartSearch() local 289 doReturn(false).when(networkInfo).isConnected(); in noLastGroupForm_whenP2pDisconnected_shouldStartSearch() 293 bundle.putParcelable(WifiP2pManager.EXTRA_NETWORK_INFO, networkInfo); in noLastGroupForm_whenP2pDisconnected_shouldStartSearch()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | Nat464XlatTest.java | 118 mNai.networkInfo.setDetailedState(NetworkInfo.DetailedState.CONNECTED, "", ""); 122 mNai.networkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, "", ""); 131 mNai.networkInfo = new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0 /* subtype */, 148 + "nat64Prefix=%s addresses=%s", expected, nai.networkInfo.getType(), 149 nai.networkInfo.getDetailedState(), 158 + "nat64Prefix=%s addresses=%s", expected, nai.networkInfo.getType(), 159 nai.networkInfo.getDetailedState(), 182 mNai.networkInfo.setType(type); 184 mNai.networkInfo.setDetailedState(state, "reason", "extraInfo");
|
D | NetworkNotificationManagerTest.java | 178 mWifiNai.networkInfo = mNetworkInfo; in setUp() 180 mCellNai.networkInfo = mNetworkInfo; in setUp() 182 mVpnNai.networkInfo = mNetworkInfo; in setUp() 184 mBluetoothNai.networkInfo = mEmptyNetworkInfo; in setUp()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
D | ConnectivityListener.java | 295 NetworkInfo networkInfo = mConnectivityManager.getNetworkInfo(network); in getFirstEthernet() local 296 if (networkInfo != null && networkInfo.getType() == ConnectivityManager.TYPE_ETHERNET) { in getFirstEthernet() 392 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo(); in updateConnectivityStatus() local 393 if (networkInfo == null) { in updateConnectivityStatus() 396 switch (networkInfo.getType()) { in updateConnectivityStatus()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/network/ |
D | ConnectivityListener.java | 326 NetworkInfo networkInfo = mConnectivityManager.getNetworkInfo(network); in getFirstEthernet() local 327 if (networkInfo != null && networkInfo.getType() == ConnectivityManager.TYPE_ETHERNET) { in getFirstEthernet() 422 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo(); in updateConnectivityStatus() local 423 if (networkInfo == null) { in updateConnectivityStatus() 426 switch (networkInfo.getType()) { in updateConnectivityStatus()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | TestUtil.java | 40 NetworkInfo networkInfo = new NetworkInfo(0, 0, "", ""); in sendNetworkStateChanged() local 41 networkInfo.setDetailedState(detailedState, "", ""); in sendNetworkStateChanged() 42 intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, networkInfo); in sendNetworkStateChanged()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
D | UtilsTest.java | 230 final NetworkInfo networkInfo = in testGetActiveNetworkInfo() local 232 when(mockConnectivityManager.getActiveNetworkInfo()).thenReturn(networkInfo); in testGetActiveNetworkInfo() 234 assertEquals(mUtils.getActiveNetworkInfo(mockContext), networkInfo); in testGetActiveNetworkInfo() local 439 NetworkInfo networkInfo = new NetworkInfo(type, 0, null, null); in setCurrentNetworkMock() local 440 networkInfo.setDetailedState( in setCurrentNetworkMock() 444 when(mockConnectivityManager.getActiveNetworkInfo()).thenReturn(networkInfo); in setCurrentNetworkMock()
|
/packages/apps/Dialer/java/com/android/incallui/calllocation/impl/ |
D | LocationHelper.java | 247 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); in isConnected() local 248 return networkInfo != null && networkInfo.isConnectedOrConnecting(); in isConnected()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/analytics/ |
D | NetworkTypeLogger.java | 68 final NetworkInfo networkInfo = mUtils.getActiveNetworkInfo(mContext); in log() local 70 final int networkType = networkInfo.getType(); in log()
|
/packages/modules/Wifi/tests/hostsidetests/multidevices/com.google.snippet.wifi/direct/ |
D | WifiDirectSnippet.java | 82 NetworkInfo networkInfo = intent 84 if (networkInfo.isConnected()) { 89 } else if (networkInfo.isConnectedOrConnecting()) {
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/ |
D | ShadowWifiManager.java | 90 NetworkInfo networkInfo = in connect() local 100 connectivityManager.setActiveNetworkInfo(networkInfo); in connect()
|
/packages/modules/Connectivity/tests/cts/hostside-network-policy/aidl/com/android/cts/netpolicy/hostside/ |
D | NetworkCheckResult.aidl | 25 NetworkInfo networkInfo;
|
/packages/modules/Wifi/tests/hostsidetests/multidevices/test/direct/snippet/ |
D | WifiP2pManagerSnippet.java | 154 NetworkInfo networkInfo = intent.getParcelableExtra( in onReceive() local 156 if (networkInfo.isConnected()) { in onReceive()
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | WifiDialogActivity.java | 320 NetworkInfo networkInfo = accessPoint.getNetworkInfo(); in onSubmit() local 321 if (networkInfo == null || !networkInfo.isConnected()) { in onSubmit()
|
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app/src/com/android/cts/netpolicy/hostside/ |
D | AbstractRestrictBackgroundNetworkTestCase.java | 544 final NetworkInfo networkInfo = networkCheckResult.networkInfo; in checkForAvailabilityInNetworkCheckResult() local 545 assertNotNull("NetworkInfo from app2 is null", networkInfo); in checkForAvailabilityInNetworkCheckResult() 547 final State state = networkInfo.getState(); in checkForAvailabilityInNetworkCheckResult() 548 final DetailedState detailedState = networkInfo.getDetailedState(); in checkForAvailabilityInNetworkCheckResult() 578 errors.append("\tnetworkInfo: " + networkInfo + "\n"); in checkForAvailabilityInNetworkCheckResult()
|
/packages/apps/Gallery2/src/com/android/gallery3d/util/ |
D | ReverseGeocoder.java | 315 NetworkInfo networkInfo = mConnectivityManager.getActiveNetworkInfo(); in lookupAddress() local 317 if (networkInfo == null || !networkInfo.isConnected()) { in lookupAddress()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
D | Utils.java | 513 final NetworkInfo networkInfo = getActiveNetworkInfo(context); in isNetworkTypeConnected() local 514 if (networkInfo != null && networkInfo.isConnected()) { in isNetworkTypeConnected() 515 final int activeNetworkType = networkInfo.getType(); in isNetworkTypeConnected()
|
/packages/apps/Settings/src/com/android/settings/wifi/p2p/ |
D | WifiP2pSettings.java | 129 NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra( 133 if (networkInfo.isConnected()) { 623 mWifiP2pManager.requestNetworkInfo(sChannel, networkInfo -> { in onDeviceAvailable() 627 if (networkInfo.isConnected()) { in onDeviceAvailable()
|