diff options
author | Sanket Agarwal <sanketa@google.com> | 2016-06-27 20:13:54 -0700 |
---|---|---|
committer | Sanket Agarwal <sanketa@google.com> | 2016-06-29 18:58:09 +0000 |
commit | b61166fbeaef2d5a788d93d75e485ad80e3c57f6 (patch) | |
tree | 143caf671c22f765b76cb54c74eb53215dce9a55 /framework/java/android/bluetooth/BluetoothHeadsetClientCall.java | |
parent | 557f349f4b1b81888f644e58c4fb1ddec8b1650d (diff) |
Use UUIDs for call management in Headset Client (HF)
Using UUIDs that are managed by the service gives more control and error
handling in the service since it has control over assigning them.
Bug: b/29788044
Change-Id: I8483f8e61a33302ba95d544828947d7fb4a21be9
(cherry picked from commit dbeab2c6e12693fe9b06b6a680677da5325c9230)
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHeadsetClientCall.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHeadsetClientCall.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHeadsetClientCall.java b/framework/java/android/bluetooth/BluetoothHeadsetClientCall.java index c73bc3cb53..420c079f5f 100644 --- a/framework/java/android/bluetooth/BluetoothHeadsetClientCall.java +++ b/framework/java/android/bluetooth/BluetoothHeadsetClientCall.java @@ -18,6 +18,7 @@ package android.bluetooth; import android.os.Parcel; import android.os.Parcelable; +import android.os.SystemClock; import java.util.UUID; @@ -70,6 +71,7 @@ public final class BluetoothHeadsetClientCall implements Parcelable { private boolean mMultiParty; private final boolean mOutgoing; private final UUID mUUID; + private final long mCreationElapsedMilli; /** * Creates BluetoothHeadsetClientCall instance. @@ -88,6 +90,7 @@ public final class BluetoothHeadsetClientCall implements Parcelable { mNumber = number != null ? number : ""; mMultiParty = multiParty; mOutgoing = outgoing; + mCreationElapsedMilli = SystemClock.elapsedRealtime(); } /** @@ -171,6 +174,15 @@ public final class BluetoothHeadsetClientCall implements Parcelable { } /** + * Gets call's creation time in millis since epoch. + * + * @return long representing the creation time. + */ + public long getCreationElapsedMilli() { + return mCreationElapsedMilli; + } + + /** * Checks if call is an active call in a conference mode (aka multi party). * * @return <code>true</code> if call is a multi party call, |