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