@@ -50,9 +50,11 @@ sealed class ConnectionState {
5050 data object Disconnecting : ConnectionState ()
5151
5252 /* *
53- * Device is disconnected.
53+ * Device has disconnected.
5454 *
55- * @param reason Reason of disconnection, or _null_ if no connection attempt was made.
55+ * This state may be immediately followed by [Closed] state.
56+ *
57+ * @param reason Reason of disconnection.
5658 */
5759 data class Disconnected (val reason : Reason ): ConnectionState() {
5860
@@ -68,8 +70,16 @@ sealed class ConnectionState {
6870 data class Unknown (val status : Int ): Reason()
6971 /* * The local device initiated disconnection. */
7072 data object TerminateLocalHost : Reason ()
71- /* * The remote device initiated graceful disconnection. */
73+ /* * The remote device initiated graceful disconnection. */
7274 data object TerminatePeerUser : Reason ()
75+ /* *
76+ * Insufficient authentication.
77+ *
78+ * This error is returned when the Android device tries to enable security on a
79+ * device that had its bond information removed. Remove bond information on the phone
80+ * and retry.
81+ */
82+ data object InsufficientAuthentication : Reason ()
7383 /* * The device got out of range or has turned off. */
7484 data object LinkLoss : Reason ()
7585 /* * Connection attempt was cancelled. */
@@ -81,7 +91,7 @@ sealed class ConnectionState {
8191 * background connection list. RPA is allowed for direct connection, as such request
8292 * times out after a short period of time.
8393 *
84- * See: https://cs.android.com/android/platform/superproject/main/+/main:packages/modules/Bluetooth/system/stack/gatt/gatt_api.cc;l=1450
94+ * See: [Source code]( https://cs.android.com/android/platform/superproject/main/+/main:packages/modules/Bluetooth/system/stack/gatt/gatt_api.cc;l=1498)
8595 */
8696 data object UnsupportedAddress : Reason ()
8797 /* *
0 commit comments