am 0727a865: Merge "Add network condition reporting." into gingerbread
Merge commit '0727a865d83b944c2fecc0bf1228a36976fe5300' into gingerbread-plus-aosp * commit '0727a865d83b944c2fecc0bf1228a36976fe5300': Add network condition reporting.
This commit is contained in:
commit
ee6dfc507a
2 changed files with 112 additions and 1 deletions
|
|
@ -105,6 +105,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
|
||||
|
|
@ -548,5 +556,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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,4 +74,6 @@ interface IConnectivityManager
|
|||
String[] getTetherableUsbRegexs();
|
||||
|
||||
String[] getTetherableWifiRegexs();
|
||||
|
||||
void reportInetCondition(int networkType, int percentage);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue