public void startDiscovery(View view) {
   if (defaultAdapter.isDiscovering()) {
     defaultAdapter.cancelDiscovery();
     msg = "取消扫描...";
   } else {
     leftAdapter.resetData(new ArrayList<>());
     defaultAdapter.startDiscovery();
     msg = "开始扫描...";
   }
   showMsg(view);
 }
  @Override
  protected void initViewData() {
    defaultAdapter = BluetoothHelper.getDefaultAdapter(this);
    if (defaultAdapter != null) {
      // 已经匹配过的设备
      final Set<BluetoothDevice> bondedDevices = defaultAdapter.getBondedDevices();
      for (BluetoothDevice device : bondedDevices) {
        rightAdapter.addLastItem(new BluetoothDeviceBean(device));
      }
    }
    log.info("initViewData");

    BluetoothDiscover.instance().addDiscoverListener(this);
  }
 @Override
 public void onDeviceDiscover(BluetoothDevice device) {
   leftAdapter.addLastItem(new BluetoothDeviceBean(device));
 }