summaryrefslogtreecommitdiffstats
path: root/java/com/android/incallui/InCallActivity.java
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-10-06 16:35:54 -0700
committerEric Erfanian <erfanian@google.com>2017-10-09 08:41:07 -0700
commit8efb49584f732014076390093ad90e23dce2e3ba (patch)
tree109b16036e6ca27d5fe8d1fb3bc4373ed64cdb03 /java/com/android/incallui/InCallActivity.java
parent30842b209934a98a0220673e2ab6b4bf500c15d3 (diff)
downloadandroid_packages_apps_Dialer-8efb49584f732014076390093ad90e23dce2e3ba.tar.gz
android_packages_apps_Dialer-8efb49584f732014076390093ad90e23dce2e3ba.tar.bz2
android_packages_apps_Dialer-8efb49584f732014076390093ad90e23dce2e3ba.zip
Implement InCallUiLock
When any locks are acquired, the InCallActivity will not auto-finish when there are no active calls. The disconnected cause and reject with SMS dialogs are migrated to use this API, which prevents the activity form ending before the user has finished interacting with the dialogs. Bug: 64215256 Test: InCallPresenterTest PiperOrigin-RevId: 171362338 Change-Id: Ied07ebbf6bee056ea6b2314c57f3324561b1651a
Diffstat (limited to 'java/com/android/incallui/InCallActivity.java')
-rw-r--r--java/com/android/incallui/InCallActivity.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index b82b6c994..2ba4d98a1 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -245,23 +245,16 @@ public class InCallActivity extends TransactionSafeFragmentActivity
return true;
}
- if (common.hasPendingDialogs()) {
- LogUtil.i(
- "InCallActivity.shouldCloseActivityOnFinish", "dialog is visible, not closing activity");
- return false;
- }
-
- AnswerScreen answerScreen = getAnswerScreen();
- if (answerScreen != null && answerScreen.hasPendingDialogs()) {
+ if (InCallPresenter.getInstance().isInCallUiLocked()) {
LogUtil.i(
"InCallActivity.shouldCloseActivityOnFinish",
- "answer screen dialog is visible, not closing activity");
+ "in call ui is locked, not closing activity");
return false;
}
LogUtil.i(
"InCallActivity.shouldCloseActivityOnFinish",
- "activity is visible and has no dialogs, allowing activity to close");
+ "activity is visible and has no locks, allowing activity to close");
return true;
}