Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81d5ad51 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Fix Bluetooth-tethering config of interface.

bug:3288692
Change-Id: Id7f1b680392f938000953157716bf9a8f8a66af9
parent f76aca98
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1662,7 +1662,8 @@ public class BluetoothService extends IBluetooth.Stub {
            ifcg = service.getInterfaceConfig(iface);
            ifcg = service.getInterfaceConfig(iface);
            if (ifcg != null) {
            if (ifcg != null) {
                ifcg.mask = InetAddress.getByName(BLUETOOTH_NETMASK);
                ifcg.mask = InetAddress.getByName(BLUETOOTH_NETMASK);
                if (ifcg.addr == null) {

                if (ifcg.addr == null || ifcg.addr.equals(InetAddress.getByName("0.0.0.0"))) {
                    ifcg.addr = InetAddress.getByName(address);
                    ifcg.addr = InetAddress.getByName(address);
                    ifcg.interfaceFlags = ifcg.interfaceFlags.replace("down", "up");
                    ifcg.interfaceFlags = ifcg.interfaceFlags.replace("down", "up");
                }
                }
+1 −1
Original line number Original line Diff line number Diff line
@@ -295,7 +295,7 @@ class NetworkManagementService extends INetworkManagementService.Stub {
            mConnector.doCommand(cmd);
            mConnector.doCommand(cmd);
        } catch (NativeDaemonConnectorException e) {
        } catch (NativeDaemonConnectorException e) {
            throw new IllegalStateException(
            throw new IllegalStateException(
                    "Unable to communicate with native daemon to interface setcfg");
                    "Unable to communicate with native daemon to interface setcfg - " + e);
        }
        }
    }
    }