package org.commcare.android.tasks;

import android.content.Context;

import org.commcare.android.models.notifications.MessageTag;
import org.commcare.android.models.notifications.NotificationMessage;
import org.commcare.dalvik.activities.DataPullController;
import org.commcare.dalvik.activities.LoginMode;
import org.commcare.dalvik.application.CommCareApp;

/**
 * @author Phillip Mates (pmates@dimagi.com).
 */
public class ExternalManageKeyRecordTask extends ManageKeyRecordTask<ExternalManageKeyRecordTask.DummyDataPullController> {
    public ExternalManageKeyRecordTask(Context c, int taskId, String username, String password,
                                       LoginMode loginMode, CommCareApp app, boolean restoreSession) {
        super(c, taskId, username, password, loginMode, app, restoreSession, false);
    }

    @Override
    protected void keysReadyForSync(DummyDataPullController restorer) {
    }

    @Override
    protected void keysLoginComplete(DummyDataPullController restorer) {
    }

    @Override
    protected void keysDoneOther(DummyDataPullController restorer, HttpCalloutOutcomes outcomes) {
    }

    @Override
    protected void deliverUpdate(DummyDataPullController restorer, String... update) {
    }

    public static class DummyDataPullController implements DataPullController {
        @Override
        public void startDataPull() {

        }

        @Override
        public void dataPullCompleted() {

        }

        @Override
        public void raiseLoginMessage(MessageTag messageTag, boolean showTop) {

        }

        @Override
        public void raiseMessage(NotificationMessage message, boolean showTop) {

        }
    }
}

@@ -67,139 +67,8 @@
 t;%0A%0A
-import org.commcare.android.models.notifications.MessageTag;%0Aimport org.commcare.android.models.notifications.NotificationMessage;%0A
 impo
@@ -227,16 +227,172 @@
 p;%0A%0A/**%0A
+ * Setup key record from server for external call. Thus post key setup methods%0A * are empty since external calls don't require data pulls post key setup%0A *%0A
  * @auth
@@ -506,41 +506,8 @@
 ask%3C
-ExternalManageKeyRecordTask.Dummy
 Data
@@ -865,21 +865,16 @@
 ForSync(
-Dummy
 DataPull
@@ -954,21 +954,16 @@
 omplete(
-Dummy
 DataPull
@@ -1039,21 +1039,16 @@
 neOther(
-Dummy
 DataPull
@@ -1154,21 +1154,16 @@
 rUpdate(
-Dummy
 DataPull
@@ -1212,454 +1212,7 @@
    %7D
-%0A%0A    public static class DummyDataPullController implements DataPullController %7B%0A        @Override%0A        public void startDataPull() %7B%0A%0A        %7D%0A%0A        @Override%0A        public void dataPullCompleted() %7B%0A%0A        %7D%0A%0A        @Override%0A        public void raiseLoginMessage(MessageTag messageTag, boolean showTop) %7B%0A%0A        %7D%0A%0A        @Override%0A        public void raiseMessage(NotificationMessage message, boolean showTop) %7B%0A%0A        %7D%0A    %7D
 %0A%7D%0A

Simplify and comment ExternalManageKeyRecordTask