diff options
Diffstat (limited to 'telecomm/java')
-rw-r--r-- | telecomm/java/android/telecom/Conference.java | 33 | ||||
-rw-r--r-- | telecomm/java/android/telecom/Connection.java | 2 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 3 |
3 files changed, 21 insertions, 17 deletions
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index 5fcff18aa5be..024bd303304f 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -29,7 +29,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Locale; -import java.util.Objects; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; @@ -82,7 +81,7 @@ public abstract class Conference extends Conferenceable { private int mConnectionProperties; private String mDisconnectMessage; private long mConnectTimeMillis = CONNECT_TIME_NOT_SPECIFIED; - private long mConnectElapsedTimeMillis = CONNECT_TIME_NOT_SPECIFIED; + private long mConnectionStartElapsedRealTime = CONNECT_TIME_NOT_SPECIFIED; private StatusHints mStatusHints; private Bundle mExtras; private Set<String> mPreviousExtraKeys; @@ -584,30 +583,36 @@ public abstract class Conference extends Conferenceable { } /** - * Sets the connection start time of the {@code Conference}. Should be specified in wall-clock - * time returned by {@link System#currentTimeMillis()}. + * Sets the connection start time of the {@code Conference}. This is used in the call log to + * indicate the date and time when the conference took place. + * <p> + * Should be specified in wall-clock time returned by {@link System#currentTimeMillis()}. * <p> * When setting the connection time, you should always set the connection elapsed time via - * {@link #setConnectionElapsedTime(long)}. + * {@link #setConnectionStartElapsedRealTime(long)} to ensure the duration is reflected. * - * @param connectionTimeMillis The connection time, in milliseconds. + * @param connectionTimeMillis The connection time, in milliseconds, as returned by + * {@link System#currentTimeMillis()}. */ public final void setConnectionTime(long connectionTimeMillis) { mConnectTimeMillis = connectionTimeMillis; } /** - * Sets the elapsed time since system boot when the {@link Conference} was connected. - * This is used to determine the duration of the {@link Conference}. + * Sets the start time of the {@link Conference} which is the basis for the determining the + * duration of the {@link Conference}. + * <p> + * You should use a value returned by {@link SystemClock#elapsedRealtime()} to ensure that time + * zone changes do not impact the conference duration. * <p> - * When setting the connection elapsed time, you should always set the connection time via + * When setting this, you should also set the connection time via * {@link #setConnectionTime(long)}. * - * @param connectionElapsedTime The connection time, as measured by + * @param connectionStartElapsedRealTime The connection time, as measured by * {@link SystemClock#elapsedRealtime()}. */ - public final void setConnectionElapsedTime(long connectionElapsedTime) { - mConnectElapsedTimeMillis = connectionElapsedTime; + public final void setConnectionStartElapsedRealTime(long connectionStartElapsedRealTime) { + mConnectionStartElapsedRealTime = connectionStartElapsedRealTime; } /** @@ -642,8 +647,8 @@ public abstract class Conference extends Conferenceable { * @return The elapsed time at which the {@link Conference} was connected. * @hide */ - public final long getConnectElapsedTime() { - return mConnectElapsedTimeMillis; + public final long getConnectionStartElapsedRealTime() { + return mConnectionStartElapsedRealTime; } /** diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index d8599e8ca1fa..322970544281 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -2299,7 +2299,7 @@ public abstract class Connection extends Conferenceable { * * @hide */ - public final void setConnectElapsedTimeMillis(long connectElapsedTimeMillis) { + public final void setConnectionStartElapsedRealTime(long connectElapsedTimeMillis) { mConnectElapsedTimeMillis = connectElapsedTimeMillis; } diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 211699ea5940..1547857f23e3 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -21,7 +21,6 @@ import android.app.Service; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; -import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; @@ -2007,7 +2006,7 @@ public abstract class ConnectionService extends Service { null : conference.getVideoProvider().getInterface(), conference.getVideoState(), conference.getConnectTimeMillis(), - conference.getConnectElapsedTime(), + conference.getConnectionStartElapsedRealTime(), conference.getStatusHints(), conference.getExtras()); |