1

TelephonyManager.getPhoneType 的值与手机有关,是固定的还是与sim卡有关?无论 sim 的类型是什么,返回值都是一个固定的常数?谢谢

4

1 回答 1

1

术语“PhoneType”在这里绝对令人困惑——它似乎实际上是指手机当前所使用的设备类型。因此,同一部物理电话可能会针对不同的订阅报告不同的值:

TelephonyManager.getPhoneType

来电

getCurrentPhoneType(getDefaultSubscription())

'getCurrentPhoneType' 的注释表明它返回特定订阅的设备类型:

/**
 * 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
 */
于 2016-03-06T21:12:25.653 回答