Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aykuttasil committed Jul 17, 2019
1 parent 5186198 commit 30dc559
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ open class CallRecordReceiver(private var callRecord: CallRecord) : PhoneCallRec
}

// Derived classes could override these to respond to specific events of interest
protected fun onRecordingStarted(context: Context, callRecord: CallRecord, audioFile: File?) {}
protected open fun onRecordingStarted(context: Context, callRecord: CallRecord, audioFile: File?) {}

protected fun onRecordingFinished(context: Context, callRecord: CallRecord, audioFile: File?) {}
protected open fun onRecordingFinished(context: Context, callRecord: CallRecord, audioFile: File?) {}

private fun startRecord(context: Context, seed: String, phoneNumber: String?) {
try {
Expand Down Expand Up @@ -112,7 +112,6 @@ open class CallRecordReceiver(private var callRecord: CallRecord) : PhoneCallRec
context: Context, seed: String, phoneNumber: String?
): Boolean {
try {

var fileName = PrefsHelper.readPrefString(context, CallRecord.PREF_FILE_NAME)
val dirPath = PrefsHelper.readPrefString(context, CallRecord.PREF_DIR_PATH)
val dirName = PrefsHelper.readPrefString(context, CallRecord.PREF_DIR_NAME)
Expand All @@ -123,18 +122,6 @@ open class CallRecordReceiver(private var callRecord: CallRecord) : PhoneCallRec
val audioSource = PrefsHelper.readPrefInt(context, CallRecord.PREF_AUDIO_SOURCE)
val audioEncoder = PrefsHelper.readPrefInt(context, CallRecord.PREF_AUDIO_ENCODER)

/*
var file_name = PrefsHelper.readPrefString(context, CallRecord.PREF_FILE_NAME)
val dir_path = PrefsHelper.readPrefString(context, CallRecord.PREF_DIR_PATH)
val dir_name = PrefsHelper.readPrefString(context, CallRecord.PREF_DIR_NAME)
val show_seed = PrefsHelper.readPrefBool(context, CallRecord.PREF_SHOW_SEED)
val show_phone_number =
PrefsHelper.readPrefBool(context, CallRecord.PREF_SHOW_PHONE_NUMBER)
val output_format = PrefsHelper.readPrefInt(context, CallRecord.PREF_OUTPUT_FORMAT)
val audio_source = PrefsHelper.readPrefInt(context, CallRecord.PREF_AUDIO_SOURCE)
val audio_encoder = PrefsHelper.readPrefInt(context, CallRecord.PREF_AUDIO_ENCODER)
*/

val sampleDir = File("$dirPath/$dirName")

if (!sampleDir.exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ abstract class PhoneCallReceiver : BroadcastReceiver() {
}

companion object {

//The receiver will be recreated whenever android feels like it. We need a static variable to remember data between instantiations
private var lastState = TelephonyManager.CALL_STATE_IDLE
private var callStartTime: Date = Date()
Expand Down

0 comments on commit 30dc559

Please sign in to comment.