// Path: src/main/java/com/f2prateek/dfg/DFGApplication.java
// public class DFGApplication extends Application {
//   ObjectGraph applicationGraph;
//   @Inject ActivityHierarchyServer activityHierarchyServer;
//   @Inject Bus bus;
// 
//   @Inject WindowManager windowManager;
//   @Inject DeviceProvider deviceProvider;
//   @Inject @FirstRun Preference<Boolean> firstRun;
//   @Inject Analytics analytics;
// 
//   @Override public void onCreate() {
//     super.onCreate();
// 
//     // Perform Injection
//     buildApplicationGraphAndInject();
// 
//     registerActivityLifecycleCallbacks(activityHierarchyServer);
// 
//     if (BuildConfig.DEBUG) {
//       Ln.set(DebugLn.from(this));
//     }
// 
//     if (!isStorageAvailable()) {
//       Toast.makeText(this, R.string.storage_unavailable, Toast.LENGTH_SHORT).show();
//       Ln.w("storage unavailable");
//     }
// 
//     if (firstRun.get()) {
//       analytics.track("First Launch");
//       Device device = deviceProvider.find(windowManager);
//       if (device != null) {
//         deviceProvider.saveDefaultDevice(device);
//         bus.post(new Events.DefaultDeviceUpdated(device));
//       }
//       firstRun.set(false);
//     }
//   }
// 
//   @DebugLog public void buildApplicationGraphAndInject() {
//     applicationGraph = ObjectGraph.create(Modules.list(this));
//     applicationGraph.inject(this);
//   }
// 
//   public static DFGApplication get(Context context) {
//     return (DFGApplication) context.getApplicationContext();
//   }
// 
//   public void inject(Object object) {
//     applicationGraph.inject(object);
//   }
// }
// 
// Path: src/main/java/com/f2prateek/dfg/ui/AppContainer.java
// public interface AppContainer {
//   /** The root {@link android.view.ViewGroup} into which the activity should place its contents. */
//   ViewGroup get(Activity activity, DFGApplication app);
// 
//   /** An {@link AppContainer} which returns the normal activity content view. */
//   AppContainer DEFAULT = new AppContainer() {
//     @Override public ViewGroup get(Activity activity, DFGApplication app) {
//       return findById(activity, android.R.id.content);
//     }
//   };
// }


import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import com.f2prateek.dart.Dart;
import com.f2prateek.dfg.DFGApplication;
import com.f2prateek.dfg.ui.AppContainer;
import com.squareup.otto.Bus;
import javax.inject.Inject;
/*
 * Copyright 2014 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.ui.activities;


@SuppressLint("Registered")
public class BaseActivity extends AppCompatActivity {

  @Inject Bus bus;
// Path: src/main/java/com/f2prateek/dfg/DFGApplication.java
// public class DFGApplication extends Application {
//   ObjectGraph applicationGraph;
//   @Inject ActivityHierarchyServer activityHierarchyServer;
//   @Inject Bus bus;
// 
//   @Inject WindowManager windowManager;
//   @Inject DeviceProvider deviceProvider;
//   @Inject @FirstRun Preference<Boolean> firstRun;
//   @Inject Analytics analytics;
// 
//   @Override public void onCreate() {
//     super.onCreate();
// 
//     // Perform Injection
//     buildApplicationGraphAndInject();
// 
//     registerActivityLifecycleCallbacks(activityHierarchyServer);
// 
//     if (BuildConfig.DEBUG) {
//       Ln.set(DebugLn.from(this));
//     }
// 
//     if (!isStorageAvailable()) {
//       Toast.makeText(this, R.string.storage_unavailable, Toast.LENGTH_SHORT).show();
//       Ln.w("storage unavailable");
//     }
// 
//     if (firstRun.get()) {
//       analytics.track("First Launch");
//       Device device = deviceProvider.find(windowManager);
//       if (device != null) {
//         deviceProvider.saveDefaultDevice(device);
//         bus.post(new Events.DefaultDeviceUpdated(device));
//       }
//       firstRun.set(false);
//     }
//   }
// 
//   @DebugLog public void buildApplicationGraphAndInject() {
//     applicationGraph = ObjectGraph.create(Modules.list(this));
//     applicationGraph.inject(this);
//   }
// 
//   public static DFGApplication get(Context context) {
//     return (DFGApplication) context.getApplicationContext();
//   }
// 
//   public void inject(Object object) {
//     applicationGraph.inject(object);
//   }
// }
// 
// Path: src/main/java/com/f2prateek/dfg/ui/AppContainer.java
// public interface AppContainer {
//   /** The root {@link android.view.ViewGroup} into which the activity should place its contents. */
//   ViewGroup get(Activity activity, DFGApplication app);
// 
//   /** An {@link AppContainer} which returns the normal activity content view. */
//   AppContainer DEFAULT = new AppContainer() {
//     @Override public ViewGroup get(Activity activity, DFGApplication app) {
//       return findById(activity, android.R.id.content);
//     }
//   };
// }


// Path: src/main/java/com/f2prateek/dfg/ui/activities/BaseActivity.java
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import com.f2prateek.dart.Dart;
import com.f2prateek.dfg.DFGApplication;
import com.f2prateek.dfg.ui.AppContainer;
import com.squareup.otto.Bus;
import javax.inject.Inject;

/*
 * Copyright 2014 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.ui.activities;


@SuppressLint("Registered")
public class BaseActivity extends AppCompatActivity {

  @Inject Bus bus;
  @Inject AppContainer appContainer;