summaryrefslogtreecommitdiff
path: root/core/java/android/bluetooth/BluetoothHeadsetClientCall.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2021-06-03 09:26:53 -0600
committerJeff Sharkey <jsharkey@android.com>2021-06-03 12:14:17 -0600
commit22ca72a67534a292ca81cbd43311b9e1bcfa1155 (patch)
tree2ac51cfc84b195be695193bd1a290b69b85762af /core/java/android/bluetooth/BluetoothHeadsetClientCall.java
parente77df8f5386c55bb872c469bfa59c2c31c61fa9f (diff)
More Binder call AttributionSource assignment.
Since developers can use a BluetoothDevice object can make remote calls, it needs to have an accurate AttributionSource. Previous CLs had updated many places where these BluetoothDevice instances were passed across Binder interfaces, but this change updates several remaining locations which had been missed. Introduces new "Attributable" marker interface to offer consistent tooling when applying AttributionSource updates. Bug: 187097694 Test: atest BluetoothInstrumentationTests Change-Id: Icad3b9726591f0fbad58a493cefa5a0af7648280
Diffstat (limited to 'core/java/android/bluetooth/BluetoothHeadsetClientCall.java')
-rw-r--r--core/java/android/bluetooth/BluetoothHeadsetClientCall.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothHeadsetClientCall.java b/core/java/android/bluetooth/BluetoothHeadsetClientCall.java
index 219d1596fbf3..3f1ef8461250 100644
--- a/core/java/android/bluetooth/BluetoothHeadsetClientCall.java
+++ b/core/java/android/bluetooth/BluetoothHeadsetClientCall.java
@@ -16,7 +16,10 @@
package android.bluetooth;
+import android.annotation.NonNull;
import android.compat.annotation.UnsupportedAppUsage;
+import android.content.Attributable;
+import android.content.AttributionSource;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@@ -30,7 +33,7 @@ import java.util.UUID;
*
* @hide
*/
-public final class BluetoothHeadsetClientCall implements Parcelable {
+public final class BluetoothHeadsetClientCall implements Parcelable, Attributable {
/* Call state */
/**
@@ -98,6 +101,11 @@ public final class BluetoothHeadsetClientCall implements Parcelable {
mCreationElapsedMilli = SystemClock.elapsedRealtime();
}
+ /** {@hide} */
+ public void setAttributionSource(@NonNull AttributionSource attributionSource) {
+ Attributable.setAttributionSource(mDevice, attributionSource);
+ }
+
/**
* Sets call's state.
*