diff options
author | John Wang <johnwang@google.com> | 2010-12-10 14:25:27 -0800 |
---|---|---|
committer | John Wang <johnwang@google.com> | 2010-12-10 15:29:03 -0800 |
commit | c049f9ad5b4f5bc32f368646e624aef7707b7252 (patch) | |
tree | 9f8a83709d00140db026fff2adb5d5c84c30b0ed /telephony/java/android | |
parent | dfcaeb1677cef0d7bf437f5f0432b6f07b223690 (diff) | |
download | frameworks_base-c049f9ad5b4f5bc32f368646e624aef7707b7252.zip frameworks_base-c049f9ad5b4f5bc32f368646e624aef7707b7252.tar.gz frameworks_base-c049f9ad5b4f5bc32f368646e624aef7707b7252.tar.bz2 |
Block SMS service for non-sms-capable device.
If device doesn't support sms service, SMSDispatcher
will ignore incoming SMS in dispatching messge and return
ERROR_NO_SERVICE in sending sms messgae.
bug: 3250029
bug: 3038102
Change-Id: Ic72a9192aa128c43cf31da04907620bc680656c6
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 38f57c9..4424e5b 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -954,4 +954,20 @@ public class TelephonyManager { return mContext.getResources().getBoolean( com.android.internal.R.bool.config_voice_capable); } + + /** + * @return true if the current device supports sms service. + * <p> + * If true, this means that the device supports both sending and + * receiving sms via the telephony network. + * <p> + * Note: Voicemail waiting sms, cell broadcasting sms, and MMS are + * disabled when device doesn't support sms. + * + * @hide pending API review + */ + public boolean isSmsCapable() { + return mContext.getResources().getBoolean( + com.android.internal.R.bool.config_sms_capable); + } } |