diff options
author | jrior001 <jriordan001@gmail.com> | 2016-10-15 11:00:19 -0400 |
---|---|---|
committer | Jason Riordan <jriordan001@gmail.com> | 2016-10-29 18:37:35 -0700 |
commit | 433fca998fa7cc4a114216e4d445e4b3b54d288a (patch) | |
tree | b076b2c8c2baee338292bc9250376cf1074eee7a | |
parent | 392cf1ef859075bd9318c8add952b051ee4c650a (diff) | |
download | android_packages_apps_Dialer-433fca998fa7cc4a114216e4d445e4b3b54d288a.tar.gz android_packages_apps_Dialer-433fca998fa7cc4a114216e4d445e4b3b54d288a.tar.bz2 android_packages_apps_Dialer-433fca998fa7cc4a114216e4d445e4b3b54d288a.zip |
incallui: remove qti framework dependency for DSDA
Currently the check for DSDA enabled devices relies on a qcom specific
funcction. Allow non-qcom devices to enable the DSDA InCallUi with the
persist.radio.multisim.config prop already used elsewhere.
Change-Id: Id91641e026c6108124a839aa84e5195a5efa6594
-rw-r--r-- | InCallUI/src/com/android/incallui/QtiCallUtils.java | 29 |
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) { |