Wiring videoState through from telephony.
- Adding call video state history tracking, which is used to ensure
we log whether video was active at any point to the call log.
- Adding logging of video state to call log.
Bug: 16285417
Bug: 16013178
Change-Id: I3b47c88b13dc73941ca80463fc0c6ae7cdd86749
diff --git a/src/com/android/telecomm/ConnectionServiceWrapper.java b/src/com/android/telecomm/ConnectionServiceWrapper.java
index a47dc09..fb9d34c 100644
--- a/src/com/android/telecomm/ConnectionServiceWrapper.java
+++ b/src/com/android/telecomm/ConnectionServiceWrapper.java
@@ -76,6 +76,7 @@
private static final int MSG_SET_STATUS_HINTS = 18;
private static final int MSG_SET_HANDLE = 19;
private static final int MSG_SET_CALLER_DISPLAY_NAME = 20;
+ private static final int MSG_SET_VIDEO_STATE = 21;
private final Handler mHandler = new Handler() {
@Override
@@ -308,6 +309,12 @@
}
break;
}
+ case MSG_SET_VIDEO_STATE: {
+ call = mCallIdMapper.getCall(msg.obj);
+ if (call != null) {
+ call.setVideoState(msg.arg1);
+ }
+ }
}
}
};
@@ -444,6 +451,13 @@
}
@Override
+ public void setVideoState(String callId, int videoState) {
+ logIncoming("setVideoState %s %d", callId, videoState);
+ mCallIdMapper.checkValidCallId(callId);
+ mHandler.obtainMessage(MSG_SET_VIDEO_STATE, videoState, 0, callId).sendToTarget();
+ }
+
+ @Override
public void setAudioModeIsVoip(String callId, boolean isVoip) {
logIncoming("setAudioModeIsVoip %s %b", callId, isVoip);
mCallIdMapper.checkValidCallId(callId);