267 lines
5.4 KiB
Smali
267 lines
5.4 KiB
Smali
.class public Lf/g/d/i/a;
|
|
.super Ljava/lang/Object;
|
|
.source "StatFsHelper.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lf/g/d/i/a$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static h:Lf/g/d/i/a;
|
|
|
|
.field public static final i:J
|
|
|
|
|
|
# instance fields
|
|
.field public volatile a:Landroid/os/StatFs;
|
|
|
|
.field public volatile b:Ljava/io/File;
|
|
|
|
.field public volatile c:Landroid/os/StatFs;
|
|
|
|
.field public volatile d:Ljava/io/File;
|
|
|
|
.field public e:J
|
|
|
|
.field public final f:Ljava/util/concurrent/locks/Lock;
|
|
|
|
.field public volatile g:Z
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MINUTES:Ljava/util/concurrent/TimeUnit;
|
|
|
|
const-wide/16 v1, 0x2
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
|
|
|
|
move-result-wide v0
|
|
|
|
sput-wide v0, Lf/g/d/i/a;->i:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lf/g/d/i/a;->a:Landroid/os/StatFs;
|
|
|
|
iput-object v0, p0, Lf/g/d/i/a;->c:Landroid/os/StatFs;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lf/g/d/i/a;->g:Z
|
|
|
|
new-instance v0, Ljava/util/concurrent/locks/ReentrantLock;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/locks/ReentrantLock;-><init>()V
|
|
|
|
iput-object v0, p0, Lf/g/d/i/a;->f:Ljava/util/concurrent/locks/Lock;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static declared-synchronized b()Lf/g/d/i/a;
|
|
.locals 2
|
|
|
|
const-class v0, Lf/g/d/i/a;
|
|
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
sget-object v1, Lf/g/d/i/a;->h:Lf/g/d/i/a;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
new-instance v1, Lf/g/d/i/a;
|
|
|
|
invoke-direct {v1}, Lf/g/d/i/a;-><init>()V
|
|
|
|
sput-object v1, Lf/g/d/i/a;->h:Lf/g/d/i/a;
|
|
|
|
:cond_0
|
|
sget-object v1, Lf/g/d/i/a;->h:Lf/g/d/i/a;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
return-object v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a()V
|
|
.locals 2
|
|
|
|
iget-boolean v0, p0, Lf/g/d/i/a;->g:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lf/g/d/i/a;->f:Ljava/util/concurrent/locks/Lock;
|
|
|
|
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->lock()V
|
|
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lf/g/d/i/a;->g:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-static {}, Landroid/os/Environment;->getDataDirectory()Ljava/io/File;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lf/g/d/i/a;->b:Ljava/io/File;
|
|
|
|
invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lf/g/d/i/a;->d:Ljava/io/File;
|
|
|
|
invoke-virtual {p0}, Lf/g/d/i/a;->c()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lf/g/d/i/a;->g:Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lf/g/d/i/a;->f:Ljava/util/concurrent/locks/Lock;
|
|
|
|
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->unlock()V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
iget-object v1, p0, Lf/g/d/i/a;->f:Ljava/util/concurrent/locks/Lock;
|
|
|
|
invoke-interface {v1}, Ljava/util/concurrent/locks/Lock;->unlock()V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final c()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lf/g/d/i/a;->a:Landroid/os/StatFs;
|
|
|
|
iget-object v1, p0, Lf/g/d/i/a;->b:Ljava/io/File;
|
|
|
|
invoke-virtual {p0, v0, v1}, Lf/g/d/i/a;->d(Landroid/os/StatFs;Ljava/io/File;)Landroid/os/StatFs;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lf/g/d/i/a;->a:Landroid/os/StatFs;
|
|
|
|
iget-object v0, p0, Lf/g/d/i/a;->c:Landroid/os/StatFs;
|
|
|
|
iget-object v1, p0, Lf/g/d/i/a;->d:Ljava/io/File;
|
|
|
|
invoke-virtual {p0, v0, v1}, Lf/g/d/i/a;->d(Landroid/os/StatFs;Ljava/io/File;)Landroid/os/StatFs;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lf/g/d/i/a;->c:Landroid/os/StatFs;
|
|
|
|
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
iput-wide v0, p0, Lf/g/d/i/a;->e:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final d(Landroid/os/StatFs;Ljava/io/File;)Landroid/os/StatFs;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-virtual {p2}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
if-nez p1, :cond_1
|
|
|
|
:try_start_0
|
|
invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Landroid/os/StatFs;
|
|
|
|
invoke-direct {p2, p1}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V
|
|
|
|
move-object p1, p2
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/StatFs;->restat(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:goto_0
|
|
move-object v0, p1
|
|
|
|
goto :goto_2
|
|
|
|
:goto_1
|
|
invoke-static {p1}, Le0/a/b/b/a;->B0(Ljava/lang/Throwable;)V
|
|
|
|
new-instance p2, Ljava/lang/RuntimeException;
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw p2
|
|
|
|
:catch_0
|
|
:cond_2
|
|
:goto_2
|
|
return-object v0
|
|
.end method
|