From fbb5f7b34cc409323659994df4180ed325de0f6f Mon Sep 17 00:00:00 2001 From: weichinweng Date: Wed, 17 Oct 2018 15:57:55 +0800 Subject: [PATCH] Add CACHED_NAME into call history database when the add call. * For some carkit will get the call history name to show its screen, But the caller name is not into call history database. * Add caller name into call history database for the carkit get correct caller name. Bug: 111968310 Bug: 117627934 Test: build pass, verify pass, Check call history after received different type call (save number, not save number, private number) Change-Id: Ic28320c0184e33aa934a9c9c82a6062f5ef44e2a --- core/java/android/provider/CallLog.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java index bc72c4e384113..c0fa1de6feeb4 100644 --- a/core/java/android/provider/CallLog.java +++ b/core/java/android/provider/CallLog.java @@ -684,6 +684,9 @@ public class CallLog { values.put(PHONE_ACCOUNT_ID, accountId); values.put(PHONE_ACCOUNT_ADDRESS, accountAddress); values.put(NEW, Integer.valueOf(1)); + if ((ci != null) && (ci.name != null)) { + values.put(CACHED_NAME, ci.name); + } values.put(ADD_FOR_ALL_USERS, addForAllUsers ? 1 : 0); if (callType == MISSED_TYPE) {