am 4b77bbd2: Merge "Have getPhoneType return PHONE_TYPE_NONE for non-voice capable devices." into honeycomb
* commit '4b77bbd2ffc9d3a5c9dc5a03d98c7f94436173f7': Have getPhoneType return PHONE_TYPE_NONE for non-voice capable devices.
This commit is contained in:
@@ -286,6 +286,9 @@ public class TelephonyManager {
|
||||
*/
|
||||
public int getPhoneType() {
|
||||
try{
|
||||
if (!isVoiceCapable()) {
|
||||
return PHONE_TYPE_NONE;
|
||||
}
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony.getActivePhoneType();
|
||||
|
||||
Reference in New Issue
Block a user