SmsSenderService.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:RememBirthday 作者:
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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号