From f62092d487723bb12e75767f31bcc0fd27209adc Mon Sep 17 00:00:00 2001 From: linyuh Date: Thu, 7 Jun 2018 11:03:48 -0700 Subject: Set the preferred SIM when InCallActivity is not visible. Bug: 109653872 Test: N/A (InCallActivity is not testable, similar to cl/194824783). PiperOrigin-RevId: 199662982 Change-Id: I4effa2454246d852837d0878246898537f799980 --- java/com/android/incallui/InCallActivity.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'java/com') diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java index a550ddeae..46affdfcc 100644 --- a/java/com/android/incallui/InCallActivity.java +++ b/java/com/android/incallui/InCallActivity.java @@ -380,12 +380,6 @@ public class InCallActivity extends TransactionSafeFragmentActivity this, preferredAccountFuture, result -> { - if (!isVisible()) { - LogUtil.i( - "CallingAccountSelector.showPhoneAccountSelectionDialog", - "activity ended before result returned"); - return; - } String callId = waitingForAccountCall.getId(); if (result.getSelectedPhoneAccountHandle().isPresent()) { selectPhoneAccountListener.onPhoneAccountSelected( @@ -393,6 +387,13 @@ public class InCallActivity extends TransactionSafeFragmentActivity return; } + if (!isVisible()) { + LogUtil.i( + "InCallActivity.showPhoneAccountSelectionDialog", + "activity ended before result returned"); + return; + } + waitingForAccountCall.setPreferredAccountRecorder( new PreferredAccountRecorder( waitingForAccountCall.getNumber(), -- cgit v1.2.3