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

Commit 8f2bd80e authored by Thomas Girardier's avatar Thomas Girardier Committed by Gerrit Code Review
Browse files

Merge changes I72d0f436,Ie5d28789

* changes:
  PTS-bot: fix reset
  PTS-bot: fix AVDTP/SRC/INT/SIG/SMG/BV-17-C
parents 58a5a600 543f0d5b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,7 @@ class IUT:
            description: MMI description.
            description: MMI description.
            style: MMI popup style, unused for now.
            style: MMI popup style, unused for now.
        """
        """
        print(f'{profile} mmi: {description}', file=sys.stderr)
        print(f'{profile} mmi: {interaction}', file=sys.stderr)


        # Handles A2DP and AVDTP MMIs.
        # Handles A2DP and AVDTP MMIs.
        if profile in ('A2DP', 'AVDTP'):
        if profile in ('A2DP', 'AVDTP'):
+9 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ import io.grpc.stub.StreamObserver
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel
import kotlinx.coroutines.cancel
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filter
@@ -118,6 +119,10 @@ class A2dp(val context: Context) : A2DPImplBase() {
          throw Status.UNKNOWN.asException()
          throw Status.UNKNOWN.asException()
        }
        }
      }
      }

      //TODO: b/234891800, AVDTP start request sometimes never sent if playback starts too early.
      delay(2000L)

      val source = Source.newBuilder().setCookie(request.connection.cookie).build()
      val source = Source.newBuilder().setCookie(request.connection.cookie).build()
      OpenSourceResponse.newBuilder().setSource(source).build()
      OpenSourceResponse.newBuilder().setSource(source).build()
    }
    }
@@ -152,6 +157,10 @@ class A2dp(val context: Context) : A2DPImplBase() {
          throw Status.UNKNOWN.asException()
          throw Status.UNKNOWN.asException()
        }
        }
      }
      }

      //TODO: b/234891800, AVDTP start request sometimes never sent if playback starts too early.
      delay(2000L)

      val source = Source.newBuilder().setCookie(request.connection.cookie).build()
      val source = Source.newBuilder().setCookie(request.connection.cookie).build()
      WaitSourceResponse.newBuilder().setSource(source).build()
      WaitSourceResponse.newBuilder().setSource(source).build()
    }
    }
+5 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ import io.grpc.stub.StreamObserver
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel
import kotlinx.coroutines.cancel
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filter
@@ -87,6 +88,10 @@ class Host(private val context: Context, private val server: Server) : HostImplB
        bluetoothAdapter.disable()
        bluetoothAdapter.disable()
        stateFlow.filter { it == BluetoothAdapter.STATE_OFF }.first()
        stateFlow.filter { it == BluetoothAdapter.STATE_OFF }.first()
      }
      }

      //TODO: b/234892968
      delay(2000L)

      bluetoothAdapter.enable()
      bluetoothAdapter.enable()
      stateFlow.filter { it == BluetoothAdapter.STATE_ON }.first()
      stateFlow.filter { it == BluetoothAdapter.STATE_ON }.first()