diff options
Diffstat (limited to 'java/com/android')
-rw-r--r-- | java/com/android/incallui/InCallActivity.java | 13 | ||||
-rw-r--r-- | java/com/android/incallui/InCallActivityCommon.java | 15 |
2 files changed, 13 insertions, 15 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java index cdab6b4f5..93534697c 100644 --- a/java/com/android/incallui/InCallActivity.java +++ b/java/com/android/incallui/InCallActivity.java @@ -34,6 +34,7 @@ import android.view.KeyEvent; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; +import android.view.WindowManager; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.ThreadUtil; @@ -90,6 +91,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity private boolean didShowAnswerScreen; private boolean didShowInCallScreen; private boolean didShowVideoCallScreen; + private boolean dismissKeyguard; private int[] backgroundDrawableColors; private GradientDrawable backgroundDrawable; private boolean isVisible; @@ -419,7 +421,16 @@ public class InCallActivity extends TransactionSafeFragmentActivity } public void dismissKeyguard(boolean dismiss) { - common.dismissKeyguard(dismiss); + if (dismissKeyguard == dismiss) { + return; + } + + dismissKeyguard = dismiss; + if (dismiss) { + getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); + } else { + getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); + } } public void showPostCharWaitDialog(String callId, String chars) { diff --git a/java/com/android/incallui/InCallActivityCommon.java b/java/com/android/incallui/InCallActivityCommon.java index 5a5d770d0..e97e6a001 100644 --- a/java/com/android/incallui/InCallActivityCommon.java +++ b/java/com/android/incallui/InCallActivityCommon.java @@ -102,7 +102,6 @@ public class InCallActivityCommon { private static Optional<Integer> audioRouteForTesting = Optional.absent(); private final InCallActivity inCallActivity; - private boolean dismissKeyguard; private boolean showPostCharWaitDialogOnResume; private String showPostCharWaitDialogCallId; private String showPostCharWaitDialogChars; @@ -525,18 +524,6 @@ public class InCallActivityCommon { return false; } - public void dismissKeyguard(boolean dismiss) { - if (dismissKeyguard == dismiss) { - return; - } - dismissKeyguard = dismiss; - if (dismiss) { - inCallActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); - } else { - inCallActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); - } - } - public void showPostCharWaitDialog(String callId, String chars) { if (inCallActivity.isVisible()) { PostCharDialogFragment fragment = new PostCharDialogFragment(callId, chars); @@ -902,7 +889,7 @@ public class InCallActivityCommon { outgoingCall.disconnect(); } - dismissKeyguard(true); + inCallActivity.dismissKeyguard(true); } boolean didShowAccountSelectionDialog = maybeShowAccountSelectionDialog(); |