summaryrefslogtreecommitdiffstats
path: root/core/java/android/net/ConnectivityManager.java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2010-09-09 09:41:05 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-09 09:41:05 -0700
commit0727a865d83b944c2fecc0bf1228a36976fe5300 (patch)
tree10f6c738a653b4a5be5c744a6f956d91199ef94a /core/java/android/net/ConnectivityManager.java
parentf6936a3a52b6bb6de27f75d4e38d116e896b7f4d (diff)
parentd7085fcf6567452a9d6fc69b0c6b1bf556f4c1b9 (diff)
downloadframeworks_base-0727a865d83b944c2fecc0bf1228a36976fe5300.zip
frameworks_base-0727a865d83b944c2fecc0bf1228a36976fe5300.tar.gz
frameworks_base-0727a865d83b944c2fecc0bf1228a36976fe5300.tar.bz2
Merge "Add network condition reporting." into gingerbread
Diffstat (limited to 'core/java/android/net/ConnectivityManager.java')
-rw-r--r--core/java/android/net/ConnectivityManager.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 280ded6..331ce10 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -102,6 +102,14 @@ public class ConnectivityManager
* it with {@link android.content.Intent#getStringExtra(String)}.
*/
public static final String EXTRA_EXTRA_INFO = "extraInfo";
+ /**
+ * The lookup key for an int that provides information about
+ * our connection to the internet at large. 0 indicates no connection,
+ * 100 indicates a great connection. Retrieve it with
+ * {@link android.content.Intent@getIntExtra(String)}.
+ * {@hide}
+ */
+ public static final String EXTRA_INET_CONDITION = "inetCondition";
/**
* Broadcast Action: The setting for background data usage has changed
@@ -524,5 +532,17 @@ public class ConnectivityManager
} catch (RemoteException e) {
return TETHER_ERROR_SERVICE_UNAVAIL;
}
- }
+ }
+
+ /**
+ * @param networkType The type of network you want to report on
+ * @param percentage The quality of the connection 0 is bad, 100 is good
+ * {@hide}
+ */
+ public void reportInetCondition(int networkType, int percentage) {
+ try {
+ mService.reportInetCondition(networkType, percentage);
+ } catch (RemoteException e) {
+ }
+ }
}