Lines Matching refs:call

189             Call call = readCallFromData(data);  in onRestore()  local
190 if (call != null) { in onRestore()
191 writeCallToProvider(call); in onRestore()
193 Log.d(TAG, "Restored call: " + call); in onRestore()
206 for (Call call : calls) { in runBackup()
207 if (!state.callIds.contains(call.id)) { in runBackup()
210 Log.d(TAG, "Adding call to backup: " + call); in runBackup()
214 addCallToBackup(data, call); in runBackup()
215 state.callIds.add(call.id); in runBackup()
219 callsToRemove.remove(call.id); in runBackup()
246 Call call = readCallFromCursor(cursor); in getAllCallLogEntries() local
247 if (call != null) { in getAllCallLogEntries()
248 calls.add(call); in getAllCallLogEntries()
259 private void writeCallToProvider(Call call) { in writeCallToProvider() argument
260 Long dataUsage = call.dataUsage == 0 ? null : call.dataUsage; in writeCallToProvider()
263 if (call.accountComponentName != null && call.accountId != null) { in writeCallToProvider()
265 ComponentName.unflattenFromString(call.accountComponentName), call.accountId); in writeCallToProvider()
267 boolean addForAllUsers = call.addForAllUsers == 1; in writeCallToProvider()
269 Calls.addCall(null /* CallerInfo */, this, call.number, call.postDialDigits, call.viaNumber, in writeCallToProvider()
270 call.numberPresentation, call.type, call.features, handle, call.date, in writeCallToProvider()
271 (int) call.duration, dataUsage, addForAllUsers, null, true /* is_read */); in writeCallToProvider()
328 Call call = new Call(); in readCallFromData() local
329 call.id = callId; in readCallFromData()
333 call.date = dataInput.readLong(); in readCallFromData()
334 call.duration = dataInput.readLong(); in readCallFromData()
335 call.number = readString(dataInput); in readCallFromData()
336 call.type = dataInput.readInt(); in readCallFromData()
337 call.numberPresentation = dataInput.readInt(); in readCallFromData()
338 call.accountComponentName = readString(dataInput); in readCallFromData()
339 call.accountId = readString(dataInput); in readCallFromData()
340 call.accountAddress = readString(dataInput); in readCallFromData()
341 call.dataUsage = dataInput.readLong(); in readCallFromData()
342 call.features = dataInput.readInt(); in readCallFromData()
350 readOEMDataForCall(call, new OEMData(namespace, buffer)); in readCallFromData()
354 Log.e(TAG, "Did not find END-OEM marker for call " + call.id); in readCallFromData()
361 call.addForAllUsers = dataInput.readInt(); in readCallFromData()
365 call.postDialDigits = readString(dataInput); in readCallFromData()
369 call.viaNumber = readString(dataInput); in readCallFromData()
372 return call; in readCallFromData()
380 Call call = new Call(); in readCallFromCursor() local
381 call.id = cursor.getInt(cursor.getColumnIndex(CallLog.Calls._ID)); in readCallFromCursor()
382 call.date = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATE)); in readCallFromCursor()
383 call.duration = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DURATION)); in readCallFromCursor()
384 call.number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER)); in readCallFromCursor()
385 call.postDialDigits = cursor.getString( in readCallFromCursor()
387 call.viaNumber = cursor.getString(cursor.getColumnIndex(CallLog.Calls.VIA_NUMBER)); in readCallFromCursor()
388 call.type = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.TYPE)); in readCallFromCursor()
389 call.numberPresentation = in readCallFromCursor()
391 call.accountComponentName = in readCallFromCursor()
393 call.accountId = in readCallFromCursor()
395 call.accountAddress = in readCallFromCursor()
397 call.dataUsage = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATA_USAGE)); in readCallFromCursor()
398 call.features = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.FEATURES)); in readCallFromCursor()
399 call.addForAllUsers = cursor.getInt(cursor.getColumnIndex(Calls.ADD_FOR_ALL_USERS)); in readCallFromCursor()
400 return call; in readCallFromCursor()
403 private void addCallToBackup(BackupDataOutput output, Call call) { in addCallToBackup() argument
409 data.writeLong(call.date); in addCallToBackup()
410 data.writeLong(call.duration); in addCallToBackup()
411 writeString(data, call.number); in addCallToBackup()
412 data.writeInt(call.type); in addCallToBackup()
413 data.writeInt(call.numberPresentation); in addCallToBackup()
414 writeString(data, call.accountComponentName); in addCallToBackup()
415 writeString(data, call.accountId); in addCallToBackup()
416 writeString(data, call.accountAddress); in addCallToBackup()
417 data.writeLong(call.dataUsage == null ? 0 : call.dataUsage); in addCallToBackup()
418 data.writeInt(call.features); in addCallToBackup()
420 OEMData oemData = getOEMDataForCall(call); in addCallToBackup()
426 data.writeInt(call.addForAllUsers); in addCallToBackup()
428 writeString(data, call.postDialDigits); in addCallToBackup()
430 writeString(data, call.viaNumber); in addCallToBackup()
434 output.writeEntityHeader(Integer.toString(call.id), baos.size()); in addCallToBackup()
438 Log.d(TAG, "Wrote call to backup: " + call + " with byte array: " + baos); in addCallToBackup()
441 Log.e(TAG, "Failed to backup call: " + call, e); in addCallToBackup()
454 private OEMData getOEMDataForCall(Call call) { in getOEMDataForCall() argument
490 private void readOEMDataForCall(Call call, OEMData oemData) { in readOEMDataForCall() argument