Loading core/java/android/server/BluetoothEventLoop.java +5 −3 Original line number Diff line number Diff line Loading @@ -425,11 +425,13 @@ class BluetoothEventLoop { } } else if (name.equals("Interface")) { String iface = propValues[1]; if (!iface.equals("")) { mBluetoothService.handlePanDeviceStateChange(device, iface, BluetoothPan.STATE_CONNECTED, BluetoothPan.LOCAL_PANU_ROLE); } } } private String checkPairingRequestAndGetAddress(String objectPath, int nativeData) { String address = mBluetoothService.getAddressFromObjectPath(objectPath); Loading core/java/android/server/BluetoothService.java +13 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.bluetooth.BluetoothPan; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothProfileState; import android.bluetooth.BluetoothSocket; import android.bluetooth.BluetoothTetheringDataTracker; import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetooth; import android.bluetooth.IBluetoothCallback; Loading @@ -54,7 +55,6 @@ import android.os.Message; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemService; import android.provider.Settings; import android.util.Log; import android.util.Pair; Loading @@ -79,11 +79,9 @@ import java.net.InetAddress; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; public class BluetoothService extends IBluetooth.Stub { private static final String TAG = "BluetoothService"; Loading Loading @@ -169,6 +167,8 @@ public class BluetoothService extends IBluetooth.Stub { private static String mDockAddress; private String mDockPin; private String mIface; private int mAdapterConnectionState = BluetoothAdapter.STATE_DISCONNECTED; private static class RemoteService { Loading Loading @@ -1582,7 +1582,6 @@ public class BluetoothService extends IBluetooth.Stub { } if (prevState == state) return; // TODO: We might need this for PANU role too. if (role == BluetoothPan.LOCAL_NAP_ROLE) { if (state == BluetoothPan.STATE_CONNECTED) { ifaceAddr = enableTethering(iface); Loading @@ -1593,6 +1592,16 @@ public class BluetoothService extends IBluetooth.Stub { ifaceAddr = null; } } } else { // PANU Role = reverse Tether if (state == BluetoothPan.STATE_CONNECTED) { mIface = iface; BluetoothTetheringDataTracker.getInstance().startReverseTether(iface, device); } else if (state == BluetoothPan.STATE_DISCONNECTED && (prevState == BluetoothPan.STATE_CONNECTED || prevState == BluetoothPan.STATE_DISCONNECTING)) { BluetoothTetheringDataTracker.getInstance().stopReverseTether(mIface); } } Pair<Integer, String> value = new Pair<Integer, String>(state, ifaceAddr); Loading Loading
core/java/android/server/BluetoothEventLoop.java +5 −3 Original line number Diff line number Diff line Loading @@ -425,11 +425,13 @@ class BluetoothEventLoop { } } else if (name.equals("Interface")) { String iface = propValues[1]; if (!iface.equals("")) { mBluetoothService.handlePanDeviceStateChange(device, iface, BluetoothPan.STATE_CONNECTED, BluetoothPan.LOCAL_PANU_ROLE); } } } private String checkPairingRequestAndGetAddress(String objectPath, int nativeData) { String address = mBluetoothService.getAddressFromObjectPath(objectPath); Loading
core/java/android/server/BluetoothService.java +13 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.bluetooth.BluetoothPan; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothProfileState; import android.bluetooth.BluetoothSocket; import android.bluetooth.BluetoothTetheringDataTracker; import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetooth; import android.bluetooth.IBluetoothCallback; Loading @@ -54,7 +55,6 @@ import android.os.Message; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemService; import android.provider.Settings; import android.util.Log; import android.util.Pair; Loading @@ -79,11 +79,9 @@ import java.net.InetAddress; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; public class BluetoothService extends IBluetooth.Stub { private static final String TAG = "BluetoothService"; Loading Loading @@ -169,6 +167,8 @@ public class BluetoothService extends IBluetooth.Stub { private static String mDockAddress; private String mDockPin; private String mIface; private int mAdapterConnectionState = BluetoothAdapter.STATE_DISCONNECTED; private static class RemoteService { Loading Loading @@ -1582,7 +1582,6 @@ public class BluetoothService extends IBluetooth.Stub { } if (prevState == state) return; // TODO: We might need this for PANU role too. if (role == BluetoothPan.LOCAL_NAP_ROLE) { if (state == BluetoothPan.STATE_CONNECTED) { ifaceAddr = enableTethering(iface); Loading @@ -1593,6 +1592,16 @@ public class BluetoothService extends IBluetooth.Stub { ifaceAddr = null; } } } else { // PANU Role = reverse Tether if (state == BluetoothPan.STATE_CONNECTED) { mIface = iface; BluetoothTetheringDataTracker.getInstance().startReverseTether(iface, device); } else if (state == BluetoothPan.STATE_DISCONNECTED && (prevState == BluetoothPan.STATE_CONNECTED || prevState == BluetoothPan.STATE_DISCONNECTING)) { BluetoothTetheringDataTracker.getInstance().stopReverseTether(mIface); } } Pair<Integer, String> value = new Pair<Integer, String>(state, ifaceAddr); Loading