diff --git a/opensrp-core/res/values/strings.xml b/opensrp-core/res/values/strings.xml index 8b587d131..7abdfd3dd 100644 --- a/opensrp-core/res/values/strings.xml +++ b/opensrp-core/res/values/strings.xml @@ -457,4 +457,5 @@ Return Other Forms Write access to the device internal storage is required for database download. + Session Expired diff --git a/opensrp-core/src/main/java/org/smartregister/util/SyncUtils.java b/opensrp-core/src/main/java/org/smartregister/util/SyncUtils.java index b1e450b16..eb9f54e1d 100644 --- a/opensrp-core/src/main/java/org/smartregister/util/SyncUtils.java +++ b/opensrp-core/src/main/java/org/smartregister/util/SyncUtils.java @@ -94,7 +94,8 @@ protected Intent getLogoutUserIntent(@StringRes int logoutMessage) { intent = intent.setClassName(context.getPackageName(), activities.get(0).activityInfo.name); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); - intent.putExtra(ACCOUNT_DISABLED, context.getString(logoutMessage)); + intent.putExtra(AllConstants.INTENT_KEY.DIALOG_MESSAGE, context.getString(logoutMessage)); + intent.putExtra(AllConstants.INTENT_KEY.DIALOG_TITLE, context.getString(R.string.session_expired_title)); } return intent; diff --git a/opensrp-core/src/test/java/org/smartregister/util/SyncUtilsRobolectricTest.java b/opensrp-core/src/test/java/org/smartregister/util/SyncUtilsRobolectricTest.java index 3b3966031..154b6a14a 100644 --- a/opensrp-core/src/test/java/org/smartregister/util/SyncUtilsRobolectricTest.java +++ b/opensrp-core/src/test/java/org/smartregister/util/SyncUtilsRobolectricTest.java @@ -134,6 +134,6 @@ public void getLogoutUserIntentShouldProvideLaunchActivityIntentWhenLauncherActi int flags = Intent.FLAG_ACTIVITY_NEW_TASK; flags |= Intent.FLAG_ACTIVITY_CLEAR_TOP; Assert.assertEquals(flags, intent.getFlags()); - Assert.assertEquals(context.getString(R.string.logout_text), intent.getStringExtra(AllConstants.ACCOUNT_DISABLED)); + Assert.assertEquals(context.getString(R.string.logout_text), intent.getStringExtra(AllConstants.INTENT_KEY.DIALOG_MESSAGE)); } }