Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48357625 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Avatar] Clear GattInstance in FactoryReset" am: 2933dc63

parents 316ded94 2933dc63
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ class Gatt(private val context: Context) : GATTImplBase(), Closeable {
  override fun close() {
    serverManager.server.close()
    mScope.cancel()
    // Clear existing Gatt instances to fix flakiness: b/279599889
    GattInstance.clearAllInstances()
  }

  override fun exchangeMTU(
+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,9 @@ class GattInstance(val mDevice: BluetoothDevice, val mTransport: Int, val mConte
      requireNotNull(instance) { "Unable to find GATT instance for $address" }
      return instance
    }
    fun clearAllInstances() {
        gattInstances.clear()
    }
  }

  private val mCallback =