private SmsManager getSmsManager(int subscriptionId) {
SmsManager smsManager = SmsManager.getDefault();
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
return smsManager;
}
SubscriptionManager subscriptionManager = (SubscriptionManager) getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
if (null == subscriptionManager) {
return smsManager;
}
if (null == subscriptionManager.getActiveSubscriptionInfo(subscriptionId)) {
return smsManager;
}
return SmsManager.getSmsManagerForSubscriptionId(subscriptionId);
}
SmsSenderService.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:RememBirthday
作者:
评论列表
文章目录