Home
last modified time | relevance | path

Searched refs:ConnectivityManager (Results 1 – 25 of 174) sorted by relevance

1234567

/frameworks/support/v4/honeycomb_mr2/android/support/v4/net/
DConnectivityManagerCompatHoneycombMR2.java19 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/support/v4/java/android/support/v4/net/
DConnectivityManagerCompat.java19 import static android.net.ConnectivityManager.TYPE_MOBILE;
20 import static android.net.ConnectivityManager.TYPE_WIFI;
23 import android.net.ConnectivityManager;
34 boolean isActiveNetworkMetered(ConnectivityManager cm); in isActiveNetworkMetered()
39 public boolean isActiveNetworkMetered(ConnectivityManager cm) { in isActiveNetworkMetered()
61 public boolean isActiveNetworkMetered(ConnectivityManager cm) { in isActiveNetworkMetered()
69 public boolean isActiveNetworkMetered(ConnectivityManager cm) { in isActiveNetworkMetered()
76 public boolean isActiveNetworkMetered(ConnectivityManager cm) { in isActiveNetworkMetered()
102 public static boolean isActiveNetworkMetered(ConnectivityManager cm) { in isActiveNetworkMetered()
113 public static NetworkInfo getNetworkInfoFromBroadcast(ConnectivityManager cm, Intent intent) { in getNetworkInfoFromBroadcast()
[all …]
/frameworks/support/v4/gingerbread/android/support/v4/net/
DConnectivityManagerCompatGingerbread.java19 import static android.net.ConnectivityManager.TYPE_MOBILE;
20 import static android.net.ConnectivityManager.TYPE_MOBILE_DUN;
21 import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI;
22 import static android.net.ConnectivityManager.TYPE_MOBILE_MMS;
23 import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL;
24 import static android.net.ConnectivityManager.TYPE_WIFI;
25 import static android.net.ConnectivityManager.TYPE_WIMAX;
27 import android.net.ConnectivityManager;
34 public static boolean isActiveNetworkMetered(ConnectivityManager cm) { in isActiveNetworkMetered()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DConnectivityManagerMobileTest.java19 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/
DTethering.java34 import android.net.ConnectivityManager;
35 import android.net.ConnectivityManager.NetworkCallback;
117 private static final Integer MOBILE_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE);
118 private static final Integer HIPRI_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_HIPRI);
119 private static final Integer DUN_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_DUN);
123 private int mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_NONE;
189 filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); in Tethering()
216 private ConnectivityManager getConnectivityManager() { in getConnectivityManager()
217 return (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); in getConnectivityManager()
418 case ConnectivityManager.TETHERING_WIFI: in enableTetheringInternal()
[all …]
DDataConnectionStats.java23 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/ex/common/java/com/android/common/
DNetworkConnectivityListener.java23 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/
Dconnectivity-monitoring.jd35 <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/ko/training/monitoring-device-state/
Dconnectivity-monitoring.jd35 <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/ja/training/monitoring-device-state/
Dconnectivity-monitoring.jd35 <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/ru/training/monitoring-device-state/
Dconnectivity-monitoring.jd35 …ичие подключения к Интернету и его тип можно с помощью {@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/docs/html-intl/intl/ja/preview/features/
Ddata-saver.jd51 …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)
162ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED} をリッスンし、レシーバーを動的に {@link android.content.Co…
165ConnectivityManager.getRestrictBackgroundStatus()} を呼び出して、<a href="#status">新しいデータセーバー設定がそのパーミッション…
/frameworks/base/docs/html-intl/intl/zh-cn/preview/features/
Ddata-saver.jd51 …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)
162ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED} 以及使用 {@link android.content.Context#regist…
165ConnectivityManager.getRestrictBackgroundStatus()} 来<a href="#status">检查新的 Data Saver 首选项是否会影响其权限<…
/frameworks/base/docs/html-intl/intl/ko/preview/features/
Ddata-saver.jd51 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/
DNetworkActivity.java23 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/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DHotspotControllerImpl.java24 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/services/core/java/com/android/server/
DConnectivityService.java20 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;
53 import android.net.ConnectivityManager;
54 import android.net.ConnectivityManager.PacketKeepalive;
495 new ArrayList[ConnectivityManager.MAX_NETWORK_TYPE + 1]; in LegacyTypeTracker()
691 mNetConfigs = new NetworkConfig[ConnectivityManager.MAX_NETWORK_TYPE+1]; in ConnectivityService()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DConnectivityManagerTestBase.java24 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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DTestUtil.java24 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/core/java/com/android/server/net/
DNetworkPinner.java20 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/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/
DConnectionUtil.java30 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/opt/net/wifi/service/java/com/android/server/wifi/
DSoftApManager.java27 import android.net.ConnectivityManager;
55 private final ConnectivityManager mConnectivityManager;
93 ConnectivityManager connectivityManager, in SoftApManager()
115 ConnectivityManager.EXTRA_AVAILABLE_TETHER); in SoftApManager()
117 ConnectivityManager.EXTRA_ACTIVE_TETHER); in SoftApManager()
122 }, new IntentFilter(ConnectivityManager.ACTION_TETHER_STATE_CHANGED)); in SoftApManager()
234 != ConnectivityManager.TETHER_ERROR_NO_ERROR) { in startTethering()
263 != ConnectivityManager.TETHER_ERROR_NO_ERROR) { in stopTethering()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/
DApnContext.java21 import android.net.ConnectivityManager;
513 case ConnectivityManager.TYPE_MOBILE: in apnIdForType()
515 case ConnectivityManager.TYPE_MOBILE_MMS: in apnIdForType()
517 case ConnectivityManager.TYPE_MOBILE_SUPL: in apnIdForType()
519 case ConnectivityManager.TYPE_MOBILE_DUN: in apnIdForType()
521 case ConnectivityManager.TYPE_MOBILE_FOTA: in apnIdForType()
523 case ConnectivityManager.TYPE_MOBILE_IMS: in apnIdForType()
525 case ConnectivityManager.TYPE_MOBILE_CBS: in apnIdForType()
527 case ConnectivityManager.TYPE_MOBILE_IA: in apnIdForType()
529 case ConnectivityManager.TYPE_MOBILE_EMERGENCY: in apnIdForType()
/frameworks/base/core/java/android/net/
DNetworkTemplate.java19 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/base/services/core/java/com/android/server/job/controllers/
DConnectivityController.java24 import android.net.ConnectivityManager;
46 ConnectivityManager.OnNetworkActiveListener {
49 private final ConnectivityManager mConnManager;
72 mConnManager = mContext.getSystemService(ConnectivityManager.class); in ConnectivityController()
75 final IntentFilter intentFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); in ConnectivityController()

1234567