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>
Thu, 5 May 2016 17:50:23 +0000 (01:50 +0800)
commit13ea27fcc8b9d4f5cf81a1ece1055b21a8e95261
treece2807292db4733ed35478337895cdc9735f8cc1
parent70ee51faf1ba47ce596134efbde180f1f0e7ebc5
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