Lines Matching refs:call

286             Call call = readCallFromData(data);  in onRestore()  local
287 if (call != null && call.type != Calls.VOICEMAIL_TYPE) { in onRestore()
288 writeCallToProvider(call); in onRestore()
291 Log.d(TAG, "Restored call: " + call); in onRestore()
304 for (Call call : calls) { in runBackup()
305 if (!state.callIds.contains(call.id)) { in runBackup()
308 Log.d(TAG, "Adding call to backup: " + call); in runBackup()
312 addCallToBackup(data, call); in runBackup()
313 state.callIds.add(call.id); in runBackup()
317 callsToRemove.remove(call.id); in runBackup()
346 Call call = readCallFromCursor(cursor); in getAllCallLogEntries() local
347 if (call != null && call.type != Calls.VOICEMAIL_TYPE) { in getAllCallLogEntries()
348 calls.add(call); in getAllCallLogEntries()
359 private void writeCallToProvider(Call call) { in writeCallToProvider() argument
360 Long dataUsage = call.dataUsage == 0 ? null : call.dataUsage; in writeCallToProvider()
363 if (call.accountComponentName != null && call.accountId != null) { in writeCallToProvider()
365 ComponentName.unflattenFromString(call.accountComponentName), call.accountId); in writeCallToProvider()
367 boolean addForAllUsers = call.addForAllUsers == 1; in writeCallToProvider()
373 builder.setNumber(call.number); in writeCallToProvider()
374 builder.setPostDialDigits(call.postDialDigits); in writeCallToProvider()
375 builder.setViaNumber(call.viaNumber); in writeCallToProvider()
376 builder.setPresentation(call.numberPresentation); in writeCallToProvider()
377 builder.setCallType(call.type); in writeCallToProvider()
378 builder.setFeatures(call.features); in writeCallToProvider()
380 builder.setStart(call.date); in writeCallToProvider()
381 builder.setDuration((int) call.duration); in writeCallToProvider()
386 builder.setCallBlockReason(call.callBlockReason); in writeCallToProvider()
387 builder.setCallScreeningAppName(call.callScreeningAppName); in writeCallToProvider()
388 builder.setCallScreeningComponentName(call.callScreeningComponentName); in writeCallToProvider()
389 builder.setMissedReason(call.missedReason); in writeCallToProvider()
390 builder.setIsPhoneAccountMigrationPending(call.isPhoneAccountMigrationPending); in writeCallToProvider()
391 builder.setIsBusinessCall(call.isBusinessCall == 1); in writeCallToProvider()
392 builder.setAssertedDisplayName(call.assertedDisplayName); in writeCallToProvider()
453 Call call = new Call(); in readCallFromData() local
454 call.id = callId; in readCallFromData()
474 call.date = dataInput.readLong(); in readCallFromData()
475 call.duration = dataInput.readLong(); in readCallFromData()
476 call.number = readString(dataInput); in readCallFromData()
477 call.type = dataInput.readInt(); in readCallFromData()
478 call.numberPresentation = dataInput.readInt(); in readCallFromData()
479 call.accountComponentName = readString(dataInput); in readCallFromData()
480 call.accountId = readString(dataInput); in readCallFromData()
481 call.accountAddress = readString(dataInput); in readCallFromData()
482 call.dataUsage = dataInput.readLong(); in readCallFromData()
483 call.features = dataInput.readInt(); in readCallFromData()
491 readOEMDataForCall(call, new OEMData(namespace, buffer)); in readCallFromData()
497 Log.e(TAG, "Did not find END-OEM marker for call " + call.id); in readCallFromData()
504 call.addForAllUsers = dataInput.readInt(); in readCallFromData()
508 call.postDialDigits = readString(dataInput); in readCallFromData()
512 call.viaNumber = readString(dataInput); in readCallFromData()
516 call.callBlockReason = dataInput.readInt(); in readCallFromData()
517 call.callScreeningAppName = readString(dataInput); in readCallFromData()
518 call.callScreeningComponentName = readString(dataInput); in readCallFromData()
531 call.missedReason = dataInput.readLong(); in readCallFromData()
534 call.isPhoneAccountMigrationPending = dataInput.readInt(); in readCallFromData()
537 call.isBusinessCall = dataInput.readInt(); in readCallFromData()
538 call.assertedDisplayName = readString(dataInput); in readCallFromData()
553 if (call.accountComponentName != null && call.accountComponentName.equals( in readCallFromData()
555 call.isPhoneAccountMigrationPending = 1; in readCallFromData()
557 return call; in readCallFromData()
587 Call call = new Call(); in readCallFromCursor() local
588 call.id = cursor.getInt(cursor.getColumnIndex(CallLog.Calls._ID)); in readCallFromCursor()
589 call.date = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATE)); in readCallFromCursor()
590 call.duration = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DURATION)); in readCallFromCursor()
591 call.number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER)); in readCallFromCursor()
592 call.postDialDigits = cursor.getString( in readCallFromCursor()
594 call.viaNumber = cursor.getString(cursor.getColumnIndex(CallLog.Calls.VIA_NUMBER)); in readCallFromCursor()
595 call.type = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.TYPE)); in readCallFromCursor()
596 call.numberPresentation = in readCallFromCursor()
598 call.accountComponentName = in readCallFromCursor()
600 call.accountId = in readCallFromCursor()
602 call.accountAddress = in readCallFromCursor()
604 call.dataUsage = cursor.getLong(cursor.getColumnIndex(CallLog.Calls.DATA_USAGE)); in readCallFromCursor()
605 call.features = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.FEATURES)); in readCallFromCursor()
606 call.addForAllUsers = cursor.getInt(cursor.getColumnIndex(Calls.ADD_FOR_ALL_USERS)); in readCallFromCursor()
607 call.callBlockReason = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.BLOCK_REASON)); in readCallFromCursor()
608 call.callScreeningAppName = cursor in readCallFromCursor()
610 call.callScreeningComponentName = cursor in readCallFromCursor()
612 call.missedReason = cursor in readCallFromCursor()
614 call.isPhoneAccountMigrationPending = cursor.getInt( in readCallFromCursor()
616 call.isBusinessCall = cursor.getInt(cursor.getColumnIndex(CallLog.Calls.IS_BUSINESS_CALL)); in readCallFromCursor()
617 call.assertedDisplayName = in readCallFromCursor()
626 if (shouldConvertSubIdToIccIdForBackup(call.accountComponentName, in readCallFromCursor()
627 call.isPhoneAccountMigrationPending)) { in readCallFromCursor()
628 Log.i(TAG, "Processing PhoneAccountMigration Backup accountId: " + call.accountId); in readCallFromCursor()
631 iccId = mSubscriptionInfoMap.get(Integer.parseInt(call.accountId)); in readCallFromCursor()
640 + call.accountId); in readCallFromCursor()
641 call.accountId = iccId; in readCallFromCursor()
642 call.isPhoneAccountMigrationPending = 1; in readCallFromCursor()
645 return call; in readCallFromCursor()
648 private void addCallToBackup(BackupDataOutput output, Call call) { in addCallToBackup() argument
654 data.writeLong(call.date); in addCallToBackup()
655 data.writeLong(call.duration); in addCallToBackup()
656 writeString(data, call.number); in addCallToBackup()
657 data.writeInt(call.type); in addCallToBackup()
658 data.writeInt(call.numberPresentation); in addCallToBackup()
659 writeString(data, call.accountComponentName); in addCallToBackup()
660 writeString(data, call.accountId); in addCallToBackup()
661 writeString(data, call.accountAddress); in addCallToBackup()
662 data.writeLong(call.dataUsage == null ? 0 : call.dataUsage); in addCallToBackup()
663 data.writeInt(call.features); in addCallToBackup()
665 OEMData oemData = getOEMDataForCall(call); in addCallToBackup()
671 data.writeInt(call.addForAllUsers); in addCallToBackup()
673 writeString(data, call.postDialDigits); in addCallToBackup()
675 writeString(data, call.viaNumber); in addCallToBackup()
677 data.writeInt(call.callBlockReason); in addCallToBackup()
678 writeString(data, call.callScreeningAppName); in addCallToBackup()
679 writeString(data, call.callScreeningComponentName); in addCallToBackup()
690 data.writeLong(call.missedReason); in addCallToBackup()
691 data.writeInt(call.isPhoneAccountMigrationPending); in addCallToBackup()
693 data.writeInt(call.isBusinessCall); in addCallToBackup()
694 writeString(data, call.assertedDisplayName); in addCallToBackup()
698 output.writeEntityHeader(Integer.toString(call.id), baos.size()); in addCallToBackup()
704 Log.d(TAG, "Wrote call to backup: " + call + " with byte array: " + baos); in addCallToBackup()
709 Log.e(TAG, "Failed to backup call: " + call, e); in addCallToBackup()
722 private OEMData getOEMDataForCall(Call call) { in getOEMDataForCall() argument
758 private void readOEMDataForCall(Call call, OEMData oemData) { in readOEMDataForCall() argument