Loading java/com/android/dialer/precall/impl/CallingAccountSelector.java +12 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import com.android.dialer.preferredsim.PreferredSimFallbackContract; import com.android.dialer.preferredsim.PreferredSimFallbackContract.PreferredSim; import com.android.dialer.preferredsim.suggestion.SimSuggestionComponent; import com.android.dialer.preferredsim.suggestion.SuggestionProvider.Suggestion; import com.android.dialer.telecom.TelecomUtil; import com.google.common.base.Optional; import java.util.ArrayList; import java.util.List; Loading Loading @@ -87,6 +88,17 @@ public class CallingAccountSelector implements PreCallAction { if (accounts.size() <= 1) { return false; } if (TelecomUtil.isInManagedCall(context)) { // Most devices are DSDS (dual SIM dual standby) which only one SIM can have active calls at // a time. Telecom will ignore the phone account handle and use the current active SIM, thus // there's no point of selecting SIMs // TODO(a bug): let the user know selections are not available and preferred SIM is not // used // TODO(twyen): support other dual SIM modes when the API is exposed. return false; } return true; } Loading java/com/android/incallui/CallButtonPresenter.java +5 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,11 @@ public class CallButtonPresenter && call.getState() != DialerCall.State.CONNECTING; mOtherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle()); boolean showSwapSim = mOtherAccount != null && DialerCall.State.isDialing(call.getState()); boolean showSwapSim = mOtherAccount != null && DialerCall.State.isDialing(call.getState()) // Most devices cannot make calls on 2 SIMs at the same time. && InCallPresenter.getInstance().getCallList().getAllCalls().size() == 1; mInCallButtonUi.showButton(InCallButtonIds.BUTTON_AUDIO, true); mInCallButtonUi.showButton(InCallButtonIds.BUTTON_SWAP, showSwap); Loading Loading
java/com/android/dialer/precall/impl/CallingAccountSelector.java +12 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import com.android.dialer.preferredsim.PreferredSimFallbackContract; import com.android.dialer.preferredsim.PreferredSimFallbackContract.PreferredSim; import com.android.dialer.preferredsim.suggestion.SimSuggestionComponent; import com.android.dialer.preferredsim.suggestion.SuggestionProvider.Suggestion; import com.android.dialer.telecom.TelecomUtil; import com.google.common.base.Optional; import java.util.ArrayList; import java.util.List; Loading Loading @@ -87,6 +88,17 @@ public class CallingAccountSelector implements PreCallAction { if (accounts.size() <= 1) { return false; } if (TelecomUtil.isInManagedCall(context)) { // Most devices are DSDS (dual SIM dual standby) which only one SIM can have active calls at // a time. Telecom will ignore the phone account handle and use the current active SIM, thus // there's no point of selecting SIMs // TODO(a bug): let the user know selections are not available and preferred SIM is not // used // TODO(twyen): support other dual SIM modes when the API is exposed. return false; } return true; } Loading
java/com/android/incallui/CallButtonPresenter.java +5 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,11 @@ public class CallButtonPresenter && call.getState() != DialerCall.State.CONNECTING; mOtherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle()); boolean showSwapSim = mOtherAccount != null && DialerCall.State.isDialing(call.getState()); boolean showSwapSim = mOtherAccount != null && DialerCall.State.isDialing(call.getState()) // Most devices cannot make calls on 2 SIMs at the same time. && InCallPresenter.getInstance().getCallList().getAllCalls().size() == 1; mInCallButtonUi.showButton(InCallButtonIds.BUTTON_AUDIO, true); mInCallButtonUi.showButton(InCallButtonIds.BUTTON_SWAP, showSwap); Loading