Lines Matching refs:call

46  * caller details to the call log. All logging activity will be performed asynchronously in a
57 * Parameter object to hold the arguments to add a call in the call log DB.
64 * @param callType The type of call (e.g INCOMING_TYPE). @see
66 * @param features The features of the call (e.g. FEATURES_VIDEO). @see
68 * @param creationDate Time when the call was created (milliseconds since epoch).
69 * @param durationInMillis Duration of the call (milliseconds).
71 * @param logCallCompletedListener optional callback called after the call is logged.
137 public void onCallStateChanged(Call call, int oldState, int newState) {
138 int disconnectCause = call.getDisconnectCause().getCode();
145 // 2) It is a conference call
147 // 4) Call is not an external call
150 !call.isConference() &&
152 !call.isExternalCall()) {
154 if (!call.isIncoming()) {
165 logCall(call, type, true /*showNotificationForMissedCall*/);
169 void logCall(Call call, int type, boolean showNotificationForMissedCall) {
171 logCall(call, Calls.MISSED_TYPE,
175 mMissedCallNotifier.showMissedCallNotification(call);
179 logCall(call, type, null);
184 * Logs a call to the call log based on the {@link Call} object passed in.
186 * @param call The call object being logged
187 * @param callLogType The type of call log entry to log this call as. See:
191 * @param logCallCompletedListener optional callback called after the call is logged.
193 void logCall(Call call, int callLogType,
195 final long creationTime = call.getCreationTimeMillis();
196 final long age = call.getAgeMillis();
198 final String logNumber = getLogNumber(call);
205 String formattedViaNumber = PhoneNumberUtils.formatNumber(call.getViaNumber(),
208 formattedViaNumber : call.getViaNumber();
210 PhoneAccountHandle accountHandle = call.getTargetPhoneAccount();
215 Long callDataUsage = call.getCallDataUsage() == Call.DATA_USAGE_NOT_SET ? null :
216 call.getCallDataUsage();
218 int callFeatures = getCallFeatures(call.getVideoStateHistory(),
219 call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED);
220 logCall(call.getCallerInfo(), logNumber, call.getPostDialDigits(), formattedViaNumber,
221 call.getHandlePresentation(), callLogType, callFeatures, accountHandle,
222 creationTime, age, callDataUsage, call.isEmergencyCall(), call.getInitiatingUser(),
227 * Inserts a call into the call log, based on the parameters passed in.
230 * @param number The number the call was made to or from.
232 * if it was an outgoing call. Otherwise ''.
234 * @param callType The type of call.
235 * @param features The features of the call.
236 * @param start The start time of the call, in milliseconds.
237 * @param duration The duration of the call, in milliseconds.
238 * @param dataUsage The data usage for the call, null if not applicable.
239 * @param isEmergency {@code true} if this is an emergency call, {@code false} otherwise.
240 * @param logCallCompletedListener optional callback called after the call is logged.
284 Log.d(TAG, "Not adding emergency call to call log.");
289 * Based on the video state of the call, determines the call features applicable for the call.
292 * @param isPulledCall {@code true} if this call was pulled to another device.
293 * @return The call features.
307 * Retrieve the phone number from the call, and then process it before returning the
310 * @param call The phone connection.
313 private String getLogNumber(Call call) {
314 Uri handle = call.getOriginalHandle();
328 * Adds the call defined by the parameters in the provided AddCallArgs to the CallLogProvider
331 * @param args Prepopulated call details.
332 * @return A handle to the AsyncTask that will add the call to the call log asynchronously.
339 * Helper AsyncTask to access the call logs database asynchronously since database operations
390 * Insert the call to a specific user or all users except managed profile.
392 * @param userToBeInserted user handle of user that the call going be inserted to. null
408 Performs a simple sanity check to make sure the call was written in the database.
409 Typically there is only one result per call so it is easy to identify which one
413 Log.w(TAG, "Failed to write call to the log.");