From a88667f867735490f60bdbd3f807d984df73d359 Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Tue, 15 Mar 2016 17:06:35 -0700 Subject: Return null constructing a malformed PhoneAccountHandle Return null when constructing a PhoneAccountHandle if the ComponentName from the database is malformed. Bug: 26684527 Change-Id: I76a3e61699e0646cdf0b715d7b3908611cdca8ff --- src/com/android/dialer/calllog/PhoneAccountUtils.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/com/android/dialer/calllog/PhoneAccountUtils.java b/src/com/android/dialer/calllog/PhoneAccountUtils.java index 8c3985b3f..b3ce18b3c 100644 --- a/src/com/android/dialer/calllog/PhoneAccountUtils.java +++ b/src/com/android/dialer/calllog/PhoneAccountUtils.java @@ -59,6 +59,9 @@ public class PhoneAccountUtils { return null; } final ComponentName componentName = ComponentName.unflattenFromString(componentString); + if (componentName == null) { + return null; + } return new PhoneAccountHandle(componentName, accountId); } -- cgit v1.2.3