summaryrefslogtreecommitdiffstats
path: root/InCallUI/src/com/android/incallui/QtiCallUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI/src/com/android/incallui/QtiCallUtils.java')
-rw-r--r--InCallUI/src/com/android/incallui/QtiCallUtils.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/InCallUI/src/com/android/incallui/QtiCallUtils.java b/InCallUI/src/com/android/incallui/QtiCallUtils.java
index 4c3a5bf42..dfbe3ef0c 100644
--- a/InCallUI/src/com/android/incallui/QtiCallUtils.java
+++ b/InCallUI/src/com/android/incallui/QtiCallUtils.java
@@ -41,6 +41,7 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.IBinder;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.content.pm.ActivityInfo;
import android.telecom.InCallService.VideoCall;
import android.telephony.PhoneNumberUtils;
@@ -48,6 +49,7 @@ import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import com.android.incallui.util.TelecomCallUtil;
+import com.android.internal.telephony.TelephonyProperties;
import java.lang.reflect.*;
import java.util.ArrayList;
@@ -462,19 +464,24 @@ public class QtiCallUtils {
static Boolean dsdaEnabled = null;
static boolean isDsdaEnabled() {
- try {
- if (dsdaEnabled == null) {
- IExtTelephony mExtTelephony = getIExtTelephony();
- Log.d(LOG_TAG, "isDsdaEnabled, mExtTelephony:" + mExtTelephony);
- dsdaEnabled = mExtTelephony.isDsdaEnabled();
- return dsdaEnabled;
+ if (dsdaEnabled != null) {
+ return dsdaEnabled;
+ }
+
+ String config = SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG);
+ IExtTelephony extTelephony = getIExtTelephony();
+ if (extTelephony == null) {
+ dsdaEnabled = config.equals("dsda");
+ } else {
+ try {
+ dsdaEnabled = extTelephony.isDsdaEnabled();
+ } catch (RemoteException ex) {
+ Log.e(LOG_TAG, "RemoteException: " + ex);
+ dsdaEnabled = config.equals("dsda");
}
- } catch (RemoteException ex) {
- Log.e(LOG_TAG, "Exception : " + ex);
- } catch (NullPointerException ex) {
- Log.e(LOG_TAG, "Exception : " + ex);
}
- return (dsdaEnabled == null) ? false : dsdaEnabled;
+
+ return dsdaEnabled;
}
public static void downgradeToVoiceCall(final Call call) {