<commit_before>package org.commcare.activities;

import android.os.Bundle;

import org.commcare.utils.SessionActivityRegistration;
import org.commcare.utils.SessionUnavailableException;

/**
 * Manage redirection to login screen when session expiration occurs.
 *
 * @author <NAME> (<EMAIL>)
 */
public abstract class SessionAwareCommCareActivity<R> extends CommCareActivity<R> {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        try {
            onCreateSessionSafe(savedInstanceState);<commit_msg>force sessionunavailableexception to happen immediately if it's going to<commit_after>package org.commcare.activities;

import android.os.Bundle;

import org.commcare.CommCareApplication;
import org.commcare.utils.SessionActivityRegistration;
import org.commcare.utils.SessionUnavailableException;

/**
 * Manage redirection to login screen when session expiration occurs.
 *
 * @author <NAME> (<EMAIL>)
 */
public abstract class SessionAwareCommCareActivity<R> extends CommCareActivity<R> {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        try {
            CommCareApplication.instance().getSession();
            onCreateSessionSafe(savedInstanceState);
{'fraction_non_alphanumeric': 0.08505747126436781, 'fraction_numerical': 0.0, 'mean_word_length': 4.778761061946903, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4441218', 'n_tokens_mistral': 348, 'n_tokens_neox': 326, 'n_words': 78}