1

The value of TelephonyManager.getPhoneType is related to phone and is fixed or related to sim card? The return value is a fixed constant no matter what the type of sim is ? Thanks

Victor Choy
  • 4,006
  • 28
  • 35

1 Answers1

1

Th term 'PhoneType' is definitely confusing here - it appears to actually mean the type of device the phone is currently acting as. So the same physical phone could report different values for different subscriptions:

TelephonyManager.getPhoneType

calls

getCurrentPhoneType(getDefaultSubscription())

The comments for 'getCurrentPhoneType' indicate that it returns a device type for a particular subscription:

/**
 * 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
 */
Mick
  • 24,231
  • 1
  • 54
  • 120