OSDN Git Service

Fix Bluetooth tethering
authorGrzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Thu, 5 Feb 2015 12:56:03 +0000 (13:56 +0100)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 22 Dec 2015 04:13:53 +0000 (12:13 +0800)
commit1f776b4099e560c9de207f90352e237e9763a773
treeef05253dd761d162058874b0ec3ed1f340bde636
parent9164190284f6e7b3ad1085f2794b014986e4b788
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
services/core/java/com/android/server/connectivity/Tethering.java