<commit_before>package io.punchtime.punchtime.ui.activities;

import android.Manifest;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.NavigationView;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.firebase.client.AuthData;
import com.firebase.client.Firebase;
import com.firebase.ui.auth.core.AuthProviderType;
import com.firebase.ui.auth.core.FirebaseLoginBaseActivity;
import com.firebase.ui.auth.core.FirebaseLoginError;

import java.util.HashMap;
import java.util.Map;

import io.punchtime.punchtime.R;
import io.punchtime.punchtime.logic.tasks.DownloadImageTask;
import io.punchtime.punchtime.ui.fragments.DashboardFragment;
import io.punchtime.punchtime.ui.fragments.HistoryFragment;
import io.punchtime.punchtime.ui.fragments.SettingsFragment;
import io.punchtime.punchtime.ui.fragments.StatsFragment;

public class MainActivity extends FirebaseLoginBaseActivity {

    private DrawerLayout mDrawer;
    private Toolbar toolbar;
    private ActionBarDrawerToggle drawerToggle;
    private AppBarLayout appBar;
    private Firebase mRef;
    private View headerView;
    private SharedPreferences preferences;
    private NavigationView navigationView;
    private boolean isLaunchedFromIntent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setTheme(R.style.AppTheme);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        isLaunchedFromIntent = false;

        // find our drawer layout view
        mDrawer = (DrawerLayout) findViewById(R.id.drawer_layout);

        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        appBar = (AppBarLayout) findViewById(R.id.appBar);

        drawerToggle = setupDrawerToggle();
        mDrawer.addDrawerListener(drawerToggle);

        // find our drawer view
        navigationView = (NavigationView) findViewById(R.id.nav_view);
        headerView = (navigationView == null) ? null : navigationView.getHeaderView(0);
        setupDrawerContent(navigationView);

        preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());<commit_msg>Deep app linking for invite codes<commit_after>package io.punchtime.punchtime.ui.activities;

import android.Manifest;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.NavigationView;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.firebase.client.AuthData;
import com.firebase.client.Firebase;
import com.firebase.ui.auth.core.AuthProviderType;
import com.firebase.ui.auth.core.FirebaseLoginBaseActivity;
import com.firebase.ui.auth.core.FirebaseLoginError;

import java.util.HashMap;
import java.util.Map;

import io.punchtime.punchtime.R;
import io.punchtime.punchtime.logic.tasks.DownloadImageTask;
import io.punchtime.punchtime.ui.fragments.DashboardFragment;
import io.punchtime.punchtime.ui.fragments.HistoryFragment;
import io.punchtime.punchtime.ui.fragments.SettingsFragment;
import io.punchtime.punchtime.ui.fragments.StatsFragment;

public class MainActivity extends FirebaseLoginBaseActivity {

    private DrawerLayout mDrawer;
    private Toolbar toolbar;
    private ActionBarDrawerToggle drawerToggle;
    private AppBarLayout appBar;
    private Firebase mRef;
    private View headerView;
    private SharedPreferences preferences;
    private NavigationView navigationView;
    private boolean isLaunchedFromIntent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setTheme(R.style.AppTheme);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        isLaunchedFromIntent = false;

        // find our drawer layout view
        mDrawer = (DrawerLayout) findViewById(R.id.drawer_layout);

        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        appBar = (AppBarLayout) findViewById(R.id.appBar);

        drawerToggle = setupDrawerToggle();
        mDrawer.addDrawerListener(drawerToggle);

        // find our drawer view
        navigationView = (NavigationView) findViewById(R.id.nav_view);
        headerView = (navigationView == null) ? null : navigationView.getHeaderView(0);
        setupDrawerContent(navigationView);

        preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
{'fraction_non_alphanumeric': 0.08995247793618466, 'fraction_numerical': 0.003054989816700611, 'mean_word_length': 4.846230158730159, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '18217', 'n_tokens_mistral': 1696, 'n_tokens_neox': 1667, 'n_words': 306}