ConnectInterceptor.smali 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .class public final Lokhttp3/internal/connection/ConnectInterceptor;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # interfaces
  5. .implements Lokhttp3/Interceptor;
  6. # instance fields
  7. .field public final client:Lokhttp3/OkHttpClient;
  8. # direct methods
  9. .method public constructor <init>(Lokhttp3/OkHttpClient;)V
  10. .locals 0
  11. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  12. iput-object p1, p0, Lokhttp3/internal/connection/ConnectInterceptor;->client:Lokhttp3/OkHttpClient;
  13. return-void
  14. .end method
  15. # virtual methods
  16. .method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
  17. .locals 5
  18. .annotation system Ldalvik/annotation/Throws;
  19. value = {
  20. Ljava/io/IOException;
  21. }
  22. .end annotation
  23. move-object v0, p1
  24. check-cast v0, Lokhttp3/internal/http/RealInterceptorChain;
  25. invoke-virtual {v0}, Lokhttp3/internal/http/RealInterceptorChain;->request()Lokhttp3/Request;
  26. move-result-object v1
  27. invoke-virtual {v0}, Lokhttp3/internal/http/RealInterceptorChain;->streamAllocation()Lokhttp3/internal/connection/StreamAllocation;
  28. move-result-object v2
  29. invoke-virtual {v1}, Lokhttp3/Request;->method()Ljava/lang/String;
  30. move-result-object v3
  31. const-string v4, "GET"
  32. invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  33. move-result v3
  34. xor-int/lit8 v3, v3, 0x1
  35. iget-object v4, p0, Lokhttp3/internal/connection/ConnectInterceptor;->client:Lokhttp3/OkHttpClient;
  36. invoke-virtual {v2, v4, p1, v3}, Lokhttp3/internal/connection/StreamAllocation;->newStream(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;Z)Lokhttp3/internal/http/HttpCodec;
  37. move-result-object p1
  38. invoke-virtual {v2}, Lokhttp3/internal/connection/StreamAllocation;->connection()Lokhttp3/internal/connection/RealConnection;
  39. move-result-object v3
  40. invoke-virtual {v0, v1, v2, p1, v3}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/Request;Lokhttp3/internal/connection/StreamAllocation;Lokhttp3/internal/http/HttpCodec;Lokhttp3/internal/connection/RealConnection;)Lokhttp3/Response;
  41. move-result-object p1
  42. return-object p1
  43. .end method