apkfuckery/com.discord/smali/com/facebook/soloader/f.smali

121 lines
3 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public final Lcom/facebook/soloader/f;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "FileLocker.java"
2019-02-04 20:08:30 +00:00
# interfaces
.implements Ljava/io/Closeable;
# instance fields
2019-03-14 20:04:00 +00:00
.field private final Xo:Ljava/io/FileOutputStream;
2019-02-04 20:08:30 +00:00
2019-03-14 20:04:00 +00:00
.field private final Xp:Ljava/nio/channels/FileLock;
2019-02-04 20:08:30 +00:00
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
# direct methods
.method private constructor <init>(Ljava/io/File;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/io/FileOutputStream;
invoke-direct {v0, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
2019-03-14 20:04:00 +00:00
iput-object v0, p0, Lcom/facebook/soloader/f;->Xo:Ljava/io/FileOutputStream;
2019-02-04 20:08:30 +00:00
:try_start_0
2019-03-14 20:04:00 +00:00
iget-object p1, p0, Lcom/facebook/soloader/f;->Xo:Ljava/io/FileOutputStream;
2019-02-04 20:08:30 +00:00
invoke-virtual {p1}, Ljava/io/FileOutputStream;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object p1
invoke-virtual {p1}, Ljava/nio/channels/FileChannel;->lock()Ljava/nio/channels/FileLock;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez p1, :cond_0
2019-03-14 20:04:00 +00:00
iget-object v0, p0, Lcom/facebook/soloader/f;->Xo:Ljava/io/FileOutputStream;
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
:cond_0
2019-03-14 20:04:00 +00:00
iput-object p1, p0, Lcom/facebook/soloader/f;->Xp:Ljava/nio/channels/FileLock;
2019-02-04 20:08:30 +00:00
return-void
:catchall_0
move-exception p1
2019-03-14 20:04:00 +00:00
iget-object v0, p0, Lcom/facebook/soloader/f;->Xo:Ljava/io/FileOutputStream;
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
throw p1
.end method
.method public static q(Ljava/io/File;)Lcom/facebook/soloader/f;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
new-instance v0, Lcom/facebook/soloader/f;
invoke-direct {v0, p0}, Lcom/facebook/soloader/f;-><init>(Ljava/io/File;)V
return-object v0
.end method
# virtual methods
.method public final close()V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
:try_start_0
2019-03-14 20:04:00 +00:00
iget-object v0, p0, Lcom/facebook/soloader/f;->Xp:Ljava/nio/channels/FileLock;
2019-02-04 20:08:30 +00:00
if-eqz v0, :cond_0
2019-03-14 20:04:00 +00:00
iget-object v0, p0, Lcom/facebook/soloader/f;->Xp:Ljava/nio/channels/FileLock;
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Ljava/nio/channels/FileLock;->release()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:cond_0
2019-03-14 20:04:00 +00:00
iget-object v0, p0, Lcom/facebook/soloader/f;->Xo:Ljava/io/FileOutputStream;
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
return-void
:catchall_0
move-exception v0
2019-03-14 20:04:00 +00:00
iget-object v1, p0, Lcom/facebook/soloader/f;->Xo:Ljava/io/FileOutputStream;
2019-02-04 20:08:30 +00:00
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
throw v0
.end method