/frameworks/support/compat/java/android/support/v4/net/ |
D | ConnectivityManagerCompat.java | 20 import android.net.ConnectivityManager; 28 import static android.net.ConnectivityManager.TYPE_MOBILE; 29 import static android.net.ConnectivityManager.TYPE_MOBILE_DUN; 30 import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI; 31 import static android.net.ConnectivityManager.TYPE_MOBILE_MMS; 32 import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL; 33 import static android.net.ConnectivityManager.TYPE_WIFI; 34 import static android.net.ConnectivityManager.TYPE_WIMAX; 43 boolean isActiveNetworkMetered(ConnectivityManager cm); in isActiveNetworkMetered() 46 int getRestrictBackgroundStatus(ConnectivityManager cm); in getRestrictBackgroundStatus() [all …]
|
/frameworks/support/compat/honeycomb_mr2/android/support/v4/net/ |
D | ConnectivityManagerCompatHoneycombMR2.java | 19 import static android.net.ConnectivityManager.TYPE_BLUETOOTH; 20 import static android.net.ConnectivityManager.TYPE_ETHERNET; 21 import static android.net.ConnectivityManager.TYPE_MOBILE; 22 import static android.net.ConnectivityManager.TYPE_MOBILE_DUN; 23 import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI; 24 import static android.net.ConnectivityManager.TYPE_MOBILE_MMS; 25 import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL; 26 import static android.net.ConnectivityManager.TYPE_WIFI; 27 import static android.net.ConnectivityManager.TYPE_WIMAX; 29 import android.net.ConnectivityManager; [all …]
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
D | ConnectivityManagerMobileTest.java | 19 import android.net.ConnectivityManager; 57 if (!waitForNetworkState(ConnectivityManager.TYPE_MOBILE, in setUp() 89 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in test3GToWifiNotification() 93 assertEquals("active network is not mobile", ConnectivityManager.TYPE_MOBILE, ni.getType()); in test3GToWifiNotification() 124 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifi() 148 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP() 160 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in testConnectToWifWithKnownAP() 172 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP() 196 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testDisconnectWifi() 206 assertTrue("mobile not enabled", waitForNetworkState(ConnectivityManager.TYPE_MOBILE, in testDisconnectWifi() [all …]
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | Tethering.java | 34 import android.net.ConnectivityManager; 35 import android.net.ConnectivityManager.NetworkCallback; 116 private static final Integer MOBILE_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE); 117 private static final Integer HIPRI_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_HIPRI); 118 private static final Integer DUN_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_DUN); 122 private int mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_NONE; 136 mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR; in TetherState() 199 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in Tethering() 227 private ConnectivityManager getConnectivityManager() { in getConnectivityManager() 228 return (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in getConnectivityManager() [all …]
|
D | DnsEventListenerService.java | 20 import android.net.ConnectivityManager; 21 import android.net.ConnectivityManager.NetworkCallback; 108 private final ConnectivityManager mCm; 123 this(context.getSystemService(ConnectivityManager.class), new IpConnectivityLog()); in DnsEventListenerService() 127 public DnsEventListenerService(ConnectivityManager cm, IpConnectivityLog log) { in DnsEventListenerService()
|
D | DataConnectionStats.java | 23 import android.net.ConnectivityManager; 64 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in startMonitoring() 65 filter.addAction(ConnectivityManager.INET_CONDITION_ACTION); in startMonitoring() 75 } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || in onReceive() 76 action.equals(ConnectivityManager.INET_CONDITION_ACTION)) { in onReceive()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/connectivity/tethering/ |
D | TetherInterfaceStateMachineTest.java | 27 import static android.net.ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR; 28 import static android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR; 29 import static android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR; 30 import static android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR; 35 import android.net.ConnectivityManager; 94 ConnectivityManager.TETHERING_BLUETOOTH, mNMService, mStatsService, mTetherHelper); in startsOutAvailable() 104 initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH); in shouldDoNothingUntilRequested() 124 initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH); in handlesImmediateInterfaceDown() 134 initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH); in canBeTethered() 146 initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, null); in canUnrequestTethering() [all …]
|
/frameworks/ex/common/java/com/android/common/ |
D | NetworkConnectivityListener.java | 23 import android.net.ConnectivityManager; 68 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || in onReceive() 75 intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); in onReceive() 84 intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); in onReceive() 86 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive() 88 mReason = intent.getStringExtra(ConnectivityManager.EXTRA_REASON); in onReceive() 90 intent.getBooleanExtra(ConnectivityManager.EXTRA_IS_FAILOVER, false); in onReceive() 142 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in startListening()
|
/frameworks/base/docs/html-intl/intl/zh-cn/training/monitoring-device-state/ |
D | connectivity-monitoring.jd | 35 <p>您可以使用 {@link android.net.ConnectivityManager} 查看是否确实已连接互联网,如果已连接,您还可以了解当前的连接类型。</p> 40 <p>如果设备未连接互联网,就没有必要根据互联网资源安排更新了。以下代码段说明如何使用 {@link android.net.ConnectivityManager} 查询有效网络并确定该网络是否已… 42 <pre>ConnectivityManager cm = 43 (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); 55 <pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre> 64 <p>只要连接的具体情况发生变化,{@link android.net.ConnectivityManager} 就会广播 {@link android.net.ConnectivityManage…
|
/frameworks/base/docs/html-intl/intl/ja/training/monitoring-device-state/ |
D | connectivity-monitoring.jd | 35 <p>{@link android.net.ConnectivityManager} を使用すると、端末が実際にインターネットに接続されているかどうかと、接続されている場合の接続タイプを調べることが… 40 …インターネット リソースに基づく更新をスケジューリングする必要性はありません。次のスニペットは、{@link android.net.ConnectivityManager} を使用してアクティブ… 42 <pre>ConnectivityManager cm = 43 (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); 55 <pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre> 64 <p>接続状態の詳細が変化すると、{@link android.net.ConnectivityManager} によって {@link android.net.ConnectivityManage…
|
/frameworks/base/docs/html-intl/intl/ko/training/monitoring-device-state/ |
D | connectivity-monitoring.jd | 35 <p>인터넷에 연결되었는지, 어떤 연결 방식인지를 확인하기 위하여 {@link android.net.ConnectivityManager}를 사용할 수 있습니다.</p> 40 …가 없습니다. 다음은 활성 네트워크를 쿼리하고 인터넷이 연결되어 있는지 확인하기 위한 {@link android.net.ConnectivityManager} 사용법을 보여줍니다… 42 <pre>ConnectivityManager cm = 43 (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); 55 <pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre> 64 <p>연결 정보가 변경될 때마다 {@link android.net.ConnectivityManager}는 {@link android.net.ConnectivityManager#C…
|
/frameworks/base/docs/html-intl/intl/ru/training/monitoring-device-state/ |
D | connectivity-monitoring.jd | 35 …ичие подключения к Интернету и его тип можно с помощью {@link android.net.ConnectivityManager}.</p> 40 …риведенном ниже коде показано, как использовать {@link android.net.ConnectivityManager} для отправ… 42 <pre>ConnectivityManager cm = 43 (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); 55 <pre>boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;</pre> 64 <p>{@link android.net.ConnectivityManager} передает действие {@link android.net.ConnectivityManager…
|
/frameworks/base/services/core/java/com/android/server/connectivity/tethering/ |
D | TetherInterfaceStateMachine.java | 19 import android.net.ConnectivityManager; 105 mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR; in TetherInterfaceStateMachine() 127 if (mInterfaceType == ConnectivityManager.TETHERING_USB) { in configureIfaceIp() 130 } else if (mInterfaceType == ConnectivityManager.TETHERING_WIFI) { in configureIfaceIp() 181 mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR; in processMessage() 203 mLastError = ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR; in enter() 212 mLastError = ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR; in enter() 238 mLastError = ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR; in exit() 302 mLastError = ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR; in processMessage() 318 mLastError = ConnectivityManager.TETHER_ERROR_MASTER_ERROR; in processMessage() [all …]
|
/frameworks/base/docs/html-intl/intl/ja/training/basics/network-ops/ |
D | data-saver.jd | 51 …N Developer Preview は {@link android.net.ConnectivityManager} API を拡張することで、<a href="#status">ユーザーの… 65 android.net.ConnectivityManager} API を使用して、どのようなデータ使用量の制限が適用されているかを確認できます。 103 android.net.ConnectivityManager#isActiveNetworkMetered 104 ConnectivityManager.isActiveNetworkMetered()} と {@code 105 ConnectivityManager.getRestrictBackgroundStatus()} を使用しています。 110 ConnectivityManager connMgr = (ConnectivityManager) 162 …ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED} をリッスンし、レシーバーを動的に {@link android.content.Co… 165 …ConnectivityManager.getRestrictBackgroundStatus()} を呼び出して、<a href="#status">新しいデータセーバー設定がそのパーミッション…
|
/frameworks/base/docs/html-intl/intl/ko/training/basics/network-ops/ |
D | data-saver.jd | 51 N Developer Preview는 {@link android.net.ConnectivityManager} 65 android.net.ConnectivityManager} API를 사용하여, 어떤 데이터 사용량 제한이 103 android.net.ConnectivityManager#isActiveNetworkMetered 104 ConnectivityManager.isActiveNetworkMetered()} 및 {@code 105 ConnectivityManager.getRestrictBackgroundStatus()}를 사용하여 앱이 사용해야 하는 데이터의 양을 110 ConnectivityManager connMgr = (ConnectivityManager) 161 ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED}를 수신하기 위해 {@link 165 ConnectivityManager.getRestrictBackgroundStatus()}를 호출하여 <a href="#status">새로운 Data Saver 기본 설정이
|
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/ |
D | NetworkActivity.java | 23 import android.net.ConnectivityManager; 88 IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); in onCreate() 129 ConnectivityManager connMgr = in updateConnectedFlags() 130 (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); in updateConnectedFlags() 134 wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI; in updateConnectedFlags() 135 mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE; in updateConnectedFlags() 290 ConnectivityManager connMgr = in onReceive() 291 (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); in onReceive() 299 && networkInfo.getType() == ConnectivityManager.TYPE_WIFI) { in onReceive()
|
/frameworks/base/docs/html-intl/intl/zh-cn/training/basics/network-ops/ |
D | data-saver.jd | 51 …N Developer Preview 扩展{@link android.net.ConnectivityManager} API,为应用提供<a href="#status">检索用户的 Dat… 65 android.net.ConnectivityManager} API 来确定正在应用的是哪些流量消耗限制。 103 android.net.ConnectivityManager#isActiveNetworkMetered 104 ConnectivityManager.isActiveNetworkMetered()} 和 {@code 105 ConnectivityManager.getRestrictBackgroundStatus()} 来确定应用应使用多少数据: 110 ConnectivityManager connMgr = (ConnectivityManager) 162 …ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED} 以及使用 {@link android.content.Context#regist… 165 …ConnectivityManager.getRestrictBackgroundStatus()} 来<a href="#status">检查新的 Data Saver 首选项是否会影响其权限<…
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | HotspotControllerImpl.java | 24 import android.net.ConnectivityManager; 40 private final ConnectivityManager mConnectivityManager; 47 mConnectivityManager = (ConnectivityManager) context.getSystemService( in HotspotControllerImpl() 105 ConnectivityManager.OnStartTetheringCallback { 119 ConnectivityManager.TETHERING_WIFI, false, callback); in setHotspotEnabled() 121 mConnectivityManager.stopTethering(ConnectivityManager.TETHERING_WIFI); in setHotspotEnabled()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ |
D | ConnectivityManagerTestBase.java | 24 import android.net.ConnectivityManager; 74 protected ConnectivityManager mCm; 101 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive() 128 mCm = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in setUp() 141 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); in setUp() 150 mIntentFilter.addAction(ConnectivityManager.ACTION_TETHER_STATE_CHANGED); in setUp() 251 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile() 256 return (mCm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI); in isConnectedToWifi() 486 waitForNetworkState(ConnectivityManager.TYPE_WIFI, in connectToWifi()
|
/frameworks/base/core/java/com/android/server/net/ |
D | NetworkPinner.java | 20 import android.net.ConnectivityManager; 21 import android.net.ConnectivityManager.NetworkCallback; 68 private static ConnectivityManager sCM; 81 sCM = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); in maybeInitConnectivityManager()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | TestUtil.java | 24 import android.net.ConnectivityManager; 93 Intent intent = new Intent(ConnectivityManager.ACTION_TETHER_STATE_CHANGED); in sendTetherStateChanged() 94 intent.putExtra(ConnectivityManager.EXTRA_AVAILABLE_TETHER, available); in sendTetherStateChanged() 95 intent.putExtra(ConnectivityManager.EXTRA_ACTIVE_TETHER, active); in sendTetherStateChanged()
|
/frameworks/base/services/core/java/com/android/server/ |
D | ConnectivityService.java | 20 import static android.net.ConnectivityManager.CONNECTIVITY_ACTION; 21 import static android.net.ConnectivityManager.NETID_UNSET; 22 import static android.net.ConnectivityManager.TYPE_NONE; 23 import static android.net.ConnectivityManager.TYPE_VPN; 24 import static android.net.ConnectivityManager.getNetworkTypeName; 25 import static android.net.ConnectivityManager.isNetworkTypeValid; 52 import android.net.ConnectivityManager; 53 import android.net.ConnectivityManager.PacketKeepalive; 543 new ArrayList[ConnectivityManager.MAX_NETWORK_TYPE + 1]; in LegacyTypeTracker() 753 mNetConfigs = new NetworkConfig[ConnectivityManager.MAX_NETWORK_TYPE+1]; in ConnectivityService() [all …]
|
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ |
D | ConnectionUtil.java | 30 import android.net.ConnectivityManager; 70 private ConnectivityManager mCM; 79 private static final int NUM_NETWORK_TYPES = ConnectivityManager.MAX_NETWORK_TYPE + 1; 95 new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); in initialize() 113 mCM = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in initialize() 152 if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) { in onReceive() 157 final ConnectivityManager connManager = (ConnectivityManager) context in onReceive() 161 if (intent.hasExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO)) { in onReceive() 163 intent.getParcelableExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO); in onReceive() 518 NetworkInfo networkInfo = mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); in isConnectedToMobile() [all …]
|
/frameworks/base/core/java/android/net/ |
D | NetworkTemplate.java | 19 import static android.net.ConnectivityManager.TYPE_BLUETOOTH; 20 import static android.net.ConnectivityManager.TYPE_ETHERNET; 21 import static android.net.ConnectivityManager.TYPE_PROXY; 22 import static android.net.ConnectivityManager.TYPE_MOBILE; 23 import static android.net.ConnectivityManager.TYPE_WIFI; 24 import static android.net.ConnectivityManager.TYPE_WIFI_P2P; 25 import static android.net.ConnectivityManager.TYPE_WIMAX;
|
/frameworks/support/compat/jellybean/android/support/v4/net/ |
D | ConnectivityManagerCompatJellyBean.java | 19 import android.net.ConnectivityManager; 25 public static boolean isActiveNetworkMetered(ConnectivityManager cm) { in isActiveNetworkMetered()
|