本文整理匯總了Java中com.facebook.internal.ImageResponse.isCachedRedirect方法的典型用法代碼示例。如果您正苦於以下問題:Java ImageResponse.isCachedRedirect方法的具體用法?Java ImageResponse.isCachedRedirect怎麽用?Java ImageResponse.isCachedRedirect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.internal.ImageResponse
的用法示例。
在下文中一共展示了ImageResponse.isCachedRedirect方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: processResponse
import com.facebook.internal.ImageResponse; //導入方法依賴的package包/類
private void processResponse(ImageResponse response) {
// First check if the response is for the right request. We may have:
// 1. Sent a new request, thus super-ceding this one.
// 2. Detached this view, in which case the response should be discarded.
if (response.getRequest() == lastRequest) {
lastRequest = null;
Bitmap responseImage = response.getBitmap();
Exception error = response.getError();
if (error != null) {
OnErrorListener listener = onErrorListener;
if (listener != null) {
listener.onError(new FacebookException(
"Error in downloading profile picture for profileId: " + getProfileId(), error));
} else {
Logger.log(LoggingBehavior.REQUESTS, Log.ERROR, TAG, error.toString());
}
} else if (responseImage != null) {
setImageBitmap(responseImage);
if (response.isCachedRedirect()) {
sendImageRequest(false);
}
}
}
}
示例2: processResponse
import com.facebook.internal.ImageResponse; //導入方法依賴的package包/類
private void processResponse(ImageResponse paramImageResponse)
{
if (paramImageResponse.getRequest() == this.lastRequest)
{
this.lastRequest = null;
Bitmap localBitmap = paramImageResponse.getBitmap();
Exception localException = paramImageResponse.getError();
if (localException != null)
{
OnErrorListener localOnErrorListener = this.onErrorListener;
if (localOnErrorListener != null)
{
localOnErrorListener.onError(new FacebookException("Error in downloading profile picture for profileId: " + getProfileId(), localException));
return;
}
Logger.log(LoggingBehavior.REQUESTS, 6, TAG, localException.toString());
return;
}
if (localBitmap != null)
{
setImageBitmap(localBitmap);
if (paramImageResponse.isCachedRedirect())
sendImageRequest(false);
}
}
}
示例3: processResponse
import com.facebook.internal.ImageResponse; //導入方法依賴的package包/類
private void processResponse(ImageResponse response)
{
// First check if the response is for the right request. We may have:
// 1. Sent a new request, thus super-ceding this one.
// 2. Detached this view, in which case the response should be
// discarded.
if (response.getRequest() == lastRequest)
{
lastRequest = null;
Bitmap responseImage = response.getBitmap();
Exception error = response.getError();
if (error != null)
{
OnErrorListener listener = onErrorListener;
if (listener != null)
{
listener.onError(new FacebookException( "Error in downloading profile picture for profileId: "
+ getProfileId(),
error));
}
else
{
Logger.log(LoggingBehavior.REQUESTS,
Log.ERROR, TAG, error.toString());
}
}
else if (responseImage != null)
{
if (m_OnImageChangedEventListener != null)
{
responseImage =
m_OnImageChangedEventListener
.onImageChangedEventListener(responseImage);
}
setImageBitmap(responseImage);
if (response.isCachedRedirect())
{
sendImageRequest(false);
}
}
}
}