Add BT - DataTracker connection

Allows the external BT stack the means to communicate with
ConnectivityService during reverse tethering.

bug:8445208
Change-Id: Ice7dfb0b50c9481d359aed14a51372878185171c
This commit is contained in:
Robert Greenwalt
2012-08-21 19:27:00 -07:00
parent f7fa08b702
commit 665e1aed5e
15 changed files with 213 additions and 136 deletions

View File

@@ -839,33 +839,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
return event.getMessage().endsWith("started");
}
// TODO(BT) Remove
@Override
public void startReverseTethering(String iface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
// cmd is "tether start first_start first_stop second_start second_stop ..."
// an odd number of addrs will fail
try {
mConnector.execute("tether", "start-reverse", iface);
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
BluetoothTetheringDataTracker.getInstance().startReverseTether(iface);
}
// TODO(BT) Remove
@Override
public void stopReverseTethering() {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
mConnector.execute("tether", "stop-reverse");
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
BluetoothTetheringDataTracker.getInstance().stopReverseTether();
}
@Override
public void tetherInterface(String iface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);