Loading java/com/android/dialer/dialpadview/res/layout/dialpad.xml +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ <Space style="@style/DialpadSpaceStyle"/> </LinearLayout> <Space android:id="@+id/end_call_space" android:layout_width="match_parent" android:layout_height="?attr/dialpad_end_key_spacing"/> </LinearLayout> java/com/android/incallui/DialpadFragment.java +8 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,8 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> private DtmfKeyListener dtmfKeyListener; private DialpadView dialpadView; private int currentTextColor; private View endCallSpace; private boolean shouldShowEndCallSpace = true; @Override public void onClick(View v) { Loading Loading @@ -152,6 +154,7 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> View backButton = dialpadView.findViewById(R.id.dialpad_back); backButton.setVisibility(View.VISIBLE); backButton.setOnClickListener(this); endCallSpace = dialpadView.findViewById(R.id.end_call_space); return parent; } Loading @@ -160,6 +163,7 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> public void onResume() { super.onResume(); updateColors(); endCallSpace.setVisibility(shouldShowEndCallSpace ? View.VISIBLE : View.GONE); } public void updateColors() { Loading Loading @@ -268,6 +272,10 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> } } public void setShouldShowEndCallSpace(boolean show) { shouldShowEndCallSpace = show; } /** * LinearLayout with getter and setter methods for the translationY property using floats, for * animation purposes. Loading java/com/android/incallui/InCallActivity.java +20 −5 Original line number Diff line number Diff line Loading @@ -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() { Loading @@ -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(); Loading Loading @@ -967,7 +971,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity } public boolean getCallCardFragmentVisible() { return didShowInCallScreen || didShowVideoCallScreen; return didShowInCallScreen || didShowVideoCallScreen || didShowRttCallScreen; } public void dismissKeyguard(boolean dismiss) { Loading Loading @@ -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(); } Loading @@ -1108,7 +1112,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity } public int getDialpadContainerId() { return getInCallScreen().getAnswerAndDialpadContainerResourceId(); return getInCallOrRttCallScreen().getAnswerAndDialpadContainerResourceId(); } @Override Loading Loading @@ -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); Loading java/com/android/incallui/rtt/impl/RttChatFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -333,11 +333,13 @@ public class RttChatFragment extends Fragment public void updateInCallScreenColors() {} @Override public void onInCallScreenDialpadVisibilityChange(boolean isShowing) {} public void onInCallScreenDialpadVisibilityChange(boolean isShowing) { overflowMenu.setDialpadButtonChecked(isShowing); } @Override public int getAnswerAndDialpadContainerResourceId() { return 0; return R.id.incall_dialpad_container; } @Override Loading java/com/android/incallui/rtt/impl/RttOverflowMenu.java +4 −0 Original line number Diff line number Diff line Loading @@ -87,4 +87,8 @@ public class RttOverflowMenu extends PopupWindow implements OnCheckedChangeListe speakerButton.setOnCheckedChangeListener(null); } } void setDialpadButtonChecked(boolean isChecked) { dialpadButton.setChecked(isChecked); } } Loading
java/com/android/dialer/dialpadview/res/layout/dialpad.xml +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ <Space style="@style/DialpadSpaceStyle"/> </LinearLayout> <Space android:id="@+id/end_call_space" android:layout_width="match_parent" android:layout_height="?attr/dialpad_end_key_spacing"/> </LinearLayout>
java/com/android/incallui/DialpadFragment.java +8 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,8 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> private DtmfKeyListener dtmfKeyListener; private DialpadView dialpadView; private int currentTextColor; private View endCallSpace; private boolean shouldShowEndCallSpace = true; @Override public void onClick(View v) { Loading Loading @@ -152,6 +154,7 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> View backButton = dialpadView.findViewById(R.id.dialpad_back); backButton.setVisibility(View.VISIBLE); backButton.setOnClickListener(this); endCallSpace = dialpadView.findViewById(R.id.end_call_space); return parent; } Loading @@ -160,6 +163,7 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> public void onResume() { super.onResume(); updateColors(); endCallSpace.setVisibility(shouldShowEndCallSpace ? View.VISIBLE : View.GONE); } public void updateColors() { Loading Loading @@ -268,6 +272,10 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> } } public void setShouldShowEndCallSpace(boolean show) { shouldShowEndCallSpace = show; } /** * LinearLayout with getter and setter methods for the translationY property using floats, for * animation purposes. Loading
java/com/android/incallui/InCallActivity.java +20 −5 Original line number Diff line number Diff line Loading @@ -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() { Loading @@ -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(); Loading Loading @@ -967,7 +971,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity } public boolean getCallCardFragmentVisible() { return didShowInCallScreen || didShowVideoCallScreen; return didShowInCallScreen || didShowVideoCallScreen || didShowRttCallScreen; } public void dismissKeyguard(boolean dismiss) { Loading Loading @@ -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(); } Loading @@ -1108,7 +1112,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity } public int getDialpadContainerId() { return getInCallScreen().getAnswerAndDialpadContainerResourceId(); return getInCallOrRttCallScreen().getAnswerAndDialpadContainerResourceId(); } @Override Loading Loading @@ -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); Loading
java/com/android/incallui/rtt/impl/RttChatFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -333,11 +333,13 @@ public class RttChatFragment extends Fragment public void updateInCallScreenColors() {} @Override public void onInCallScreenDialpadVisibilityChange(boolean isShowing) {} public void onInCallScreenDialpadVisibilityChange(boolean isShowing) { overflowMenu.setDialpadButtonChecked(isShowing); } @Override public int getAnswerAndDialpadContainerResourceId() { return 0; return R.id.incall_dialpad_container; } @Override Loading
java/com/android/incallui/rtt/impl/RttOverflowMenu.java +4 −0 Original line number Diff line number Diff line Loading @@ -87,4 +87,8 @@ public class RttOverflowMenu extends PopupWindow implements OnCheckedChangeListe speakerButton.setOnCheckedChangeListener(null); } } void setDialpadButtonChecked(boolean isChecked) { dialpadButton.setChecked(isChecked); } }