package com.antew.redditinpictures.library.ui.base;

import android.os.Bundle;

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.android.debug.hv.ViewServer;
import com.antew.redditinpictures.pro.BuildConfig;;

/**
 * Base activity for an activity which does not use fragments.
 */
public abstract class BaseFragmentActivity extends SherlockFragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (BuildConfig.DEBUG) {
            ViewServer.get(this).addWindow(this);
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (BuildConfig.DEBUG) {
            ViewServer.get(this).removeWindow(this);
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        if (BuildConfig.DEBUG) {
            ViewServer.get(this).setFocusedWindow(this);
        }
    }
}
@@ -261,24 +261,133 @@
 res.
-pro.BuildConfig;
+library.Injector;%0Aimport com.antew.redditinpictures.pro.BuildConfig;%0Aimport com.squareup.otto.Bus;;import javax.inject.Inject
 ;%0A%0A/
@@ -533,16 +533,52 @@
 tivity %7B
+%0A    @Inject%0A    protected Bus mBus;
 %0A%0A    @O
@@ -762,32 +762,32 @@
 ddWindow(this);%0A
-
         %7D%0A    %7D%0A
@@ -771,32 +771,201 @@
 this);%0A        %7D
+%0A%0A        Injector.inject(this);%0A        mBus.register(this);%0A    %7D%0A%0A    @Override%0A    protected void onPause() %7B%0A        mBus.unregister(this);%0A        super.onPause();
 %0A    %7D%0A%0A    @Ove

Add Bus to BaseFragmentActivity.