summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/InCallActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/incallui/InCallActivity.java')
-rw-r--r--java/com/android/incallui/InCallActivity.java25
1 files changed, 20 insertions, 5 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index dee5e7eb1..6f2ad8bf3 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -830,7 +830,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
// Note: onInCallScreenDialpadVisibilityChange is called here to ensure that the dialpad FAB
// repositions itself.
- getInCallScreen().onInCallScreenDialpadVisibilityChange(show);
+ getInCallOrRttCallScreen().onInCallScreenDialpadVisibilityChange(show);
}
private void showDialpadFragment() {
@@ -842,11 +842,15 @@ public class InCallActivity extends TransactionSafeFragmentActivity
FragmentTransaction transaction = dialpadFragmentManager.beginTransaction();
DialpadFragment dialpadFragment = getDialpadFragment();
if (dialpadFragment == null) {
- transaction.add(getDialpadContainerId(), new DialpadFragment(), Tags.DIALPAD_FRAGMENT);
+ dialpadFragment = new DialpadFragment();
+ transaction.add(getDialpadContainerId(), dialpadFragment, Tags.DIALPAD_FRAGMENT);
} else {
transaction.show(dialpadFragment);
dialpadFragment.setUserVisibleHint(true);
}
+ // RTT call screen doesn't show end call button inside dialpad, thus the space reserved for end
+ // call button should be removed.
+ dialpadFragment.setShouldShowEndCallSpace(didShowInCallScreen);
transaction.commitAllowingStateLoss();
dialpadFragmentManager.executePendingTransactions();
@@ -967,7 +971,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
}
public boolean getCallCardFragmentVisible() {
- return didShowInCallScreen || didShowVideoCallScreen;
+ return didShowInCallScreen || didShowVideoCallScreen || didShowRttCallScreen;
}
public void dismissKeyguard(boolean dismiss) {
@@ -1100,7 +1104,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
@Nullable
public FragmentManager getDialpadFragmentManager() {
- InCallScreen inCallScreen = getInCallScreen();
+ InCallScreen inCallScreen = getInCallOrRttCallScreen();
if (inCallScreen != null) {
return inCallScreen.getInCallScreenFragment().getChildFragmentManager();
}
@@ -1108,7 +1112,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
}
public int getDialpadContainerId() {
- return getInCallScreen().getAnswerAndDialpadContainerResourceId();
+ return getInCallOrRttCallScreen().getAnswerAndDialpadContainerResourceId();
}
@Override
@@ -1586,6 +1590,17 @@ public class InCallActivity extends TransactionSafeFragmentActivity
return (RttCallScreen) getSupportFragmentManager().findFragmentByTag(Tags.RTT_CALL_SCREEN);
}
+ private InCallScreen getInCallOrRttCallScreen() {
+ InCallScreen inCallScreen = null;
+ if (didShowInCallScreen) {
+ inCallScreen = getInCallScreen();
+ }
+ if (didShowRttCallScreen) {
+ inCallScreen = getRttCallScreen();
+ }
+ return inCallScreen;
+ }
+
@Override
public void onPseudoScreenStateChanged(boolean isOn) {
LogUtil.i("InCallActivity.onPseudoScreenStateChanged", "isOn: " + isOn);