package jp.eure.device.ui;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;

import jp.eure.device.R;

/**
 * Created by katsuyagoto on 2014/10/26.
 */
public abstract class BaseActivity extends ActionBarActivity {

    protected Toolbar toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutResource());
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        if (toolbar != null) {
            setSupportActionBar(toolbar);
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        }
    }

    protected abstract int getLayoutResource();

    protected void setActionBarIcon(int iconRes) {
        toolbar.setNavigationIcon(iconRes);
    }
}

@@ -779,24 +779,59 @@
  iconRes) %7B%0A
+        if (toolbar != null) %7B%0A    
         tool
@@ -862,16 +862,26 @@
 onRes);%0A
+        %7D%0A
     %7D%0A%7D%0A

Update BaseActivity.java