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

Commit a5d5c1d0 authored by Yorke Lee's avatar Yorke Lee
Browse files

Fix potential NPE in TelecomManager.placeCall

Don't pass null parameters

Change-Id: Icf8f4eb3e96a51a5c091322c83ae163e366c21de
parent b2e3b744
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1143,8 +1143,12 @@ public class TelecomManager {
    public void placeCall(Uri address, Bundle extras) {
        ITelecomService service = getTelecomService();
        if (service != null) {
            if (address == null) {
                Log.w(TAG, "Cannot place call to empty address.");
            }
            try {
                service.placeCall(address, extras, mContext.getOpPackageName());
                service.placeCall(address, extras == null ? new Bundle() : extras,
                        mContext.getOpPackageName());
            } catch (RemoteException e) {
                Log.e(TAG, "Error calling ITelecomService#placeCall", e);
            }