IMS-VT: Fix video remains paused issue.
Upon receiving a waiting call the video is put
on pause. However, video is not resumed when user
declines the waiting call which is incorrect.
This change ensures that video is resumed once
waiting call gets ended.
Change-Id: Iebc8a641082ec5312ab57050ebf865485851a4fd
CRs-Fixed: 1040855
diff --git a/InCallUI/src/com/android/incallui/VideoPauseController.java b/InCallUI/src/com/android/incallui/VideoPauseController.java
index 823b5a6..a953f1d 100644
--- a/InCallUI/src/com/android/incallui/VideoPauseController.java
+++ b/InCallUI/src/com/android/incallui/VideoPauseController.java
@@ -381,7 +381,7 @@
* @return {@code true} if the call is in incoming or waiting state, {@code false} otherwise.
*/
private static boolean isIncomingCall(CallContext call) {
- return call != null && isIncomingCall(call.getCall());
+ return call != null && isIncoming(call.getState());
}
/**
@@ -391,8 +391,17 @@
* @return {@code true} if the call is in incoming or waiting state, {@code false} otherwise.
*/
private static boolean isIncomingCall(Call call) {
- return call != null && (call.getState() == Call.State.CALL_WAITING
- || call.getState() == Call.State.INCOMING);
+ return call != null && isIncoming(call.getState());
+ }
+
+ /**
+ * Determines if a call state is incoming/waiting.
+ *
+ * @param state The call state
+ * @return {@code true} if the state is incoming or waiting, {@code false} otherwise.
+ */
+ private static boolean isIncoming(int state) {
+ return state == Call.State.CALL_WAITING || state == Call.State.INCOMING;
}
/**