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

Commit 059b71c3 authored by Yuyang Huang's avatar Yuyang Huang Committed by Gerrit Code Review
Browse files

Merge "check mTelecomManager is null before get phone account"

parents a5795b52 a47b98df
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()) {