Video call accepted as audio shows up as video call in call log.

- Modified video state history tracking in Telecom Call to only track
video state history when call is active.  This ensures while call is
dialing or ringing we do not capture the video state.

Bug: 20066023
Change-Id: I4c8227420ccd95fdd6f4e6e164b56ffa801114ca
diff --git a/src/com/android/server/telecom/Call.java b/src/com/android/server/telecom/Call.java
index 0654ae3..d20fdf5 100644
--- a/src/com/android/server/telecom/Call.java
+++ b/src/com/android/server/telecom/Call.java
@@ -1428,7 +1428,15 @@
      */
     public void setVideoState(int videoState) {
         // Track which video states were applicable over the duration of the call.
-        mVideoStateHistory = mVideoStateHistory | videoState;
+        // Only track the call state when the call is active or disconnected.  This ensures we do
+        // not include the video state when:
+        // - Call is incoming (but not answered).
+        // - Call it outgoing (but not answered).
+        // We include the video state when disconnected to ensure that rejected calls reflect the
+        // appropriate video state.
+        if (isActive() || getState() == CallState.DISCONNECTED) {
+            mVideoStateHistory = mVideoStateHistory | videoState;
+        }
 
         mVideoState = videoState;
         for (Listener l : mListeners) {