package org.commcare.tasks;

import android.content.Context;
import android.util.Log;

import org.commcare.activities.CommCareWiFiDirectActivity;
import org.commcare.logging.AndroidLogger;
import org.commcare.android.database.user.models.FormRecord;
import org.commcare.tasks.templates.CommCareTask;

/**
 * Removes all of the form records from storage after they've been transferred.
 *
 * @author wspride
 */
public abstract class WipeTask extends CommCareTask<String, String, Boolean, CommCareWiFiDirectActivity> {

    private final Context c;

    public static final int WIPE_TASK_ID = 9213435;

    private final FormRecord[] records;

    public WipeTask(Context c, FormRecord[] records) {
        this.c = c;
        this.taskId = WIPE_TASK_ID;
        this.records = records;
        TAG = AndroidLogger.TYPE_FORM_DUMP;
    }

    @Override
    protected Boolean doTaskBackground(String... params) {

        if(records == null){
            // That's OK, might just be transferring already transferred forms.
            return true;
        }

        Log.d(TAG, "Wiping sent form records");
        for (FormRecord record : records) {
            record.logPendingDeletion(TAG, "we are about to initiate a wifi direct transfer");
            FormRecordCleanupTask.wipeRecord(c, record);
        }
        Log.d(TAG, "Successfully wiped: " + records.length + " FormRecords.");
        return true;
    }
}

@@ -1232,29 +1232,27 @@
 %22we 
-are about to initia
+have just comple
 te
+d
  a w

fix log reason