diff options
author | Robert Greenwalt <robdroid@android.com> | 2010-01-26 11:40:34 -0800 |
---|---|---|
committer | Robert Greenwalt <robdroid@android.com> | 2010-02-04 09:15:06 -0800 |
commit | d0e18ffb82b59d38aeaf0e552f48e734202719ab (patch) | |
tree | 5ad66758cf2629e3590201b37252be56518f2bc6 /core/java/android/net/ConnectivityManager.java | |
parent | 3141e0a62abe57e93e5d716895a2a57cc052bb50 (diff) | |
download | frameworks_base-d0e18ffb82b59d38aeaf0e552f48e734202719ab.zip frameworks_base-d0e18ffb82b59d38aeaf0e552f48e734202719ab.tar.gz frameworks_base-d0e18ffb82b59d38aeaf0e552f48e734202719ab.tar.bz2 |
First pass at USB Tethering.
bug:2281900
Diffstat (limited to 'core/java/android/net/ConnectivityManager.java')
-rw-r--r-- | core/java/android/net/ConnectivityManager.java | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 30799ec..d435df5 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -116,6 +116,24 @@ public class ConnectivityManager "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED"; /** + * Broadcast Action: A tetherable connection has come or gone + * TODO - finish the doc + * @hide + */ + public static final String ACTION_TETHER_STATE_CHANGED = + "android.net.conn.TETHER_STATE_CHANGED"; + + /** + * @hide + */ + public static final String EXTRA_AVAILABLE_TETHER_COUNT = "availableCount"; + + /** + * @hide + */ + public static final String EXTRA_ACTIVE_TETHER_COUNT = "activeCount"; + + /** * The Default Mobile data connection. When active, all data traffic * will use this connection by default. Should not coexist with other * default connections. @@ -338,4 +356,48 @@ public class ConnectivityManager } mService = service; } + + /** + * {@hide} + */ + public String[] getTetherableIfaces() { + try { + return mService.getTetherableIfaces(); + } catch (RemoteException e) { + return new String[0]; + } + } + + /** + * {@hide} + */ + public String[] getTetheredIfaces() { + try { + return mService.getTetheredIfaces(); + } catch (RemoteException e) { + return new String[0]; + } + } + + /** + * {@hide} + */ + public boolean tether(String iface) { + try { + return mService.tether(iface); + } catch (RemoteException e) { + return false; + } + } + + /** + * {@hide} + */ + public boolean untether(String iface) { + try { + return mService.untether(iface); + } catch (RemoteException e) { + return false; + } + } } |