Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions app/src/org/commcare/connect/ConnectManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

import org.commcare.AppUtils;
import org.commcare.CommCareApplication;
import org.commcare.activities.CommCareActivity;
import org.commcare.activities.connect.ConnectMessagingActivity;
import org.commcare.activities.connect.PersonalIdActivity;
import org.commcare.android.database.connect.models.ConnectAppRecord;
import org.commcare.android.database.connect.models.ConnectJobAssessmentRecord;
import org.commcare.android.database.connect.models.ConnectJobDeliveryRecord;
Expand Down Expand Up @@ -49,7 +47,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
Expand All @@ -58,7 +55,6 @@
import java.util.Random;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

/**
* Manager class for ConnectID, handles workflow navigation and user management
Expand All @@ -68,8 +64,6 @@
public class ConnectManager {
private static final int APP_DOWNLOAD_TASK_ID = 4;

public static final int PENDING_ACTION_NONE = 0;


/**
* Interface for handling callbacks when a ConnectID activity finishes
Expand Down Expand Up @@ -180,16 +174,6 @@ public static ConnectJobRecord getActiveJob() {
return activeJob;
}

private static void launchConnectId(CommCareActivity<?> parent, String task, ConnectActivityCompleteListener listener) {
Intent intent = new Intent(parent, PersonalIdActivity.class);
intent.putExtra("TASK", task);
parent.startActivityForResult(intent, ConnectConstants.CONNECT_JOB_INFO);
}

public static void beginSecondaryPhoneVerification(CommCareActivity<?> parent, ConnectActivityCompleteListener callback) {
launchConnectId(parent, ConnectConstants.VERIFY_PHONE, callback);
}

public static void goToMessaging(Context parent) {
getInstance().parentActivity = parent;
Intent i = new Intent(parent, ConnectMessagingActivity.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ private void refreshUi() {
Context context = getContext();
if(context != null) {
updateUpdatedDate(new Date());
updateSecondaryPhoneConfirmationTile(context);
}
}

Expand All @@ -244,16 +243,6 @@ private void handleCorruptJob(JSONObject obj) {
}
}

private void updateSecondaryPhoneConfirmationTile(Context context) {
boolean show = PersonalIdManager.getInstance().shouldShowSecondaryPhoneConfirmationTile(context);

ConnectManager.updateSecondaryPhoneConfirmationTile(context, connectTile, show, v -> {
ConnectManager.beginSecondaryPhoneVerification((CommCareActivity<?>) getActivity(), success -> {
updateSecondaryPhoneConfirmationTile(context);
});
});
}

private void updateUpdatedDate(Date lastUpdate) {
updateText.setText(getString(R.string.connect_last_update, ConnectManager.formatDateTime(lastUpdate)));
}
Expand Down