Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

account expired title #862

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions opensrp-core/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -457,4 +457,5 @@
<string name="return_to_register">Return</string>
<string name="summary_forms">Other Forms</string>
<string name="permission_write_external_storage_rationale">Write access to the device internal storage is required for database download.</string>
<string name="session_expired_title">Session Expired</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}