• R/O
  • HTTP
  • SSH

frameworks-base: Commit


Commit MetaInfo

Revisioncdd6de9c3f02b98c4af1e40f1097001c52144873 (tree)
Time2015-07-15 16:21:32
AuthorGrzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tiet...>
CommiterChih-Wei Huang

Log Message

Fix Bluetooth tethering

Ignore linkstate down events for bt-pan interface which cause its remove.
Interface should only be removed when we receive the interface remove event.

At connect init to bluetooth PAN service, bridge pan device adds tetherable
bt-pan interface as set in bluetooth regexs. Before bt-pan interface gets
tethered, multiple linkstate events are received by linkstate change notifier.
Receiving multiple time of linkstate down may cause remove of tetherable
interface (bt-pan), before we call tether method.
Finally when tethering method is called and bt-pan tether interface
is removed, error is returned because of not available tetherable interfaces.

Bug found during bluetooth PTS PAN testing. It affects multiple test cases.

Change-Id: Ifb0d16657ca238aa62064fee0fc4ee974a2518ad

Change Summary

Incremental Difference

--- a/services/java/com/android/server/connectivity/
+++ b/services/java/com/android/server/connectivity/
@@ -229,6 +229,10 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
229229 // ignore usb0 down after enabling RNDIS
230230 // we will handle disconnect in interfaceRemoved instead
231231 if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
232+ } else if (isBluetooth(iface)) {
233+ // ignore interface down for bt liskstate change
234+ // disconnect will only be handled in interfaceRemoved
235+ if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
232236 } else if (sm != null) {
233237 sm.sendMessage(TetherInterfaceSM.CMD_INTERFACE_DOWN);
234238 mIfaces.remove(iface);
Show on old repository browser