summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-10-30 11:29:47 -0700
committerYorke Lee <yorkelee@google.com>2014-10-30 11:29:47 -0700
commit843a666c3740ce41864ea8249465286316130dfa (patch)
treef4e2a3fd710c80e628c6667ce646de28dab9f02d /InCallUI
parente05642ba64551c6fc96dee79e65d223f9326a749 (diff)
Fix skipped frames in circular reveal animation
If FLAG_DISMISS_KEYGUARD was requested while in the middle of the outgoing call animation, the resulting window update led to a relayout/ view traversal in the middle of the animation that would cause skipped frames. To fix this, cache the current state of whether or not the keyguard has been dismissed, to prevent unnecessary changes to the window state. Also request for the keyguard to be dismissed in onCreate if we know that this is an outgoing call to prevent the unnecessary relayout later in the outgoing call flow. Bug: 18004737 Change-Id: I057a695ee513befbb410bfe1328d1aae45595896
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 27d17c4b5..8382c1639 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -90,6 +90,8 @@ public class InCallActivity extends Activity {
private boolean mIsLandscape;
private Animation mSlideIn;
private Animation mSlideOut;
+ private boolean mDismissKeyguard = false;
+
AnimationListenerAdapter mSlideOutListener = new AnimationListenerAdapter() {
@Override
public void onAnimationEnd(Animation animation) {
@@ -510,6 +512,8 @@ public class InCallActivity extends Activity {
TelecomAdapter.getInstance().disconnectCall(call.getId());
}
}
+
+ dismissKeyguard(true);
}
Call pendingAccountSelectionCall = CallList.getInstance().getWaitingForAccountCall();
@@ -606,6 +610,10 @@ public class InCallActivity extends Activity {
}
public void dismissKeyguard(boolean dismiss) {
+ if (mDismissKeyguard == dismiss) {
+ return;
+ }
+ mDismissKeyguard = dismiss;
if (dismiss) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
} else {