diff options
author | Sandeep Kunta <skunta@codeaurora.org> | 2014-09-01 17:21:05 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:28:18 -0600 |
commit | 2f7270f2add532423ba4afe14518a24fdc32d7a0 (patch) | |
tree | c7a8365f5eb6f3a042581cce50a7dc90f2867be7 /telecomm/java/android/telecom/TelecomManager.java | |
parent | 551189e78d24402f2f4739b1e258d028c05351f4 (diff) | |
download | frameworks_base-2f7270f2add532423ba4afe14518a24fdc32d7a0.zip frameworks_base-2f7270f2add532423ba4afe14518a24fdc32d7a0.tar.gz frameworks_base-2f7270f2add532423ba4afe14518a24fdc32d7a0.tar.bz2 |
MSIM: Add support for DSDA.
1. Interface changes to inform local call hold and setActiveSubscription
to telephony service from telecomm service.
2. Interface in Telecomm manager to query active subscription and switch
to other subscription.
3. Add support in PhoneAccount to maintain LCH & active subscription
information.
4. Interface changes to inform sub switch between inCallUI and Telecomm
service.
Change-Id: I942122eab45a19ea30abc92c90228d9115c1df78
Diffstat (limited to 'telecomm/java/android/telecom/TelecomManager.java')
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 067e734..673adb2 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -22,6 +22,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; +import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; @@ -1039,6 +1040,37 @@ public class TelecomManager { } /** + * Returns current active subscription. + * Active subscription is the one from which calls are displayed to user when there are actve + * calls on both subscriptions. + * @hide + */ + public int getActiveSubscription() { + try { + if (isServiceConnected()) { + return getTelecomService().getActiveSubscription(); + } + } catch (RemoteException e) { + Log.e(TAG, "RemoteException attempting to get the active subsription.", e); + } + return SubscriptionManager.INVALID_SUBSCRIPTION_ID; + } + + /** + * switches to other active subscription. + * @hide + */ + public void switchToOtherActiveSub(int subId) { + try { + if (isServiceConnected()) { + getTelecomService().switchToOtherActiveSub(subId); + } + } catch (RemoteException e) { + Log.e(TAG, "RemoteException attempting to switchToOtherActiveSub.", e); + } + } + + /** * Registers a new incoming call. A {@link ConnectionService} should invoke this method when it * has an incoming call. The specified {@link PhoneAccountHandle} must have been registered * with {@link #registerPhoneAccount}. Once invoked, this method will cause the system to bind |