// Path: app/src/main/java/com/mypodcasts/MyPodcastsActivity.java
// @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;
//   private FeedsAsyncTask feedsAsyncTask;
// 
//   @Override
//   protected void onCreate(Bundle savedInstanceState) {
//     super.onCreate(savedInstanceState);
// 
//     setSupportActionBar(toolbar);
//     setActionBarDrawerToggle(drawerLayout, toolbar);
// 
//     leftDrawer.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//       @Override
//       public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//         Feed feed = (Feed) leftDrawer.getAdapter().getItem(position);
//         Intent intent = new Intent(view.getContext(), EpisodeFeedsActivity.class);
//         intent.putExtra(Feed.class.toString(), feed);
// 
//         startActivity(intent);
//       }
//     });
// 
//     feedsAsyncTask = new FeedsAsyncTask(this);
// 
//     feedsAsyncTask.execute();
//   }
// 
//   @Override
//   protected void onPause() {
//     super.onPause();
// 
//     feedsAsyncTask.cancel();
//   }
// 
//   @Override
//   public boolean onCreateOptionsMenu(Menu menu) {
//     MenuInflater inflater = getMenuInflater();
//     inflater.inflate(R.menu.menu_main, menu);
// 
//     return super.onCreateOptionsMenu(menu);
//   }
// 
//   @Override
//   public boolean onOptionsItemSelected(MenuItem item) {
//     int id = item.getItemId();
//     if (id == R.id.action_settings) {
//       return true;
//     }
// 
//     return super.onOptionsItemSelected(item);
//   }
// 
//   private void setActionBarDrawerToggle(DrawerLayout drawerLayout, Toolbar toolbar) {
//     ActionBarDrawerToggle actionBarDrawerToggle = new ActionBarDrawerToggle(
//         this, drawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close);
// 
//     drawerLayout.setDrawerListener(actionBarDrawerToggle);
//     actionBarDrawerToggle.syncState();
//   }
// 
//   private class FeedsAsyncTask extends RetryableAsyncTask<Void, Void, List<Feed>> {
//     public FeedsAsyncTask(Activity activity) {
//       super(activity);
//     }
// 
//     @Override
//     protected List<Feed> doInBackground(Void... params) {
//       return userFeedsRepository.getFeeds();
//     }
// 
//     @Override
//     protected void onPostExecute(List<Feed> feeds) {
//       leftDrawer.setAdapter(new FeedsAdapter(feeds, getLayoutInflater()));
//     }
//   }
// }
// 
// 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.app.FragmentManager;
import android.app.ProgressDialog;
import android.os.Bundle;
import com.mypodcasts.MyPodcastsActivity;
import com.mypodcasts.R;
import com.mypodcasts.repositories.UserFeedsRepository;
import com.mypodcasts.repositories.models.Feed;
import javax.inject.Inject;
import retryable.asynctask.RetryableAsyncTask;
import static java.lang.String.format;
package com.mypodcasts.episodes;






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);

// Path: app/src/main/java/com/mypodcasts/MyPodcastsActivity.java
// @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;
//   private FeedsAsyncTask feedsAsyncTask;
// 
//   @Override
//   protected void onCreate(Bundle savedInstanceState) {
//     super.onCreate(savedInstanceState);
// 
//     setSupportActionBar(toolbar);
//     setActionBarDrawerToggle(drawerLayout, toolbar);
// 
//     leftDrawer.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//       @Override
//       public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//         Feed feed = (Feed) leftDrawer.getAdapter().getItem(position);
//         Intent intent = new Intent(view.getContext(), EpisodeFeedsActivity.class);
//         intent.putExtra(Feed.class.toString(), feed);
// 
//         startActivity(intent);
//       }
//     });
// 
//     feedsAsyncTask = new FeedsAsyncTask(this);
// 
//     feedsAsyncTask.execute();
//   }
// 
//   @Override
//   protected void onPause() {
//     super.onPause();
// 
//     feedsAsyncTask.cancel();
//   }
// 
//   @Override
//   public boolean onCreateOptionsMenu(Menu menu) {
//     MenuInflater inflater = getMenuInflater();
//     inflater.inflate(R.menu.menu_main, menu);
// 
//     return super.onCreateOptionsMenu(menu);
//   }
// 
//   @Override
//   public boolean onOptionsItemSelected(MenuItem item) {
//     int id = item.getItemId();
//     if (id == R.id.action_settings) {
//       return true;
//     }
// 
//     return super.onOptionsItemSelected(item);
//   }
// 
//   private void setActionBarDrawerToggle(DrawerLayout drawerLayout, Toolbar toolbar) {
//     ActionBarDrawerToggle actionBarDrawerToggle = new ActionBarDrawerToggle(
//         this, drawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close);
// 
//     drawerLayout.setDrawerListener(actionBarDrawerToggle);
//     actionBarDrawerToggle.syncState();
//   }
// 
//   private class FeedsAsyncTask extends RetryableAsyncTask<Void, Void, List<Feed>> {
//     public FeedsAsyncTask(Activity activity) {
//       super(activity);
//     }
// 
//     @Override
//     protected List<Feed> doInBackground(Void... params) {
//       return userFeedsRepository.getFeeds();
//     }
// 
//     @Override
//     protected void onPostExecute(List<Feed> feeds) {
//       leftDrawer.setAdapter(new FeedsAdapter(feeds, getLayoutInflater()));
//     }
//   }
// }
// 
// 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/episodes/EpisodeFeedsActivity.java
import android.app.Activity;
import android.app.FragmentManager;
import android.app.ProgressDialog;
import android.os.Bundle;
import com.mypodcasts.MyPodcastsActivity;
import com.mypodcasts.R;
import com.mypodcasts.repositories.UserFeedsRepository;
import com.mypodcasts.repositories.models.Feed;
import javax.inject.Inject;
import retryable.asynctask.RetryableAsyncTask;
import static java.lang.String.format;

package com.mypodcasts.episodes;






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());