TelephonyManager.getPhoneType的值与手机和固定常数有关或与SIM卡有关?
问题描述:
TelephonyManager.getPhoneType的值与手机相关,并且已修复或与SIM卡相关?无论sim的类型是什么,返回值都是一个固定常量? 谢谢TelephonyManager.getPhoneType的值与手机和固定常数有关或与SIM卡有关?
答
Th term'PhoneType'在这里肯定是令人困惑 - 它似乎实际上意味着手机当前充当的设备类型。对于“getCurrentPhoneType”
TelephonyManager.getPhoneType
电话
getCurrentPhoneType(getDefaultSubscription())
的评论表明,它返回的设备类型特定订阅:那么在同一个物理的电话可以为不同的订阅数据有出入
/**
* Returns a constant indicating the device phone type for a subscription.
*
* @see #PHONE_TYPE_NONE
* @see #PHONE_TYPE_GSM
* @see #PHONE_TYPE_CDMA
*
* @param subId for which phone type is returned
*/