summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/CallList.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-05-06 09:50:12 -0700
committerTyler Gunn <tgunn@google.com>2015-05-06 10:37:32 -0700
commite7face9767de504ebae1e4615e810bf0d3af1b62 (patch)
tree23915fb9bb7d82159f0ab8b3ff7ff06299ee3bf2 /src/com/android/incallui/CallList.java
parent8245f69a14b04c60f0bc30976ea2e74db85c5683 (diff)
downloadpackages_apps_InCallUI-e7face9767de504ebae1e4615e810bf0d3af1b62.tar.gz
packages_apps_InCallUI-e7face9767de504ebae1e4615e810bf0d3af1b62.tar.bz2
packages_apps_InCallUI-e7face9767de504ebae1e4615e810bf0d3af1b62.zip
Fix issue where fast 180 degree landscape rotation is not detected.
- Cleaned up imports in InCallActivity. - Added new OrientationEventListener to listen for orientation changes to the device. This listener returns the current device rotation in degrees. Use the windowManager to get the current display rotation (e.g. in coarse 90 degree, 180, etc). - This solves the problem - can now detect rotation from landscape to landscape. Bug: 20727115 Change-Id: Icfad2b26083bb8236e9f4fe5580e3828cdef11b8
Diffstat (limited to 'src/com/android/incallui/CallList.java')
-rw-r--r--src/com/android/incallui/CallList.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/incallui/CallList.java b/src/com/android/incallui/CallList.java
index e937bb16..bec81ec5 100644
--- a/src/com/android/incallui/CallList.java
+++ b/src/com/android/incallui/CallList.java
@@ -516,7 +516,12 @@ public class CallList {
*/
public void notifyCallsOfDeviceRotation(int rotation) {
for (Call call : mCallById.values()) {
- if (call.getVideoCall() != null) {
+ // First, ensure a VideoCall is set on the call so that the change can be sent to the
+ // provider (a VideoCall can be present for a call that does not currently have video,
+ // but can be upgraded to video).
+ // Second, ensure that the call videoState has video enabled (there is no need to set
+ // device orientation on a voice call which has not yet been upgraded to video).
+ if (call.getVideoCall() != null && CallUtils.isVideoCall(call)) {
call.getVideoCall().setDeviceOrientation(rotation);
}
}