Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9ec44ed authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

TelephonyManager: use isDeviceVoiceCapable

Bug: 398045526
Bug: 390681978
Bug: 393424911
Test: CtsTelephonyTestCases:android.telephony.cts.TelephonyManagerTest#testGetEmergencyAssistancePackageName
Test: CtsTelephonyTestCases
Flag: EXEMPT bugfix
Change-Id: I3d0d352c4e85b6958b10edb29df4e8a5917507e8
parent a1273fc2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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();