Created
May 12, 2012 15:54
-
-
Save nalitzis/2667280 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private abstract class CallbackListener implements INetworkTasksListener{ | |
private CountDownLatch signal; | |
CallbackListener(CountDownLatch signal){ | |
this.signal = signal; | |
} | |
public void onSuccess(Media... medias) { | |
signal.countDown(); | |
} | |
public void onFail(Throwable t) { | |
signal.countDown(); | |
} | |
} | |
private class GetMediaListener extends CallbackListener{ | |
GetMediaListener(CountDownLatch signal){ | |
super(signal); | |
} | |
public void onSuccess(Media... medias) { | |
Media m = medias[0]; | |
Log.d(TAG, "media uri path is "+m.getMediaUrl()); | |
Assert.assertTrue(true); | |
super.onSuccess(medias); | |
} | |
public void onFail(Throwable t) { | |
Assert.assertTrue(false); | |
super.onFail(t); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment