diff options
Diffstat (limited to 'core/java/android/server/BluetoothService.java')
| -rw-r--r-- | core/java/android/server/BluetoothService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index df5097e..b6101b2 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -130,7 +130,7 @@ public class BluetoothService extends IBluetooth.Stub { private static final String BLUETOOTH_IFACE_ADDR_START= "192.168.44.1"; private static final int BLUETOOTH_MAX_PAN_CONNECTIONS = 5; - private static final String BLUETOOTH_NETMASK = "255.255.255.0"; + private static final int BLUETOOTH_PREFIX_LENGTH = 24; // The timeout used to sent the UUIDs Intent // This timeout should be greater than the page timeout @@ -1704,7 +1704,6 @@ public class BluetoothService extends IBluetooth.Stub { try { ifcg = service.getInterfaceConfig(iface); if (ifcg != null) { - InetAddress mask = InetAddress.getByName(BLUETOOTH_NETMASK); InetAddress addr = null; if (ifcg.addr == null || (addr = ifcg.addr.getAddress()) == null || addr.equals(InetAddress.getByName("0.0.0.0")) || @@ -1712,7 +1711,7 @@ public class BluetoothService extends IBluetooth.Stub { addr = InetAddress.getByName(address); } ifcg.interfaceFlags = ifcg.interfaceFlags.replace("down", "up"); - ifcg.addr = new LinkAddress(addr, mask); + ifcg.addr = new LinkAddress(addr, BLUETOOTH_PREFIX_LENGTH); ifcg.interfaceFlags = ifcg.interfaceFlags.replace("running", ""); ifcg.interfaceFlags = ifcg.interfaceFlags.replace(" "," "); service.setInterfaceConfig(iface, ifcg); |
