diff options
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index fbba999bfb36..2983e4442a78 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -691,7 +691,7 @@ public class TelephonyManager { case UNKNOWN: modemCount = 1; // check for voice and data support, 0 if not supported - if (!isVoiceCapable() && !isSmsCapable() && !isDataCapable()) { + if (!isDeviceVoiceCapable() && !isSmsCapable() && !isDataCapable()) { modemCount = 0; } break; @@ -2814,7 +2814,7 @@ public class TelephonyManager { */ @RequiresFeature(PackageManager.FEATURE_TELEPHONY) public int getPhoneType() { - if (!isVoiceCapable() && !isDataCapable()) { + if (!isDeviceVoiceCapable() && !isDataCapable()) { return PHONE_TYPE_NONE; } return getCurrentPhoneType(); @@ -3371,14 +3371,13 @@ public class TelephonyManager { return telephony.getDataNetworkTypeForSubscriber(subId, getOpPackageName(), getAttributionTag()); } else { - // This can happen when the ITelephony interface is not up yet. + Log.e(TAG, "getDataNetworkType: ITelephony interface is not up yet"); return NETWORK_TYPE_UNKNOWN; } - } catch(RemoteException ex) { - // This shouldn't happen in the normal case - return NETWORK_TYPE_UNKNOWN; - } catch (NullPointerException ex) { - // This could happen before phone restarts due to crashing + } catch (RemoteException // Shouldn't happen in the normal case + | NullPointerException ex // Could happen before phone restarts due to crashing + ) { + Log.e(TAG, "getDataNetworkType: " + ex.getMessage()); return NETWORK_TYPE_UNKNOWN; } } |