107 lines
2.5 KiB
Smali
107 lines
2.5 KiB
Smali
.class public Lgg/f;
|
|
.super Lgg/a;
|
|
.source "BasicMaxAgeHandler.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcz/msebera/android/httpclient/annotation/Immutable;
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lgg/a;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public c(Lxf/k;Ljava/lang/String;)V
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Cookie"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lqg/a;->h(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 2
|
|
:try_start_0
|
|
invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-ltz v0, :cond_0
|
|
|
|
.line 3
|
|
new-instance p2, Ljava/util/Date;
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v1
|
|
|
|
int-to-long v3, v0
|
|
|
|
const-wide/16 v5, 0x3e8
|
|
|
|
mul-long/2addr v3, v5
|
|
|
|
add-long/2addr v3, v1
|
|
|
|
invoke-direct {p2, v3, v4}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-interface {p1, p2}, Lxf/k;->setExpiryDate(Ljava/util/Date;)V
|
|
|
|
return-void
|
|
|
|
.line 4
|
|
:cond_0
|
|
new-instance p1, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
|
|
const-string v0, "Negative max-age attribute: "
|
|
|
|
invoke-static {v0, p2}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 5
|
|
:catch_0
|
|
new-instance p1, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
|
|
const-string v0, "Invalid max-age attribute: "
|
|
|
|
invoke-static {v0, p2}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 6
|
|
:cond_1
|
|
new-instance p1, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;
|
|
|
|
const-string p2, "Missing value for max-age attribute"
|
|
|
|
invoke-direct {p1, p2}, Lcz/msebera/android/httpclient/cookie/MalformedCookieException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|