Merge "Add null check for the parameter CallerInfo in onCallerInfoQueryComplete"

This commit is contained in:
Hall Liu 2019-11-15 00:27:11 +00:00 committed by Gerrit Code Review
commit a96f8a59d2
1 changed files with 2 additions and 1 deletions

View File

@ -1766,7 +1766,8 @@ public class CallsManager extends Call.ListenerBase
new CallerInfoLookupHelper.OnQueryCompleteListener() { new CallerInfoLookupHelper.OnQueryCompleteListener() {
@Override @Override
public void onCallerInfoQueryComplete(Uri handle, CallerInfo info) { public void onCallerInfoQueryComplete(Uri handle, CallerInfo info) {
if (info.preferredPhoneAccountComponent != null && if (info != null &&
info.preferredPhoneAccountComponent != null &&
info.preferredPhoneAccountId != null && info.preferredPhoneAccountId != null &&
!info.preferredPhoneAccountId.isEmpty()) { !info.preferredPhoneAccountId.isEmpty()) {
PhoneAccountHandle contactDefaultHandle = new PhoneAccountHandle( PhoneAccountHandle contactDefaultHandle = new PhoneAccountHandle(