hasBondInformation
Returns whether the system has bond information associated with this peripheral.
This is a statement about this Android device (the central): it stores a bond (keys) for the address of this peripheral. It does not say that the peripheral stores the bond information as well, as the peripheral may have lost it. It also does not mean that the peripheral is connected, or that the link is encrypted. Use encryptionState to check the latter.
Security Note
Having a bond information does not guarantee that the connection to the device is secure. Before Android 16 (API 36) it was not possible to check whether the link is encrypted, and older versions did not resume encryption when connecting to a bonded device, so a malicious device could pretend to be another one, and simply use an unencrypted link. Android should terminate the connection to a device for which it has a bond information if encryption cannot be resumed, but some devices don't do that. Instead, the bond state is set to BondState.Bonded and the connection is kept open without any security.