OSDN Git Service

SystemUI: fix automatic pairing of BT keyboards
authorDmitry Torokhov <dtor@google.com>
Thu, 22 Oct 2015 17:07:53 +0000 (10:07 -0700)
committerDmitry Torokhov <dtor@google.com>
Thu, 22 Oct 2015 17:19:32 +0000 (10:19 -0700)
commit79f00cf06f5e70047d73b48d20910b967353b075
tree3ad48824ed0f5e16036b1e628028daffc23dc0c5
parent9582e151964be60457d4abd712857fb1e8a4586d
SystemUI: fix automatic pairing of BT keyboards

After reset (docking) Pixel C Keyboard that was previously paired with
a device goes into so-called non-discoverable mode, where it will
establish connection only with device that it has connected before. When
scanning for available devices we need to wait till the keyboard starts
advertising itself as discoverable, and only then try to pair.

Also, let's flush the device cache when we attach the base to make sure
the device that we seen before and cached again in the right state after
reset.

Bug: 24915541
Change-Id: I136c1c4235080a25529b4b1c2b1da9bc18508811
packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java