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

Commit bc956f8d authored by Charlie Boutier's avatar Charlie Boutier Committed by Thomas Girardier
Browse files

[Pandora] - Enable A2DP/SNK/CC Tests

* Allow null proxy to have a2dp sink and source
on the same run.
* Enable the following test:
A2DP/SNK/CC/BV-01-I
A2DP/SNK/CC/BV-02-I
A2DP/SNK/CC/BV-05-I
A2DP/SNK/CC/BV-06-I
A2DP/SNK/CC/BV-07-I
A2DP/SNK/CC/BV-08-I

Bug: 245578454
Test: atest pts-bot:A2DP
Ignore-AOSP-First: cherry-pick from AOSP
Merged-In: Idd2e1e7dab3a78fb6a0a8616b692f41a6468edc3
Change-Id: Idd2e1e7dab3a78fb6a0a8616b692f41a6468edc3
parent 2ebdf673
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
        <option name="tests-config-file" value="pts_bot_tests_config.json" />
        <option name="physical" value="false" />
        <option name="profile" value="A2DP/SRC" />
        <option name="profile" value="A2DP/SNK/CC" />
        <option name="profile" value="AVCTP" />
        <option name="profile" value="AVDTP/SRC" />
        <option name="profile" value="AVRCP" />
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
        <option name="tests-config-file" value="pts_bot_tests_config.json" />
        <option name="physical" value="false" />
        <option name="profile" value="A2DP/SRC" />
        <option name="profile" value="A2DP/SNK/CC" />
        <option name="profile" value="AVCTP" />
        <option name="profile" value="AVDTP/SRC" />
        <option name="profile" value="AVRCP" />
+5 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.content.Intent
import android.content.IntentFilter
import android.net.MacAddress
import android.os.ParcelFileDescriptor
import android.util.Log
import androidx.test.platform.app.InstrumentationRegistry
import com.google.protobuf.ByteString
import io.grpc.stub.StreamObserver
@@ -224,7 +225,10 @@ fun <T> getProfileProxy(context: Context, profile: Int): T {
    }
    proxy = withTimeoutOrNull(5_000) { flow.first() }
  }
  return proxy!! as T
  if (proxy == null) {
    Log.w(TAG, "profile proxy $profile is null")
  }
  return proxy as T
}

fun Intent.getBluetoothDeviceExtra(): BluetoothDevice =