123 lines
3.4 KiB
Smali
123 lines
3.4 KiB
Smali
.class public final Landroidx/core/net/UriKt;
|
|
.super Ljava/lang/Object;
|
|
.source "Uri.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final toFile(Landroid/net/Uri;)Ljava/io/File;
|
|
.locals 2
|
|
|
|
const-string v0, "$this$toFile"
|
|
|
|
invoke-static {p0, v0}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "file"
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p0}, Landroid/net/Uri;->getPath()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance p0, Ljava/io/File;
|
|
|
|
invoke-direct {p0, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Uri path is null: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Uri lacks \'file\' scheme: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final toUri(Ljava/io/File;)Landroid/net/Uri;
|
|
.locals 1
|
|
|
|
const-string v0, "$this$toUri"
|
|
|
|
invoke-static {p0, v0}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "Uri.fromFile(this)"
|
|
|
|
invoke-static {p0, v0}, Lc0/n/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final toUri(Ljava/lang/String;)Landroid/net/Uri;
|
|
.locals 1
|
|
|
|
const-string v0, "$this$toUri"
|
|
|
|
invoke-static {p0, v0}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "Uri.parse(this)"
|
|
|
|
invoke-static {p0, v0}, Lc0/n/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
.end method
|