Skip to content

Commit

Permalink
Execute SBS auth and episode details async (not in serial pool)
Browse files Browse the repository at this point in the history
  • Loading branch information
xwz committed Oct 2, 2015
1 parent 3967e9c commit 2b03861
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion base/base.iml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<orderEntry type="library" exported="" name="okhttp-2.5.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.6.0" level="project" />
<orderEntry type="library" exported="" name="leanback-v17-23.0.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="DBFlow-Core-2.2.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.0.0" level="project" />
<orderEntry type="library" exported="" name="DBFlow-2.2.1" level="project" />
</component>
Expand Down
3 changes: 1 addition & 2 deletions iview/iview.iml
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,15 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.5.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.6.0" level="project" />
<orderEntry type="library" exported="" name="picasso-2.5.2" level="project" />
<orderEntry type="library" exported="" name="DBFlow-Core-2.2.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="DBFlow-Core-2.2.1" level="project" />
<orderEntry type="module" module-name="base" exported="" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ public void fetchEpisode(EpisodeBaseModel episode) {
if (existing != null && existing.hasExtras() && existing.hasOtherEpisodes()) {
cache().broadcastChangeDelayed(100, CONTENT_EPISODE_DONE, episode.getHref(), null);
} else {
new SBSRelatedApi(getContext(), episode.getHref()).execute(episode.getHref());
new SBSRelatedApi(getContext(), episode.getHref()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, episode.getHref());
}
}

@Override
public void fetchAuthToken(EpisodeBaseModel episode) {
Log.d(TAG, "fetchAuthToken");
cache().broadcastChange(CONTENT_AUTH_FETCHING, episode.getHref());
new SBSAuthApi(getContext(), episode.getHref()).execute(episode.getHref());
new SBSAuthApi(getContext(), episode.getHref()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, episode.getHref());
}

@Override
Expand Down

0 comments on commit 2b03861

Please sign in to comment.