package edu.rpi.cs.yacs.core;

import android.app.Application;

import com.crashlytics.android.Crashlytics;
import com.squareup.leakcanary.LeakCanary;

import edu.rpi.cs.yacs.retrofit.ServiceHelper;
import io.fabric.sdk.android.Fabric;
import io.realm.Realm;
import io.realm.RealmConfiguration;

/**
 * Created by Mark Robinson on 10/4/16.
 */
public class YACSApplication extends Application {
    private static YACSApplication instance;

    private ServiceHelper serviceHelper = null;
    private Realm realm = null;

    public static YACSApplication getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        if (LeakCanary.isInAnalyzerProcess(this)) {
            // This process is dedicated to LeakCanary for heap analysis.
            return;
        }

        Fabric.with(this, new Crashlytics());

        instance = this;

        LeakCanary.install(this);

        serviceHelper = new ServiceHelper(getApplicationContext());

        RealmConfiguration realmConfiguration = new RealmConfiguration.Builder(this).build();
        Realm.setDefaultConfiguration(realmConfiguration);

        realm = Realm.getDefaultInstance();
    }

    public ServiceHelper getServiceHelper() {
        return serviceHelper;
    }

    public Realm getRealm() {
        return realm;
    }
}
@@ -145,16 +145,63 @@
 anary;%0A%0A
+import edu.rpi.cs.yacs.enums.RecyclerViewMode;%0A
 import e
@@ -560,16 +560,94 @@
  = null;
+%0A    private RecyclerViewMode recyclerViewMode = RecyclerViewMode.DEPARTMENTS;
 %0A%0A    pu
@@ -1471,10 +1471,232 @@
 m;%0A    %7D
+%0A%0A    public RecyclerViewMode getRecyclerViewMode() %7B%0A        return recyclerViewMode;%0A    %7D%0A%0A    public void setRecyclerViewMode(RecyclerViewMode recyclerViewMode) %7B%0A        this.recyclerViewMode = recyclerViewMode;%0A    %7D
 %0A%7D

Create RecyclerView Getters And Setters