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
8 changes: 8 additions & 0 deletions app/src/org/commcare/activities/DispatchActivity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.commcare.activities;

import static org.commcare.commcaresupportlibrary.CommCareLauncher.SESSION_ENDPOINT_APP_ID;
import static org.commcare.connect.ConnectAppUtils.IS_LAUNCH_FROM_CONNECT;

import android.content.Intent;
import android.os.Bundle;
Expand Down Expand Up @@ -290,10 +291,13 @@ private void launchLoginScreen() {
// AMS 06/09/16: This check is needed due to what we believe is a bug in the Android platform
Intent i = new Intent(this, LoginActivity.class);
i.putExtra(LoginActivity.USER_TRIGGERED_LOGOUT, userTriggeredLogout);
i.putExtra(IS_LAUNCH_FROM_CONNECT, getLaunchedFromConnect());

String sesssionEndpointAppID = getSessionEndpointAppId();
if (sesssionEndpointAppID != null) {
i.putExtra(LoginActivity.EXTRA_APP_ID, sesssionEndpointAppID);
}

startActivityForResult(i, LOGIN_USER);
waitingForActivityResultFromLogin = true;
} else {
Expand All @@ -309,6 +313,10 @@ private String getSessionEndpointAppId() {
return getIntent().getStringExtra(SESSION_ENDPOINT_APP_ID);
}

private boolean getLaunchedFromConnect() {
return getIntent().getBooleanExtra(IS_LAUNCH_FROM_CONNECT, false);
}

private void launchHomeScreen() {
Intent i;
if (useRootMenuHomeActivity()) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/org/commcare/connect/ConnectAppUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.security.SecureRandom

object ConnectAppUtils {
private const val APP_DOWNLOAD_TASK_ID: Int = 4
private const val IS_LAUNCH_FROM_CONNECT = "is_launch_from_connect"
const val IS_LAUNCH_FROM_CONNECT = "is_launch_from_connect"

@Volatile
private var isAppDownloading = false
Expand Down