bluetooth tethering
Change-Id: Id6d5fb1922facc7013abc29214d3e1141995b767
This commit is contained in:
@@ -489,6 +489,17 @@ public class ConnectivityManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@hide}
|
||||||
|
*/
|
||||||
|
public String[] getTetherableBluetoothRegexs() {
|
||||||
|
try {
|
||||||
|
return mService.getTetherableBluetoothRegexs();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
return new String[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
public static final int TETHER_ERROR_NO_ERROR = 0;
|
public static final int TETHER_ERROR_NO_ERROR = 0;
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
|
|||||||
@@ -73,5 +73,7 @@ interface IConnectivityManager
|
|||||||
|
|
||||||
String[] getTetherableWifiRegexs();
|
String[] getTetherableWifiRegexs();
|
||||||
|
|
||||||
|
String[] getTetherableBluetoothRegexs();
|
||||||
|
|
||||||
void requestNetworkTransitionWakelock(in String forWhom);
|
void requestNetworkTransitionWakelock(in String forWhom);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,7 +344,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
mTetheringConfigValid = (((mNetTrackers[ConnectivityManager.TYPE_MOBILE_DUN] != null) ||
|
mTetheringConfigValid = (((mNetTrackers[ConnectivityManager.TYPE_MOBILE_DUN] != null) ||
|
||||||
!mTethering.isDunRequired()) &&
|
!mTethering.isDunRequired()) &&
|
||||||
(mTethering.getTetherableUsbRegexs().length != 0 ||
|
(mTethering.getTetherableUsbRegexs().length != 0 ||
|
||||||
mTethering.getTetherableWifiRegexs().length != 0) &&
|
mTethering.getTetherableWifiRegexs().length != 0 ||
|
||||||
|
mTethering.getTetherableBluetoothRegexs().length != 0) &&
|
||||||
mTethering.getUpstreamIfaceRegexs().length != 0);
|
mTethering.getUpstreamIfaceRegexs().length != 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1676,6 +1677,15 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String[] getTetherableBluetoothRegexs() {
|
||||||
|
enforceTetherAccessPermission();
|
||||||
|
if (isTetheringSupported()) {
|
||||||
|
return mTethering.getTetherableBluetoothRegexs();
|
||||||
|
} else {
|
||||||
|
return new String[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO - move iface listing, queries, etc to new module
|
// TODO - move iface listing, queries, etc to new module
|
||||||
// javadoc from interface
|
// javadoc from interface
|
||||||
public String[] getTetherableIfaces() {
|
public String[] getTetherableIfaces() {
|
||||||
|
|||||||
Reference in New Issue
Block a user