apkfuckery/com.discord/smali/androidx/documentfile/provider/DocumentFile.smali

258 lines
7.2 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public abstract Landroidx/documentfile/provider/DocumentFile;
.super Ljava/lang/Object;
.source "DocumentFile.java"
# static fields
2019-12-06 03:29:40 +00:00
.field public static final TAG:Ljava/lang/String; = "DocumentFile"
2019-07-24 11:27:29 +00:00
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mParent:Landroidx/documentfile/provider/DocumentFile;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end field
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(Landroidx/documentfile/provider/DocumentFile;)V
2019-07-24 11:27:29 +00:00
.locals 0
2019-12-06 03:29:40 +00:00
.param p1 # Landroidx/documentfile/provider/DocumentFile;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/documentfile/provider/DocumentFile;->mParent:Landroidx/documentfile/provider/DocumentFile;
return-void
.end method
.method public static fromFile(Ljava/io/File;)Landroidx/documentfile/provider/DocumentFile;
.locals 2
2019-12-06 03:29:40 +00:00
.param p0 # Ljava/io/File;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-07-24 11:27:29 +00:00
new-instance v0, Landroidx/documentfile/provider/RawDocumentFile;
const/4 v1, 0x0
invoke-direct {v0, v1, p0}, Landroidx/documentfile/provider/RawDocumentFile;-><init>(Landroidx/documentfile/provider/DocumentFile;Ljava/io/File;)V
return-object v0
.end method
.method public static fromSingleUri(Landroid/content/Context;Landroid/net/Uri;)Landroidx/documentfile/provider/DocumentFile;
2019-12-06 03:29:40 +00:00
.locals 2
.param p0 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroid/net/Uri;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
new-instance v0, Landroidx/documentfile/provider/SingleDocumentFile;
2019-12-06 03:29:40 +00:00
const/4 v1, 0x0
2019-07-24 11:27:29 +00:00
invoke-direct {v0, v1, p0, p1}, Landroidx/documentfile/provider/SingleDocumentFile;-><init>(Landroidx/documentfile/provider/DocumentFile;Landroid/content/Context;Landroid/net/Uri;)V
return-object v0
.end method
.method public static fromTreeUri(Landroid/content/Context;Landroid/net/Uri;)Landroidx/documentfile/provider/DocumentFile;
.locals 3
2019-12-06 03:29:40 +00:00
.param p0 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroid/net/Uri;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
new-instance v0, Landroidx/documentfile/provider/TreeDocumentFile;
2019-12-06 03:29:40 +00:00
const/4 v1, 0x0
2019-07-24 11:27:29 +00:00
invoke-static {p1}, Landroid/provider/DocumentsContract;->getTreeDocumentId(Landroid/net/Uri;)Ljava/lang/String;
move-result-object v2
invoke-static {p1, v2}, Landroid/provider/DocumentsContract;->buildDocumentUriUsingTree(Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;
move-result-object p1
invoke-direct {v0, v1, p0, p1}, Landroidx/documentfile/provider/TreeDocumentFile;-><init>(Landroidx/documentfile/provider/DocumentFile;Landroid/content/Context;Landroid/net/Uri;)V
return-object v0
.end method
.method public static isDocumentUri(Landroid/content/Context;Landroid/net/Uri;)Z
2019-12-06 03:29:40 +00:00
.locals 1
.param p0 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroid/net/Uri;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
invoke-static {p0, p1}, Landroid/provider/DocumentsContract;->isDocumentUri(Landroid/content/Context;Landroid/net/Uri;)Z
move-result p0
return p0
.end method
# virtual methods
.method public abstract canRead()Z
.end method
.method public abstract canWrite()Z
.end method
.method public abstract createDirectory(Ljava/lang/String;)Landroidx/documentfile/provider/DocumentFile;
2019-12-06 03:29:40 +00:00
.param p1 # Ljava/lang/String;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
.end method
.method public abstract createFile(Ljava/lang/String;Ljava/lang/String;)Landroidx/documentfile/provider/DocumentFile;
2019-12-06 03:29:40 +00:00
.param p1 # Ljava/lang/String;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Ljava/lang/String;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
.end method
.method public abstract delete()Z
.end method
.method public abstract exists()Z
.end method
.method public findFile(Ljava/lang/String;)Landroidx/documentfile/provider/DocumentFile;
.locals 5
2019-12-06 03:29:40 +00:00
.param p1 # Ljava/lang/String;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
invoke-virtual {p0}, Landroidx/documentfile/provider/DocumentFile;->listFiles()[Landroidx/documentfile/provider/DocumentFile;
move-result-object v0
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_1
aget-object v3, v0, v2
invoke-virtual {v3}, Landroidx/documentfile/provider/DocumentFile;->getName()Ljava/lang/String;
move-result-object v4
invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
return-object v3
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
const/4 p1, 0x0
return-object p1
.end method
.method public abstract getName()Ljava/lang/String;
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
.end method
.method public getParentFile()Landroidx/documentfile/provider/DocumentFile;
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
iget-object v0, p0, Landroidx/documentfile/provider/DocumentFile;->mParent:Landroidx/documentfile/provider/DocumentFile;
return-object v0
.end method
.method public abstract getType()Ljava/lang/String;
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
.end method
.method public abstract getUri()Landroid/net/Uri;
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-07-24 11:27:29 +00:00
.end method
.method public abstract isDirectory()Z
.end method
.method public abstract isFile()Z
.end method
.method public abstract isVirtual()Z
.end method
.method public abstract lastModified()J
.end method
.method public abstract length()J
.end method
.method public abstract listFiles()[Landroidx/documentfile/provider/DocumentFile;
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/NonNull;
.end annotation
2019-07-24 11:27:29 +00:00
.end method
.method public abstract renameTo(Ljava/lang/String;)Z
2019-12-06 03:29:40 +00:00
.param p1 # Ljava/lang/String;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
.end method