/*
 * Copyright 2013 Prateek Srivastava (@f2prateek)
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.f2prateek.dfg;

import android.app.Application;
import android.widget.Toast;
import com.crashlytics.android.Crashlytics;
import com.f2prateek.dfg.ln.CrashlyticsLn;
import com.f2prateek.dfg.util.StorageUtils;
import com.f2prateek.ln.DebugLn;
import com.f2prateek.ln.Ln;
import com.google.analytics.tracking.android.GoogleAnalytics;
import com.squareup.picasso.Picasso;
import dagger.ObjectGraph;

public class DFGApplication extends Application {

  private ObjectGraph objectGraph;

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

    // Perform Injection
    objectGraph = ObjectGraph.create(Modules.list(this));
    objectGraph.inject(this);

    Picasso.with(this).setDebugging(BuildConfig.DEBUG);
    GoogleAnalytics.getInstance(this).setDryRun(BuildConfig.DEBUG);

    if (BuildConfig.DEBUG) {
      Ln.set(DebugLn.from(this));
    } else {
      Crashlytics.start(this);
      Ln.set(new CrashlyticsLn(getPackageName()));
    }

    if (!StorageUtils.isStorageAvailable()) {
      Toast.makeText(this, R.string.storage_unavailable, Toast.LENGTH_SHORT).show();
    }
  }

  public void inject(Object object) {
    objectGraph.inject(object);
  }
}
@@ -16,9 +16,9 @@
  201
-3
+4
  Pra
@@ -1115,22 +1115,27 @@
 ctGraph 
-object
+application
 Graph;%0A%0A
@@ -1221,30 +1221,35 @@
 jection%0A    
-object
+application
 Graph = Obje
@@ -1284,30 +1284,35 @@
 this));%0A    
-object
+application
 Graph.inject
@@ -1794,22 +1794,27 @@
 ) %7B%0A    
-object
+application
 Graph.in

Rename objectGraph to applicationGraph