Loading java/com/android/dialer/telecom/TelecomUtil.java +6 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.net.Uri; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.provider.CallLog.Calls; import android.provider.Settings; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.RequiresPermission; Loading Loading @@ -299,6 +300,11 @@ public abstract class TelecomUtil { return instance.isDefaultDialer(context); } public static boolean isRttEnabled(Context context) { return Settings.System.getInt(context.getContentResolver(), Settings.System.RTT_CALLING_MODE, 0) != 0; } /** @return the other SIM based PhoneAccountHandle that is not {@code currentAccount} */ @Nullable @RequiresPermission(permission.READ_PHONE_STATE) Loading java/com/android/incallui/CallButtonPresenter.java +9 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,12 @@ public class CallButtonPresenter call.getVideoTech().upgradeToVideo(context); } @Override public void changeToRttClicked() { LogUtil.enterBlock("CallButtonPresenter.changeToRttClicked"); call.sendRttUpgradeRequest(); } @Override public void onEndCallClicked() { LogUtil.i("CallButtonPresenter.onEndCallClicked", "call: " + call); Loading Loading @@ -473,6 +479,8 @@ public class CallButtonPresenter // Most devices cannot make calls on 2 SIMs at the same time. && InCallPresenter.getInstance().getCallList().getAllCalls().size() == 1; boolean showUpgradeToRtt = TelecomUtil.isRttEnabled(context) && call.canUpgradeToRttCall(); inCallButtonUi.showButton(InCallButtonIds.BUTTON_AUDIO, true); inCallButtonUi.showButton(InCallButtonIds.BUTTON_SWAP, showSwap); inCallButtonUi.showButton(InCallButtonIds.BUTTON_HOLD, showHold); Loading @@ -482,6 +490,7 @@ public class CallButtonPresenter inCallButtonUi.showButton(InCallButtonIds.BUTTON_ADD_CALL, true); inCallButtonUi.enableButton(InCallButtonIds.BUTTON_ADD_CALL, showAddCall); inCallButtonUi.showButton(InCallButtonIds.BUTTON_UPGRADE_TO_VIDEO, showUpgradeToVideo); inCallButtonUi.showButton(InCallButtonIds.BUTTON_UPGRADE_TO_RTT, showUpgradeToRtt); inCallButtonUi.showButton(InCallButtonIds.BUTTON_DOWNGRADE_TO_AUDIO, showDowngradeToAudio); inCallButtonUi.showButton( InCallButtonIds.BUTTON_SWITCH_CAMERA, Loading java/com/android/incallui/InCallActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -1468,7 +1468,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity return new ShouldShowUiResult(false, null); } if (call.isRttCall()) { if (call.isActiveRttCall()) { LogUtil.i("InCallActivity.getShouldShowRttUi", "found rtt call"); return new ShouldShowUiResult(true, call); } Loading Loading @@ -1520,7 +1520,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity AnswerScreen answerScreen = AnswerBindings.createAnswerScreen( call.getId(), call.isRttCall(), call.isActiveRttCall(), call.isVideoCall(), isVideoUpgradeRequest, call.getVideoTech().isSelfManagedCamera(), Loading java/com/android/incallui/ProximitySensor.java +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ public class ProximitySensor DialerCall activeCall = callList.getActiveCall(); boolean isVideoCall = activeCall != null && activeCall.isVideoCall(); boolean isRttCall = activeCall != null && activeCall.isRttCall(); boolean isRttCall = activeCall != null && activeCall.isActiveRttCall(); if (isOffhook != isPhoneOffhook || this.isVideoCall != isVideoCall Loading java/com/android/incallui/call/CallList.java +9 −0 Original line number Diff line number Diff line Loading @@ -514,6 +514,15 @@ public class CallList implements DialerCallDelegate { return call != null && call != getDisconnectingCall() && call != getDisconnectedCall(); } boolean hasActiveRttCall() { for (DialerCall call : getAllCalls()) { if (call.isActiveRttCall()) { return true; } } return false; } /** * Returns the first call found in the call map with the upgrade to video modification state. * Loading Loading
java/com/android/dialer/telecom/TelecomUtil.java +6 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.net.Uri; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.provider.CallLog.Calls; import android.provider.Settings; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.RequiresPermission; Loading Loading @@ -299,6 +300,11 @@ public abstract class TelecomUtil { return instance.isDefaultDialer(context); } public static boolean isRttEnabled(Context context) { return Settings.System.getInt(context.getContentResolver(), Settings.System.RTT_CALLING_MODE, 0) != 0; } /** @return the other SIM based PhoneAccountHandle that is not {@code currentAccount} */ @Nullable @RequiresPermission(permission.READ_PHONE_STATE) Loading
java/com/android/incallui/CallButtonPresenter.java +9 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,12 @@ public class CallButtonPresenter call.getVideoTech().upgradeToVideo(context); } @Override public void changeToRttClicked() { LogUtil.enterBlock("CallButtonPresenter.changeToRttClicked"); call.sendRttUpgradeRequest(); } @Override public void onEndCallClicked() { LogUtil.i("CallButtonPresenter.onEndCallClicked", "call: " + call); Loading Loading @@ -473,6 +479,8 @@ public class CallButtonPresenter // Most devices cannot make calls on 2 SIMs at the same time. && InCallPresenter.getInstance().getCallList().getAllCalls().size() == 1; boolean showUpgradeToRtt = TelecomUtil.isRttEnabled(context) && call.canUpgradeToRttCall(); inCallButtonUi.showButton(InCallButtonIds.BUTTON_AUDIO, true); inCallButtonUi.showButton(InCallButtonIds.BUTTON_SWAP, showSwap); inCallButtonUi.showButton(InCallButtonIds.BUTTON_HOLD, showHold); Loading @@ -482,6 +490,7 @@ public class CallButtonPresenter inCallButtonUi.showButton(InCallButtonIds.BUTTON_ADD_CALL, true); inCallButtonUi.enableButton(InCallButtonIds.BUTTON_ADD_CALL, showAddCall); inCallButtonUi.showButton(InCallButtonIds.BUTTON_UPGRADE_TO_VIDEO, showUpgradeToVideo); inCallButtonUi.showButton(InCallButtonIds.BUTTON_UPGRADE_TO_RTT, showUpgradeToRtt); inCallButtonUi.showButton(InCallButtonIds.BUTTON_DOWNGRADE_TO_AUDIO, showDowngradeToAudio); inCallButtonUi.showButton( InCallButtonIds.BUTTON_SWITCH_CAMERA, Loading
java/com/android/incallui/InCallActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -1468,7 +1468,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity return new ShouldShowUiResult(false, null); } if (call.isRttCall()) { if (call.isActiveRttCall()) { LogUtil.i("InCallActivity.getShouldShowRttUi", "found rtt call"); return new ShouldShowUiResult(true, call); } Loading Loading @@ -1520,7 +1520,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity AnswerScreen answerScreen = AnswerBindings.createAnswerScreen( call.getId(), call.isRttCall(), call.isActiveRttCall(), call.isVideoCall(), isVideoUpgradeRequest, call.getVideoTech().isSelfManagedCamera(), Loading
java/com/android/incallui/ProximitySensor.java +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ public class ProximitySensor DialerCall activeCall = callList.getActiveCall(); boolean isVideoCall = activeCall != null && activeCall.isVideoCall(); boolean isRttCall = activeCall != null && activeCall.isRttCall(); boolean isRttCall = activeCall != null && activeCall.isActiveRttCall(); if (isOffhook != isPhoneOffhook || this.isVideoCall != isVideoCall Loading
java/com/android/incallui/call/CallList.java +9 −0 Original line number Diff line number Diff line Loading @@ -514,6 +514,15 @@ public class CallList implements DialerCallDelegate { return call != null && call != getDisconnectingCall() && call != getDisconnectedCall(); } boolean hasActiveRttCall() { for (DialerCall call : getAllCalls()) { if (call.isActiveRttCall()) { return true; } } return false; } /** * Returns the first call found in the call map with the upgrade to video modification state. * Loading