252 lines
5 KiB
Smali
252 lines
5 KiB
Smali
.class public Lf/j/d/m/c;
|
|
.super Ljava/lang/Object;
|
|
.source "UriUtil.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final a:Landroid/net/Uri;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
sget-object v0, Landroid/provider/ContactsContract;->AUTHORITY_URI:Landroid/net/Uri;
|
|
|
|
const-string v1, "display_photo"
|
|
|
|
invoke-static {v0, v1}, Landroid/net/Uri;->withAppendedPath(Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lf/j/d/m/c;->a:Landroid/net/Uri;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(I)Landroid/net/Uri;
|
|
.locals 2
|
|
|
|
new-instance v0, Landroid/net/Uri$Builder;
|
|
|
|
invoke-direct {v0}, Landroid/net/Uri$Builder;-><init>()V
|
|
|
|
const-string v1, "res"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/net/Uri$Builder;->scheme(Ljava/lang/String;)Landroid/net/Uri$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Landroid/net/Uri$Builder;->path(Ljava/lang/String;)Landroid/net/Uri$Builder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a(Landroid/net/Uri;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static b(Landroid/net/Uri;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p0}, Lf/j/d/m/c;->a(Landroid/net/Uri;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "asset"
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static c(Landroid/net/Uri;)Z
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object v0, Landroid/provider/MediaStore$Images$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;
|
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
sget-object v0, Landroid/provider/MediaStore$Images$Media;->INTERNAL_CONTENT_URI:Landroid/net/Uri;
|
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x1
|
|
|
|
:goto_1
|
|
return p0
|
|
.end method
|
|
|
|
.method public static d(Landroid/net/Uri;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p0}, Lf/j/d/m/c;->a(Landroid/net/Uri;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "content"
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static e(Landroid/net/Uri;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p0}, Lf/j/d/m/c;->a(Landroid/net/Uri;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "file"
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static f(Landroid/net/Uri;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p0}, Lf/j/d/m/c;->a(Landroid/net/Uri;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "res"
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static g(Landroid/net/Uri;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p0}, Lf/j/d/m/c;->a(Landroid/net/Uri;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "https"
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "http"
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x1
|
|
|
|
:goto_1
|
|
return p0
|
|
.end method
|
|
|
|
.method public static h(Landroid/net/Uri;)Ljava/net/URL;
|
|
.locals 1
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
new-instance v0, Ljava/net/URL;
|
|
|
|
invoke-virtual {p0}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
.end method
|