OSDN Git Service

Bluetooth: stop pairing service correctly
authorMarie Janssen <jamuraa@google.com>
Mon, 20 Mar 2017 18:01:19 +0000 (11:01 -0700)
committerMarie Janssen <jamuraa@google.com>
Mon, 20 Mar 2017 19:23:26 +0000 (12:23 -0700)
commitd06f49189c2e7f4dee280b513afc147a639eaf7b
tree65fbd816ea8fe0452ddd62aa197578d3dceeef4c
parentb7fa46453ac938e5c85ef870c17fea5890a221f9
Bluetooth: stop pairing service correctly

If BluetoothPairingService was stopped and restarted, it would receive
a null intent, and it also would not signal correctly when it needed to
be stopped.

Since restarts can happen, check that we are still bonding when starting.

Also prevent crashes when we might be called with a null intent.

Test: initiate pairing remotely, adb am kill service, notice no crash
Bug: 36130262
Change-Id: I408811935fdb36591826f4481d103cf4799db27e
src/com/android/settings/bluetooth/BluetoothPairingService.java