Collect and persist tethering stats.

Use new "gettetherstats" netd command to retrieve statistics for
active tethering connections.  Keep tethering poll events separate
from UID poll, even though they end up same historical structures.

Bug: 5244846
Change-Id: Ia0c5165f6712c12b51586f86c331a2aad4ad6afb
This commit is contained in:
Jeff Sharkey
2011-09-16 01:52:49 -07:00
parent 9c57b7f2ef
commit 300f08f094
2 changed files with 12 additions and 0 deletions

View File

@@ -83,6 +83,12 @@ interface IConnectivityManager
String[] getTetheredIfaces();
/**
* Return list of interface pairs that are actively tethered. Even indexes are
* remote interface, and odd indexes are corresponding local interfaces.
*/
String[] getTetheredIfacePairs();
String[] getTetheringErroredIfaces();
String[] getTetherableUsbRegexs();

View File

@@ -2394,6 +2394,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return mTethering.getTetheredIfaces();
}
@Override
public String[] getTetheredIfacePairs() {
enforceTetherAccessPermission();
return mTethering.getTetheredIfacePairs();
}
public String[] getTetheringErroredIfaces() {
enforceTetherAccessPermission();
return mTethering.getErroredIfaces();