TelephonyManager.getPhoneType的值与phone和一个固定常数有关,还是与sim卡有关?

The value of TelephonyManager.getPhoneType is related to phone and a fixed constant or related to sim card?

TelephonyManager.getPhoneType的值与phone有关,是固定的还是与sim卡有关? return 值是一个固定常数,无论 sim 是什么类型? 谢谢

术语 'PhoneType' 在这里肯定令人困惑 - 它似乎实际上是指 phone 当前充当的设备类型。因此,相同的物理 phone 可以为不同的订阅报告不同的值:

TelephonyManager.getPhoneType

来电

getCurrentPhoneType(getDefaultSubscription())

'getCurrentPhoneType' 的评论表明它 returns 特定订阅的设备类型:

/**
 * 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
 */