199 lines
3.9 KiB
Smali
199 lines
3.9 KiB
Smali
.class public final Lf/k/a/b/h1/t/h;
|
|
.super Ljava/lang/Object;
|
|
.source "WebvttParserUtil.java"
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-string v0, "^NOTE([ \t].*)?$"
|
|
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;)F
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/NumberFormatException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "%"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F
|
|
|
|
move-result p0
|
|
|
|
const/high16 v0, 0x42c80000 # 100.0f
|
|
|
|
div-float/2addr p0, v0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/NumberFormatException;
|
|
|
|
const-string v0, "Percentages must end with %"
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static a(Lf/k/a/b/l1/u;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lf/k/a/b/k0;
|
|
}
|
|
.end annotation
|
|
|
|
iget v0, p0, Lf/k/a/b/l1/u;->b:I
|
|
|
|
invoke-virtual {p0}, Lf/k/a/b/l1/u;->d()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v2, "WEBVTT"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, v0}, Lf/k/a/b/l1/u;->e(I)V
|
|
|
|
new-instance v0, Lf/k/a/b/k0;
|
|
|
|
const-string v1, "Expected WEBVTT. Got "
|
|
|
|
invoke-static {v1}, Lf/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Lf/k/a/b/l1/u;->d()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Lf/k/a/b/k0;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static b(Ljava/lang/String;)J
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/NumberFormatException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "\\."
|
|
|
|
invoke-static {p0, v0}, Lf/k/a/b/l1/f0;->b(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
aget-object v1, p0, v0
|
|
|
|
const-string v2, ":"
|
|
|
|
invoke-static {v1, v2}, Lf/k/a/b/l1/f0;->a(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
array-length v2, v1
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v0, v2, :cond_0
|
|
|
|
aget-object v5, v1, v0
|
|
|
|
const-wide/16 v6, 0x3c
|
|
|
|
mul-long v3, v3, v6
|
|
|
|
invoke-static {v5}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v5
|
|
|
|
add-long/2addr v3, v5
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-wide/16 v0, 0x3e8
|
|
|
|
mul-long v3, v3, v0
|
|
|
|
array-length v2, p0
|
|
|
|
const/4 v5, 0x2
|
|
|
|
if-ne v2, v5, :cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object p0, p0, v2
|
|
|
|
invoke-static {p0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v5
|
|
|
|
add-long/2addr v3, v5
|
|
|
|
:cond_1
|
|
mul-long v3, v3, v0
|
|
|
|
return-wide v3
|
|
.end method
|