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

Commit 5fdc73cc authored by Yuyang Huang's avatar Yuyang Huang Committed by Automerger Merge Worker
Browse files

Merge "check mTelecomManager is null before get phone account" am: 059b71c3

parents 04bba0b6 059b71c3
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -514,7 +514,11 @@ public class BluetoothInCallService extends InCallService {
                }
            }
            if (TextUtils.isEmpty(address)) {
                if (mTelephonyManager == null) {
                    address = null;
                } else {
                    address = mTelephonyManager.getLine1Number();
                }
                if (address == null) address = "";
            }
            return address;
@@ -1436,6 +1440,10 @@ public class BluetoothInCallService extends InCallService {

            if (account == null) {
                // Second, Try to get the label for the default Phone Account.
                if (mTelecomManager == null) {
                    Log.w(TAG, "mTelecomManager is null");
                    return null;
                }
                List<PhoneAccountHandle> handles =
                        mTelecomManager.getPhoneAccountsSupportingScheme(PhoneAccount.SCHEME_TEL);
                while (handles.iterator().hasNext()) {