aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-01-26 13:43:58 -0800
committerTyler Gunn <tgunn@google.com>2015-01-26 21:52:33 +0000
commite70972cf6a3b48df1f7d036877eb28529e606ca9 (patch)
treefeae66985a7e4edd040d57fef41a789cbf273d3a /src/java/com
parent17faeca71d4d214a01fad1dea407eacbc05a499b (diff)
downloadandroid_frameworks_opt_telephony-e70972cf6a3b48df1f7d036877eb28529e606ca9.tar.gz
android_frameworks_opt_telephony-e70972cf6a3b48df1f7d036877eb28529e606ca9.tar.bz2
android_frameworks_opt_telephony-e70972cf6a3b48df1f7d036877eb28529e606ca9.zip
Correcting issue where video call icon shows for all calls.
The issue is in the ImsPhoneConnection code which checks for the VideoState of the current call. There was some work done at the RIL level to restructure what the various ImsCallProfile instances mean. When this code was written, getLocalCallProfile() was intended to refer to the capabilities of the current call. This has since changed so that there are 3 profiles: getCallProfile() -- the actual profile. getLocalCallProfile() -- what the local device supports. getRemoteCallProfile() -- what the remote device supports. On a video capable device, getLocalCallProfile() appears to now return DO NOT MERGE "Video", where it did not in the past. There must have been a change in the modem code recently which has caused this to show up now (where it was not an issue in the past). Bug: 19144923 Change-Id: If58d58a073feb05e3509570eaac4dc02749ca212 (cherry picked from commit 1259a64380b7943d0dfe965ee721b4d29ee662ce)
Diffstat (limited to 'src/java/com')
-rwxr-xr-xsrc/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java b/src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java
index 9022dc33b..aadc0c390 100755
--- a/src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java
+++ b/src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java
@@ -613,9 +613,23 @@ public class ImsPhoneConnection extends Connection {
boolean changed = false;
try {
+ // The actual call profile (negotiated between local and peer).
+ ImsCallProfile negotiatedCallProfile = imsCall.getCallProfile();
+ // The capabilities of the local device.
ImsCallProfile localCallProfile = imsCall.getLocalCallProfile();
+ // The capabilities of the peer device.
ImsCallProfile remoteCallProfile = imsCall.getRemoteCallProfile();
+ if (negotiatedCallProfile != null) {
+ int callType = negotiatedCallProfile.mCallType;
+
+ int newVideoState = ImsCallProfile.getVideoStateFromCallType(callType);
+ if (getVideoState() != newVideoState) {
+ setVideoState(newVideoState);
+ changed = true;
+ }
+ }
+
if (localCallProfile != null) {
int callType = localCallProfile.mCallType;
@@ -624,12 +638,6 @@ public class ImsPhoneConnection extends Connection {
setLocalVideoCapable(newLocalVideoCapable);
changed = true;
}
-
- int newVideoState = ImsCallProfile.getVideoStateFromCallType(callType);
- if (getVideoState() != newVideoState) {
- setVideoState(newVideoState);
- changed = true;
- }
}
int newAudioQuality =