Messaging: Do not check preferred sim if conversation sim exist
Fix unable to send message when preferred sms sim is set to "Ask every time". Change-Id: I0406985e29ded8157ae5252db2dd814856a93376
This commit is contained in:
@@ -68,6 +68,7 @@ import com.android.messaging.util.ContentType;
|
||||
import com.android.messaging.util.LogUtil;
|
||||
import com.android.messaging.util.MediaUtil;
|
||||
import com.android.messaging.util.OsUtil;
|
||||
import com.android.messaging.util.PhoneUtils;
|
||||
import com.android.messaging.util.SafeAsyncTask;
|
||||
import com.android.messaging.util.UiUtils;
|
||||
import com.android.messaging.util.UriUtil;
|
||||
@@ -381,7 +382,8 @@ public class ComposeMessageView extends LinearLayout
|
||||
return;
|
||||
}
|
||||
// Check the host for pre-conditions about any action.
|
||||
if (mHost.isReadyForAction()) {
|
||||
if (mHost.isReadyForAction() && (mHost.getConversationSelfSubId() > 0
|
||||
|| PhoneUtils.getDefault().getHasPreferredSmsSim())) {
|
||||
mInputManager.showHideSimSelector(false /* show */, true /* animate */);
|
||||
final String messageToSend = mComposeEditText.getText().toString();
|
||||
mBinding.getData().setMessageText(messageToSend);
|
||||
|
||||
@@ -342,10 +342,8 @@ public class UiUtils {
|
||||
|
||||
// Have all the conditions been met:
|
||||
// Supports SMS?
|
||||
// Has a preferred sim?
|
||||
// Is the default sms app?
|
||||
return phoneUtils.isSmsCapable() &&
|
||||
phoneUtils.getHasPreferredSmsSim() &&
|
||||
phoneUtils.isDefaultSmsApp();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user