156 lines
		
	
	
		
			5.4 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			156 lines
		
	
	
		
			5.4 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
.class public Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;
 | 
						|
.super Ljava/lang/Object;
 | 
						|
.source "HttpBackOffUnsuccessfulResponseHandler.java"
 | 
						|
 | 
						|
# interfaces
 | 
						|
.implements Lcom/google/api/client/http/HttpUnsuccessfulResponseHandler;
 | 
						|
 | 
						|
 | 
						|
# annotations
 | 
						|
.annotation build Lcom/google/api/client/util/Beta;
 | 
						|
.end annotation
 | 
						|
 | 
						|
.annotation system Ldalvik/annotation/MemberClasses;
 | 
						|
    value = {
 | 
						|
        Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
    }
 | 
						|
.end annotation
 | 
						|
 | 
						|
 | 
						|
# instance fields
 | 
						|
.field private final backOff:Lcom/google/api/client/util/BackOff;
 | 
						|
 | 
						|
.field private backOffRequired:Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
 | 
						|
.field private sleeper:Lcom/google/api/client/util/Sleeper;
 | 
						|
 | 
						|
 | 
						|
# direct methods
 | 
						|
.method public constructor <init>(Lcom/google/api/client/util/BackOff;)V
 | 
						|
    .locals 1
 | 
						|
 | 
						|
    .line 1
 | 
						|
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | 
						|
 | 
						|
    .line 2
 | 
						|
    sget-object v0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;->ON_SERVER_ERROR:Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
 | 
						|
    iput-object v0, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->backOffRequired:Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
 | 
						|
    .line 3
 | 
						|
    sget-object v0, Lcom/google/api/client/util/Sleeper;->DEFAULT:Lcom/google/api/client/util/Sleeper;
 | 
						|
 | 
						|
    iput-object v0, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->sleeper:Lcom/google/api/client/util/Sleeper;
 | 
						|
 | 
						|
    .line 4
 | 
						|
    invoke-static {p1}, Lcom/google/api/client/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
 | 
						|
 | 
						|
    move-result-object p1
 | 
						|
 | 
						|
    check-cast p1, Lcom/google/api/client/util/BackOff;
 | 
						|
 | 
						|
    iput-object p1, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->backOff:Lcom/google/api/client/util/BackOff;
 | 
						|
 | 
						|
    return-void
 | 
						|
.end method
 | 
						|
 | 
						|
 | 
						|
# virtual methods
 | 
						|
.method public final getBackOff()Lcom/google/api/client/util/BackOff;
 | 
						|
    .locals 1
 | 
						|
 | 
						|
    .line 1
 | 
						|
    iget-object v0, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->backOff:Lcom/google/api/client/util/BackOff;
 | 
						|
 | 
						|
    return-object v0
 | 
						|
.end method
 | 
						|
 | 
						|
.method public final getBackOffRequired()Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
    .locals 1
 | 
						|
 | 
						|
    .line 1
 | 
						|
    iget-object v0, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->backOffRequired:Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
 | 
						|
    return-object v0
 | 
						|
.end method
 | 
						|
 | 
						|
.method public final getSleeper()Lcom/google/api/client/util/Sleeper;
 | 
						|
    .locals 1
 | 
						|
 | 
						|
    .line 1
 | 
						|
    iget-object v0, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->sleeper:Lcom/google/api/client/util/Sleeper;
 | 
						|
 | 
						|
    return-object v0
 | 
						|
.end method
 | 
						|
 | 
						|
.method public final handleResponse(Lcom/google/api/client/http/HttpRequest;Lcom/google/api/client/http/HttpResponse;Z)Z
 | 
						|
    .locals 0
 | 
						|
    .annotation system Ldalvik/annotation/Throws;
 | 
						|
        value = {
 | 
						|
            Ljava/io/IOException;
 | 
						|
        }
 | 
						|
    .end annotation
 | 
						|
 | 
						|
    const/4 p1, 0x0
 | 
						|
 | 
						|
    if-nez p3, :cond_0
 | 
						|
 | 
						|
    return p1
 | 
						|
 | 
						|
    .line 1
 | 
						|
    :cond_0
 | 
						|
    iget-object p3, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->backOffRequired:Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
 | 
						|
    invoke-interface {p3, p2}, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;->isRequired(Lcom/google/api/client/http/HttpResponse;)Z
 | 
						|
 | 
						|
    move-result p2
 | 
						|
 | 
						|
    if-eqz p2, :cond_1
 | 
						|
 | 
						|
    .line 2
 | 
						|
    :try_start_0
 | 
						|
    iget-object p2, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->sleeper:Lcom/google/api/client/util/Sleeper;
 | 
						|
 | 
						|
    iget-object p3, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->backOff:Lcom/google/api/client/util/BackOff;
 | 
						|
 | 
						|
    invoke-static {p2, p3}, Lcom/google/api/client/util/BackOffUtils;->next(Lcom/google/api/client/util/Sleeper;Lcom/google/api/client/util/BackOff;)Z
 | 
						|
 | 
						|
    move-result p1
 | 
						|
    :try_end_0
 | 
						|
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
 | 
						|
 | 
						|
    :catch_0
 | 
						|
    :cond_1
 | 
						|
    return p1
 | 
						|
.end method
 | 
						|
 | 
						|
.method public setBackOffRequired(Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;)Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;
 | 
						|
    .locals 0
 | 
						|
 | 
						|
    .line 1
 | 
						|
    invoke-static {p1}, Lcom/google/api/client/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
 | 
						|
 | 
						|
    move-result-object p1
 | 
						|
 | 
						|
    check-cast p1, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
 | 
						|
    iput-object p1, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->backOffRequired:Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler$BackOffRequired;
 | 
						|
 | 
						|
    return-object p0
 | 
						|
.end method
 | 
						|
 | 
						|
.method public setSleeper(Lcom/google/api/client/util/Sleeper;)Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;
 | 
						|
    .locals 0
 | 
						|
 | 
						|
    .line 1
 | 
						|
    invoke-static {p1}, Lcom/google/api/client/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
 | 
						|
 | 
						|
    move-result-object p1
 | 
						|
 | 
						|
    check-cast p1, Lcom/google/api/client/util/Sleeper;
 | 
						|
 | 
						|
    iput-object p1, p0, Lcom/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler;->sleeper:Lcom/google/api/client/util/Sleeper;
 | 
						|
 | 
						|
    return-object p0
 | 
						|
.end method
 |