// Path: app/src/main/java/com/mypodcasts/episodes/EpisodeFeedsActivity.java
// public class EpisodeFeedsActivity extends MyPodcastsActivity {
// 
//   @Inject
//   private FragmentManager fragmentManager;
// 
//   @Inject
//   private Bundle arguments;
// 
//   @Inject
//   private EpisodeListFragment episodeListFragment;
// 
//   @Inject
//   private ProgressDialog progressDialog;
// 
//   @Inject
//   private UserFeedsRepository userFeedsRepository;
//   private FeedEpisodesAsyncTask feedEpisodesAsyncTask;
// 
//   @Override
//   protected void onCreate(Bundle savedInstanceState) {
//     super.onCreate(savedInstanceState);
// 
//     Feed feed = (Feed) getIntent().getSerializableExtra(Feed.class.toString());
// 
//     feedEpisodesAsyncTask = new FeedEpisodesAsyncTask(this, feed);
// 
//     feedEpisodesAsyncTask.execute();
//   }
// 
//   @Override
//   protected void onPause() {
//     super.onPause();
// 
//     feedEpisodesAsyncTask.cancel();
//   }
// 
//   @Override
//   protected void onDestroy() {
//     dismissProgressDialog();
// 
//     super.onDestroy();
//   }
// 
//   private void showProgressDialog(String feedTitle) {
//     progressDialog.setIndeterminate(false);
//     progressDialog.setCancelable(false);
//     progressDialog.show();
//     progressDialog.setMessage(format(
//         getResources().getString(R.string.loading_feed_episodes), feedTitle
//     ));
//   }
// 
//   private void dismissProgressDialog() {
//     if (progressDialog != null && progressDialog.isShowing()) {
//       progressDialog.dismiss();
//     }
//   }
// 
//   class FeedEpisodesAsyncTask extends RetryableAsyncTask<Void, Void, Feed> {
//     private final Activity activity;
//     private final Feed feed;
// 
//     public FeedEpisodesAsyncTask(Activity activity, Feed feed) {
//       super(activity);
// 
//       this.activity = activity;
//       this.feed = feed;
//     }
// 
//     @Override
//     protected void onPreExecute() {
//       showProgressDialog(feed.getTitle());
//     }
// 
//     @Override
//     protected Feed doInBackground(Void... params) {
//       return userFeedsRepository.getFeed(feed.getId());
//     }
// 
//     @Override
//     protected void onPostExecute(Feed feed) {
//       if (this.activity.isDestroyed()) return;
// 
//       dismissProgressDialog();
// 
//       arguments.putSerializable(
//           EpisodeList.HEADER,
//           new EpisodeListHeaderInfo(feed.getTitle(), feed.getImage())
//       );
// 
//       arguments.putSerializable(
//           EpisodeList.LIST,
//           new EpisodeList(feed.getEpisodes())
//       );
// 
//       episodeListFragment.setArguments(arguments);
// 
//       fragmentManager.beginTransaction()
//           .replace(R.id.content_frame, episodeListFragment)
//           .commitAllowingStateLoss();
//     }
//   }
// }
// 
// Path: app/src/main/java/com/mypodcasts/repositories/UserFeedsRepository.java
// public class UserFeedsRepository {
// 
//   private final HttpClient httpClient;
// 
//   @Inject
//   public UserFeedsRepository(HttpClient httpClient) {
//     this.httpClient = httpClient;
//   }
// 
//   public List<Feed> getFeeds() {
//     return httpClient.getApi().getUserFeeds();
//   }
// 
//   public Feed getFeed(String id) {
//     return httpClient.getApi().getFeed(id);
//   }
// }
// 
// Path: app/src/main/java/com/mypodcasts/repositories/models/Feed.java
// public class Feed implements Serializable {
//   private String id;
//   private String title;
//   private Image image;
//   private List<Episode> episodes;
// 
//   public String getId() {
//     return id;
//   }
// 
//   public String getTitle() {
//     return title;
//   }
// 
//   public Image getImage() {
//     return image;
//   }
// 
//   public List<Episode> getEpisodes() {
//     return episodes;
//   }
// 
// }


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.mypodcasts.episodes.EpisodeFeedsActivity;
import com.mypodcasts.repositories.UserFeedsRepository;
import com.mypodcasts.repositories.models.Feed;
import java.util.List;
import javax.inject.Inject;
import retryable.asynctask.RetryableAsyncTask;
import roboguice.activity.RoboActionBarActivity;
import roboguice.inject.ContentView;
import roboguice.inject.InjectView;
package com.mypodcasts;






@ContentView(R.layout.base_layout)
public class MyPodcastsActivity extends RoboActionBarActivity {

  @InjectView(R.id.tool_bar)
  private Toolbar toolbar;

  @InjectView(R.id.drawer_layout)
  private DrawerLayout drawerLayout;

  @InjectView(R.id.left_drawer)
  private ListView leftDrawer;

  @Inject
// Path: app/src/main/java/com/mypodcasts/episodes/EpisodeFeedsActivity.java
// public class EpisodeFeedsActivity extends MyPodcastsActivity {
// 
//   @Inject
//   private FragmentManager fragmentManager;
// 
//   @Inject
//   private Bundle arguments;
// 
//   @Inject
//   private EpisodeListFragment episodeListFragment;
// 
//   @Inject
//   private ProgressDialog progressDialog;
// 
//   @Inject
//   private UserFeedsRepository userFeedsRepository;
//   private FeedEpisodesAsyncTask feedEpisodesAsyncTask;
// 
//   @Override
//   protected void onCreate(Bundle savedInstanceState) {
//     super.onCreate(savedInstanceState);
// 
//     Feed feed = (Feed) getIntent().getSerializableExtra(Feed.class.toString());
// 
//     feedEpisodesAsyncTask = new FeedEpisodesAsyncTask(this, feed);
// 
//     feedEpisodesAsyncTask.execute();
//   }
// 
//   @Override
//   protected void onPause() {
//     super.onPause();
// 
//     feedEpisodesAsyncTask.cancel();
//   }
// 
//   @Override
//   protected void onDestroy() {
//     dismissProgressDialog();
// 
//     super.onDestroy();
//   }
// 
//   private void showProgressDialog(String feedTitle) {
//     progressDialog.setIndeterminate(false);
//     progressDialog.setCancelable(false);
//     progressDialog.show();
//     progressDialog.setMessage(format(
//         getResources().getString(R.string.loading_feed_episodes), feedTitle
//     ));
//   }
// 
//   private void dismissProgressDialog() {
//     if (progressDialog != null && progressDialog.isShowing()) {
//       progressDialog.dismiss();
//     }
//   }
// 
//   class FeedEpisodesAsyncTask extends RetryableAsyncTask<Void, Void, Feed> {
//     private final Activity activity;
//     private final Feed feed;
// 
//     public FeedEpisodesAsyncTask(Activity activity, Feed feed) {
//       super(activity);
// 
//       this.activity = activity;
//       this.feed = feed;
//     }
// 
//     @Override
//     protected void onPreExecute() {
//       showProgressDialog(feed.getTitle());
//     }
// 
//     @Override
//     protected Feed doInBackground(Void... params) {
//       return userFeedsRepository.getFeed(feed.getId());
//     }
// 
//     @Override
//     protected void onPostExecute(Feed feed) {
//       if (this.activity.isDestroyed()) return;
// 
//       dismissProgressDialog();
// 
//       arguments.putSerializable(
//           EpisodeList.HEADER,
//           new EpisodeListHeaderInfo(feed.getTitle(), feed.getImage())
//       );
// 
//       arguments.putSerializable(
//           EpisodeList.LIST,
//           new EpisodeList(feed.getEpisodes())
//       );
// 
//       episodeListFragment.setArguments(arguments);
// 
//       fragmentManager.beginTransaction()
//           .replace(R.id.content_frame, episodeListFragment)
//           .commitAllowingStateLoss();
//     }
//   }
// }
// 
// Path: app/src/main/java/com/mypodcasts/repositories/UserFeedsRepository.java
// public class UserFeedsRepository {
// 
//   private final HttpClient httpClient;
// 
//   @Inject
//   public UserFeedsRepository(HttpClient httpClient) {
//     this.httpClient = httpClient;
//   }
// 
//   public List<Feed> getFeeds() {
//     return httpClient.getApi().getUserFeeds();
//   }
// 
//   public Feed getFeed(String id) {
//     return httpClient.getApi().getFeed(id);
//   }
// }
// 
// Path: app/src/main/java/com/mypodcasts/repositories/models/Feed.java
// public class Feed implements Serializable {
//   private String id;
//   private String title;
//   private Image image;
//   private List<Episode> episodes;
// 
//   public String getId() {
//     return id;
//   }
// 
//   public String getTitle() {
//     return title;
//   }
// 
//   public Image getImage() {
//     return image;
//   }
// 
//   public List<Episode> getEpisodes() {
//     return episodes;
//   }
// 
// }


// Path: app/src/main/java/com/mypodcasts/MyPodcastsActivity.java
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.mypodcasts.episodes.EpisodeFeedsActivity;
import com.mypodcasts.repositories.UserFeedsRepository;
import com.mypodcasts.repositories.models.Feed;
import java.util.List;
import javax.inject.Inject;
import retryable.asynctask.RetryableAsyncTask;
import roboguice.activity.RoboActionBarActivity;
import roboguice.inject.ContentView;
import roboguice.inject.InjectView;

package com.mypodcasts;






@ContentView(R.layout.base_layout)
public class MyPodcastsActivity extends RoboActionBarActivity {

  @InjectView(R.id.tool_bar)
  private Toolbar toolbar;

  @InjectView(R.id.drawer_layout)
  private DrawerLayout drawerLayout;

  @InjectView(R.id.left_drawer)
  private ListView leftDrawer;

  @Inject
  private UserFeedsRepository userFeedsRepository;