diff options
author | Cheuksan Wang <edwang@google.com> | 2015-04-24 21:39:01 +0000 |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2015-04-24 21:40:11 +0000 |
commit | 712cdaf48e83f71033fd097a5d2cc6238fdad6db (patch) | |
tree | ea62f8aad18a6c5f603778e967b3a57661af3324 /telephony/java/android | |
parent | 44a05269eeca97036e1d0cf769de4585b8b4f931 (diff) | |
parent | 0ced792cd69ff4e78b3ea84e6b38c1f1fddce82e (diff) | |
download | frameworks_base-712cdaf48e83f71033fd097a5d2cc6238fdad6db.zip frameworks_base-712cdaf48e83f71033fd097a5d2cc6238fdad6db.tar.gz frameworks_base-712cdaf48e83f71033fd097a5d2cc6238fdad6db.tar.bz2 |
Merge "Fail SmsManager requests if SubId is not active." into m-wireless-dev
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/SubscriptionManager.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index aca94e9..88ca8a4 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -1133,5 +1133,19 @@ public class SubscriptionManager { logd("getSimStateForSubscriber: simState=" + simState + " subId=" + subId); return simState; } + + /** + * @return true if the sub ID is active. i.e. The sub ID corresponds to a known subscription + * and the SIM providing the subscription is present in a slot and in "LOADED" state. + * @hide + */ + public boolean isActiveSubId(int subId) { + try { + ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); + return iSub.isActiveSubId(subId); + } catch (RemoteException ex) { + } + return false; + } } |