Lines Matching refs:call
188 Call call = readCallFromData(data); in onRestore() local
189 if (call != null && call.type != Calls.VOICEMAIL_TYPE) { in onRestore()
190 writeCallToProvider(call); in onRestore()
192 Log.d(TAG, "Restored call: " + call); in onRestore()
205 for (Call call : calls) { in runBackup()
206 if (!state.callIds.contains(call.id)) { in runBackup()
209 Log.d(TAG, "Adding call to backup: " + call); in runBackup()
213 addCallToBackup(data, call); in runBackup()
214 state.callIds.add(call.id); in runBackup()
218 callsToRemove.remove(call.id); in runBackup()
245 Call call = readCallFromCursor(cursor); in getAllCallLogEntries() local
246 if (call != null && call.type != Calls.VOICEMAIL_TYPE) { in getAllCallLogEntries()
247 calls.add(call); in getAllCallLogEntries()
258 private void writeCallToProvider(Call call) { in writeCallToProvider() argument
259 Long dataUsage = call.dataUsage == 0 ? null : call.dataUsage; in writeCallToProvider()
262 if (call.accountComponentName != null && call.accountId != null) { in writeCallToProvider()
264 ComponentName.unflattenFromString(call.accountComponentName), call.accountId); in writeCallToProvider()
266 boolean addForAllUsers = call.addForAllUsers == 1; in writeCallToProvider()
268 Calls.addCall(null /* CallerInfo */, this, call.number, call.postDialDigits, call.viaNumber, in writeCallToProvider()
269 call.numberPresentation, call.type, call.features, handle, call.date, in writeCallToProvider()
270 (int) call.duration, dataUsage, addForAllUsers, null, true /* isRead */, in writeCallToProvider()
271 call.callBlockReason /*callBlockReason*/, in writeCallToProvider()
272 call.callScreeningAppName /*callScreeningAppName*/, in writeCallToProvider()
273 call.callScreeningComponentName /*callScreeningComponentName*/); in writeCallToProvider()
330 Call call = new Call(); in readCallFromData() local
331 call.id = callId; in readCallFromData()
335 call.date = dataInput.readLong(); in readCallFromData()
336 call.duration = dataInput.readLong(); in readCallFromData()
337 call.number = readString(dataInput); in readCallFromData()
338 call.type = dataInput.readInt(); in readCallFromData()
339 call.numberPresentation = dataInput.readInt(); in readCallFromData()
340 call.accountComponentName = readString(dataInput); in readCallFromData()
341 call.accountId = readString(dataInput); in readCallFromData()
342 call.accountAddress = readString(dataInput); in readCallFromData()
343 call.dataUsage = dataInput.readLong(); in readCallFromData()
344 call.features = dataInput.readInt(); in readCallFromData()
352 readOEMDataForCall(call, new OEMData(namespace, buffer)); in readCallFromData()
356 Log.e(TAG, "Did not find END-OEM marker for call " + call.id); in readCallFromData()
363 call.addForAllUsers = dataInput.readInt(); in readCallFromData()
367 call.postDialDigits = readString(dataInput); in readCallFromData()
371 call.viaNumber = readString(dataInput); in readCallFromData()
375 call.callBlockReason = dataInput.readInt(); in readCallFromData()
376 call.callScreeningAppName = readString(dataInput); in readCallFromData()
377 call.callScreeningComponentName = readString(dataInput); in readCallFromData()
389 return call; in readCallFromData()
397 Call call = new Call(); in readCallFromCursor() local
398 call.id = cursor.getInt(cursor.getColumnIndex(CallLog.Calls._ID)); in readCallFromCursor()
399 call.date = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATE)); in readCallFromCursor()
400 call.duration = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DURATION)); in readCallFromCursor()
401 call.number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER)); in readCallFromCursor()
402 call.postDialDigits = cursor.getString( in readCallFromCursor()
404 call.viaNumber = cursor.getString(cursor.getColumnIndex(CallLog.Calls.VIA_NUMBER)); in readCallFromCursor()
405 call.type = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.TYPE)); in readCallFromCursor()
406 call.numberPresentation = in readCallFromCursor()
408 call.accountComponentName = in readCallFromCursor()
410 call.accountId = in readCallFromCursor()
412 call.accountAddress = in readCallFromCursor()
414 call.dataUsage = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATA_USAGE)); in readCallFromCursor()
415 call.features = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.FEATURES)); in readCallFromCursor()
416 call.addForAllUsers = cursor.getInt(cursor.getColumnIndex(Calls.ADD_FOR_ALL_USERS)); in readCallFromCursor()
417 call.callBlockReason = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.BLOCK_REASON)); in readCallFromCursor()
418 call.callScreeningAppName = cursor in readCallFromCursor()
420 call.callScreeningComponentName = cursor in readCallFromCursor()
422 return call; in readCallFromCursor()
425 private void addCallToBackup(BackupDataOutput output, Call call) { in addCallToBackup() argument
431 data.writeLong(call.date); in addCallToBackup()
432 data.writeLong(call.duration); in addCallToBackup()
433 writeString(data, call.number); in addCallToBackup()
434 data.writeInt(call.type); in addCallToBackup()
435 data.writeInt(call.numberPresentation); in addCallToBackup()
436 writeString(data, call.accountComponentName); in addCallToBackup()
437 writeString(data, call.accountId); in addCallToBackup()
438 writeString(data, call.accountAddress); in addCallToBackup()
439 data.writeLong(call.dataUsage == null ? 0 : call.dataUsage); in addCallToBackup()
440 data.writeInt(call.features); in addCallToBackup()
442 OEMData oemData = getOEMDataForCall(call); in addCallToBackup()
448 data.writeInt(call.addForAllUsers); in addCallToBackup()
450 writeString(data, call.postDialDigits); in addCallToBackup()
452 writeString(data, call.viaNumber); in addCallToBackup()
454 data.writeInt(call.callBlockReason); in addCallToBackup()
455 writeString(data, call.callScreeningAppName); in addCallToBackup()
456 writeString(data, call.callScreeningComponentName); in addCallToBackup()
469 output.writeEntityHeader(Integer.toString(call.id), baos.size()); in addCallToBackup()
473 Log.d(TAG, "Wrote call to backup: " + call + " with byte array: " + baos); in addCallToBackup()
476 Log.e(TAG, "Failed to backup call: " + call, e); in addCallToBackup()
489 private OEMData getOEMDataForCall(Call call) { in getOEMDataForCall() argument
525 private void readOEMDataForCall(Call call, OEMData oemData) { in readOEMDataForCall() argument