• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Revision1f776b4099e560c9de207f90352e237e9763a773 (tree)
Time2015-12-22 13:13:53
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/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -240,6 +240,10 @@ public class Tethering extends BaseNetworkObserver {
240240 // ignore usb0 down after enabling RNDIS
241241 // we will handle disconnect in interfaceRemoved instead
242242 if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
243+ } else if (isBluetooth(iface)) {
244+ // ignore interface down for bt liskstate change
245+ // disconnect will only be handled in interfaceRemoved
246+ if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
243247 } else if (sm != null) {
244248 sm.sendMessage(TetherInterfaceSM.CMD_INTERFACE_DOWN);
245249 mIfaces.remove(iface);