<commit_before>/*
 * Copyright 2014-2017 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ca.appvelopers.mcgillmobile.ui;

import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.guerinet.utils.Utils;
import com.guerinet.utils.prefs.BooleanPreference;
import com.guerinet.utils.prefs.IntPreference;
import com.raizlabs.android.dbflow.sql.language.SQLite;

import java.io.IOException;

import javax.inject.Inject;
import javax.inject.Named;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import ca.appvelopers.mcgillmobile.App;
import ca.appvelopers.mcgillmobile.R;
import ca.appvelopers.mcgillmobile.model.Transcript;
import ca.appvelopers.mcgillmobile.model.exception.MinervaException;
import ca.appvelopers.mcgillmobile.ui.dialog.DialogHelper;
import ca.appvelopers.mcgillmobile.ui.settings.AgreementActivity;
import ca.appvelopers.mcgillmobile.util.Constants;
import ca.appvelopers.mcgillmobile.util.dagger.prefs.PasswordPreference;
import ca.appvelopers.mcgillmobile.util.dagger.prefs.PrefsModule;
import ca.appvelopers.mcgillmobile.util.dagger.prefs.UsernamePreference;
import ca.appvelopers.mcgillmobile.util.dbflow.databases.StatementsDB;
import ca.appvelopers.mcgillmobile.util.manager.HomepageManager;
import ca.appvelopers.mcgillmobile.util.manager.McGillManager;
import ca.appvelopers.mcgillmobile.util.manager.UpdateManager;
import ca.appvelopers.mcgillmobile.util.service.ConfigDownloadService;
import ca.appvelopers.mcgillmobile.util.storage.ClearManager;
import ca.appvelopers.mcgillmobile.util.thread.UserDownloader;
import dagger.Lazy;

/**
 * First activity that is opened when the app is started
 * @author <NAME>
 * @since 1.0.0
 */
public class SplashActivity extends BaseActivity {
    /**
     * Code used when starting the AgreementActivity
     */
    private static final int AGREEMENT_CODE = 100;
    /**
     * Container if the min version is not satisfied
     */
    @BindView(R.id.version_container)
    protected LinearLayout minVersionContainer;
    /**
     * Container with the login views
     */
    @BindView(R.id.login_container)
    protected LinearLayout loginContainer;
    /**
     * Container with the loading progress bar (when signing in or loading info for the first time)
     */
    @BindView(R.id.progress_container)
    protected LinearLayout progressContainer;
    /**
     * The login {@link Button}
     */
    @BindView(R.id.login_button)
    protected Button loginButton;
    /**
     * {@link EditText} where the user enters their username
     */
    @BindView(R.id.login_username)
    protected EditText usernameView;
    /**
     * {@link EditText} where the user enters their password
     */
    @BindView(R.id.login_password)
    protected EditText passwordView;
    /**
     * {@link CheckBox} where the user decides if their username should be remembered
     */
    @BindView(R.id.login_remember_username)
    protected CheckBox rememberUsername;
    /**
     * Update text for when downloading everything
     */
    @BindView(R.id.progress_text)
    protected TextView progressText;
    /**
     * The {@link McGillManager} instance
     */
    @Inject
    protected McGillManager mcGillManager;
    /**
     * {@link ClearManager} instance
     */
    @Inject
    protected ClearManager clearManager;
    /**
     * Remember username {@link BooleanPreference}
     */
    @Inject
    @Named(PrefsModule.REMEMBER_USERNAME)
    protected BooleanPreference rememberUsernamePref;
    /**
     * Version {@link IntPreference}
     */
    @Inject
    @Named(PrefsModule.VERSION)
    protected IntPreference versionPref;
    /**
     * Min version {@link IntPreference}
     */
    @Inject
    @Named(PrefsModule.MIN_VERSION)
    protected IntPreference minVersionPref;
    /**
     * EULA {@link BooleanPreference}
     */
    @Inject
    @Named(PrefsModule.EULA)
    protected BooleanPreference eulaPref;
    /**
     * {@link UsernamePreference} instance
     */
    @Inject
    protected UsernamePreference usernamePref;
    /**
     * {@link PasswordPreference} instance
     */
    @Inject
    protected PasswordPreference passwordPref;
    /**
     * {@link UpdateManager} instance
     */
    @Inject
    protected UpdateManager updateManager;
    /**
     * The {@link HomepageManager} instance
     */
    @Inject
    protected HomepageManager homepageManager;
    /**
     * The {@link InputMethodManager}
     */
    @Inject
    protected Lazy<InputMethodManager> imm;

    @Override
    protected void onCreate(Bundle savedInstanceState) {<commit_msg>Fixed visibility of all of the variables in the SplashActivity<commit_after>/*
 * Copyright 2014-2017 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ca.appvelopers.mcgillmobile.ui;

import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.guerinet.utils.Utils;
import com.guerinet.utils.prefs.BooleanPreference;
import com.guerinet.utils.prefs.IntPreference;
import com.raizlabs.android.dbflow.sql.language.SQLite;

import java.io.IOException;

import javax.inject.Inject;
import javax.inject.Named;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import ca.appvelopers.mcgillmobile.App;
import ca.appvelopers.mcgillmobile.R;
import ca.appvelopers.mcgillmobile.model.Transcript;
import ca.appvelopers.mcgillmobile.model.exception.MinervaException;
import ca.appvelopers.mcgillmobile.ui.dialog.DialogHelper;
import ca.appvelopers.mcgillmobile.ui.settings.AgreementActivity;
import ca.appvelopers.mcgillmobile.util.Constants;
import ca.appvelopers.mcgillmobile.util.dagger.prefs.PasswordPreference;
import ca.appvelopers.mcgillmobile.util.dagger.prefs.PrefsModule;
import ca.appvelopers.mcgillmobile.util.dagger.prefs.UsernamePreference;
import ca.appvelopers.mcgillmobile.util.dbflow.databases.StatementsDB;
import ca.appvelopers.mcgillmobile.util.manager.HomepageManager;
import ca.appvelopers.mcgillmobile.util.manager.McGillManager;
import ca.appvelopers.mcgillmobile.util.manager.UpdateManager;
import ca.appvelopers.mcgillmobile.util.service.ConfigDownloadService;
import ca.appvelopers.mcgillmobile.util.storage.ClearManager;
import ca.appvelopers.mcgillmobile.util.thread.UserDownloader;
import dagger.Lazy;

/**
 * First activity that is opened when the app is started
 * @author <NAME>
 * @since 1.0.0
 */
public class SplashActivity extends BaseActivity {
    /**
     * Code used when starting the AgreementActivity
     */
    private static final int AGREEMENT_CODE = 100;
    /**
     * Container if the min version is not satisfied
     */
    @BindView(R.id.version_container)
    LinearLayout minVersionContainer;
    /**
     * Container with the login views
     */
    @BindView(R.id.login_container)
    LinearLayout loginContainer;
    /**
     * Container with the loading progress bar (when signing in or loading info for the first time)
     */
    @BindView(R.id.progress_container)
    LinearLayout progressContainer;
    /**
     * The login {@link Button}
     */
    @BindView(R.id.login_button)
    Button loginButton;
    /**
     * {@link EditText} where the user enters their username
     */
    @BindView(R.id.login_username)
    EditText usernameView;
    /**
     * {@link EditText} where the user enters their password
     */
    @BindView(R.id.login_password)
    EditText passwordView;
    /**
     * {@link CheckBox} where the user decides if their username should be remembered
     */
    @BindView(R.id.login_remember_username)
    CheckBox rememberUsername;
    /**
     * Update text for when downloading everything
     */
    @BindView(R.id.progress_text)
    TextView progressText;
    /**
     * The {@link McGillManager} instance
     */
    @Inject
    McGillManager mcGillManager;
    /**
     * {@link ClearManager} instance
     */
    @Inject
    ClearManager clearManager;
    /**
     * Remember username {@link BooleanPreference}
     */
    @Inject
    @Named(PrefsModule.REMEMBER_USERNAME)
    BooleanPreference rememberUsernamePref;
    /**
     * Min version {@link IntPreference}
     */
    @Inject
    @Named(PrefsModule.MIN_VERSION)
    IntPreference minVersionPref;
    /**
     * EULA {@link BooleanPreference}
     */
    @Inject
    @Named(PrefsModule.EULA)
    BooleanPreference eulaPref;
    /**
     * {@link UsernamePreference} instance
     */
    @Inject
    UsernamePreference usernamePref;
    /**
     * {@link PasswordPreference} instance
     */
    @Inject
    PasswordPreference passwordPref;
    /**
     * {@link UpdateManager} instance
     */
    @Inject
    UpdateManager updateManager;
    /**
     * The {@link HomepageManager} instance
     */
    @Inject
    HomepageManager homepageManager;
    /**
     * The {@link InputMethodManager}
     */
    @Inject
    Lazy<InputMethodManager> imm;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
{'fraction_non_alphanumeric': 0.09315677377534957, 'fraction_numerical': 0.003333642003889249, 'mean_word_length': 3.6611998273629696, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1089070', 'n_tokens_mistral': 3173, 'n_tokens_neox': 3137, 'n_words': 760}