diff options
author | Yorke Lee <yorkelee@google.com> | 2015-05-05 16:25:55 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-05-05 16:36:22 -0700 |
commit | a5d5c1d0843980c5cac3b9c9541529b59b5c2434 (patch) | |
tree | 442d484e675679b19aef905fb55bc4b72d137327 /telecomm/java | |
parent | b2e3b74418f7fc09f2610bc5620e748d420b5f87 (diff) | |
download | frameworks_base-a5d5c1d0843980c5cac3b9c9541529b59b5c2434.zip frameworks_base-a5d5c1d0843980c5cac3b9c9541529b59b5c2434.tar.gz frameworks_base-a5d5c1d0843980c5cac3b9c9541529b59b5c2434.tar.bz2 |
Fix potential NPE in TelecomManager.placeCall
Don't pass null parameters
Change-Id: Icf8f4eb3e96a51a5c091322c83ae163e366c21de
Diffstat (limited to 'telecomm/java')
-rw-r--r-- | telecomm/java/android/telecom/TelecomManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 1431eb8..ebd3f12 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -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); } |