// Path: app/src/main/java/com/jachness/blockcalls/stuff/AppContext.java
// public class AppContext extends Application {
//     private AllComponent dagger;
//     @Inject
//     AppPreferences appPreferences;
//     @Inject
//     Lazy<ImportExportWrapper> importExportWrapper;
//     @Inject
//     Lazy<BlackListWrapper> blackListWrapper;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         //If DaggerAllComponent gives an error, just rebuild the project
//         dagger = DaggerAllComponent.builder().blockModule(new BlockModule(this)).appModule(new
//                 AppModule(this)).dAOModule(new DAOModule(this)).build();
//         dagger.inject(this);
// 
//     }
// 
//     public AppPreferences getAppPreferences() {
//         return appPreferences;
//     }
// 
//     public ImportExportWrapper getImportExportWrapper() {
//         return importExportWrapper.get();
//     }
// 
//     public BlackListWrapper getBlackListWrapper() {
//         return blackListWrapper.get();
//     }
// 
//     public AllComponent getDagger() {
//         return dagger;
//     }
// 
// 
// }


import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.support.annotation.Nullable;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v4.widget.SimpleCursorAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;
import android.widget.Toast;
import com.jachness.blockcalls.R;
import com.jachness.blockcalls.stuff.AppContext;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

        itemClickListener = new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                CheckBox cb = (CheckBox) view.findViewById(R.id.contactCbSelected);
                cb.setChecked(!cb.isChecked());
            }
        };

        checkedChangeListener = new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                CheckBox cb = (CheckBox) buttonView;
                int id = (int) cb.getTag(R.string.tag_id);
                if (numbersSelected.containsKey(id)) {
                    numbersSelected.remove(id);
                    cb.setChecked(false);
                } else {
                    numbersSelected.put(id, (String[]) cb.getTag(R.string.tag_data));
                    cb.setChecked(true);
                }

                updateOkButton();
            }
        };

        okButtonListener = new View.OnClickListener() {

            @Override
            public void onClick(View v) {
// Path: app/src/main/java/com/jachness/blockcalls/stuff/AppContext.java
// public class AppContext extends Application {
//     private AllComponent dagger;
//     @Inject
//     AppPreferences appPreferences;
//     @Inject
//     Lazy<ImportExportWrapper> importExportWrapper;
//     @Inject
//     Lazy<BlackListWrapper> blackListWrapper;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         //If DaggerAllComponent gives an error, just rebuild the project
//         dagger = DaggerAllComponent.builder().blockModule(new BlockModule(this)).appModule(new
//                 AppModule(this)).dAOModule(new DAOModule(this)).build();
//         dagger.inject(this);
// 
//     }
// 
//     public AppPreferences getAppPreferences() {
//         return appPreferences;
//     }
// 
//     public ImportExportWrapper getImportExportWrapper() {
//         return importExportWrapper.get();
//     }
// 
//     public BlackListWrapper getBlackListWrapper() {
//         return blackListWrapper.get();
//     }
// 
//     public AllComponent getDagger() {
//         return dagger;
//     }
// 
// 
// }


// Path: app/src/main/java/com/jachness/blockcalls/activities/AddContactFragment.java
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.support.annotation.Nullable;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v4.widget.SimpleCursorAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;
import android.widget.Toast;
import com.jachness.blockcalls.R;
import com.jachness.blockcalls.stuff.AppContext;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;


        itemClickListener = new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                CheckBox cb = (CheckBox) view.findViewById(R.id.contactCbSelected);
                cb.setChecked(!cb.isChecked());
            }
        };

        checkedChangeListener = new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                CheckBox cb = (CheckBox) buttonView;
                int id = (int) cb.getTag(R.string.tag_id);
                if (numbersSelected.containsKey(id)) {
                    numbersSelected.remove(id);
                    cb.setChecked(false);
                } else {
                    numbersSelected.put(id, (String[]) cb.getTag(R.string.tag_data));
                    cb.setChecked(true);
                }

                updateOkButton();
            }
        };

        okButtonListener = new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                AppContext appContext = (AppContext) getActivity().getApplicationContext();