package ru.dyatel.tsuschedule;

import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import ru.dyatel.tsuschedule.data.DataFragment;
import ru.dyatel.tsuschedule.events.EventBus;
import ru.dyatel.tsuschedule.fragments.MainFragment;
import ru.dyatel.tsuschedule.layout.NavigationDrawerHandler;

public class MainActivity extends AppCompatActivity {

    private EventBus eventBus;

    private NavigationHandler navigationHandler;
    private NavigationDrawerHandler drawerHandler;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity);

        eventBus = new EventBus();

        FragmentManager fragmentManager = getSupportFragmentManager();

        // Get the data fragment
        DataFragment dataFragment = (DataFragment) fragmentManager.findFragmentByTag(DataFragment.TAG);
        if (dataFragment == null) {
            dataFragment = new DataFragment();
            dataFragment.initialize(this);
            fragmentManager.beginTransaction()
                    .add(dataFragment, DataFragment.TAG)
                    .commit();
        }

        // Replace ActionBar with Toolbar
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayShowHomeEnabled(true);
            actionBar.setDisplayHomeAsUpEnabled(true);
        }

        drawerHandler = new NavigationDrawerHandler(
                this, fragmentManager, dataFragment,
                (DrawerLayout) findViewById(R.id.drawer_layout)
        );

        navigationHandler = new NavigationHandler(fragmentManager, drawerHandler);
        fragmentManager.addOnBackStackChangedListener(navigationHandler);

        fragmentManager.beginTransaction()
                .replace(R.id.content_fragment, new MainFragment())
                .commit();
    }

    @Override
    protected void onPostCreate(Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        drawerHandler.syncState();
    }

    @Override
    public void onBackPressed() {
        if (!navigationHandler.onBackPressed()) super.onBackPressed();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        return navigationHandler.onOptionsItemSelected(item)
                || super.onOptionsItemSelected(item);
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        drawerHandler.onConfigurationChanged(newConfig);
    }

    public EventBus getEventBus() {
        return eventBus;
    }

}

@@ -389,32 +389,80 @@
 a.DataFragment;%0A
+import ru.dyatel.tsuschedule.data.SavedDataDAO;%0A
 import ru.dyatel
@@ -491,16 +491,16 @@
 entBus;%0A
-
 import r
@@ -691,16 +691,47 @@
 ventBus;
+%0A    private SavedDataDAO data;
 %0A%0A    pr
@@ -980,24 +980,24 @@
 activity);%0A%0A
-
         even
@@ -1018,16 +1018,55 @@
 ntBus();
+%0A        data = new SavedDataDAO(this);
 %0A%0A      
@@ -3122,10 +3122,74 @@
 %0A    %7D%0A%0A
+    public SavedDataDAO getData() %7B%0A        return data;%0A    %7D%0A%0A
 %7D%0A

Add SavedDataDAO to the MainActivity