StorageInsufficientCheckHelp.smali
.class public Lcom/cleanmaster/junk/util/StorageInsufficientCheckHelp;
.super Ljava/lang/Object;
.source "StorageInsufficientCheckHelp.java"
# static fields
.field public static final DU_STORAGE_INSUFFICIENT_USED_SIZE_PERCENT:I = 0x58
.field public static final MIN_SIZE_LIMIT:I = 0x1f4
.field public static final SD_STORAGE_INSUFFICIENT_FREE_SIZE:J = 0x80000000L
.field public static final SD_STORAGE_INSUFFICIENT_USED_SIZE_PERCENT:I = 0x55
.field public static final STORAGE_MIDLE_INSUFFICIENT_USED_SIZE_PERCENT:I = 0x50
.field public static final STORAGE_STATUS_ALMOST_SUFFICIENT:I = 0x2
.field public static final STORAGE_STATUS_INSUFFICIENT:I = 0x3
.field public static final STORAGE_STATUS_SUFFICIENT:I = 0x1
.field public static final STORAGE_URGENT_INSUFFICIENT_USED_SIZE_PERCENT:I = 0x55
.field public static final SYS_STORAGE_INSUFFICIENT_FREE_SIZE:J = 0x40000000L
.field public static final SYS_STORAGE_INSUFFICIENT_USED_SIZE_PERCENT:I = 0x55
.field public static final TRIGGER_APK:I = 0x3
.field public static final TRIGGER_TAKEPIC:I = 0x2
.field public static final TRIGGER_UNLOCK:I = 0x1
.field public static final TYPE_EMULATE_STORAGE:I = 0x3
.field public static final TYPE_EMULATE_URGENT_STORAGE:I = 0x7
.field public static final TYPE_INTERNAL_STORAGE:I = 0x2
.field public static final TYPE_INTERNAL_URGENT_STORAGE:I = 0x6
.field public static final TYPE_SD_STORAGE:I = 0x4
.field public static final TYPE_SD_URGENT_STORAGE:I = 0x8
.field public static final TYPE_SYSTEM_STORAGE:I = 0x1
.field public static final TYPE_SYSTEM_URGENT_STORAGE:I = 0x5
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 9
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static checkStorageWhetherInsufficient(I)Z
.registers 9
.prologue
const/4 v6, 0x1
.line 94
invoke-static {}, Lcom/cleanmaster/junk/util/StorageInfoUtils;->getDeviceStorageInfo()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v2
.line 95
const/4 v0, 0x0
.line 96
sget-boolean v1, Lcom/cleanmaster/junk/util/EmulateSdCardUtils;->s_bSdcardDataSame:Z
if-eqz v1, :cond_1e
move-object v7, v0
.line 101
:goto_b
if-eqz v2, :cond_24
.line 103
sget-boolean v0, Lcom/cleanmaster/junk/util/EmulateSdCardUtils;->s_bSdcardDataSame:Z
if-eqz v0, :cond_34
.line 104
const/4 v4, 0x3
.line 109
:goto_12
iget-wide v0, v2, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
iget-wide v2, v2, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->freeSize:J
move v5, p0
invoke-static/range {v0 .. v5}, Lcom/cleanmaster/junk/util/StorageInsufficientCheckHelp;->showStorageNotEnough(JJII)Z
move-result v0
if-eqz v0, :cond_24
.line 118
:cond_1d
:goto_1d
return v6
.line 99
:cond_1e
invoke-static {}, Lcom/cleanmaster/junk/util/Commons;->getAllSdCardsStorageInfo()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v0
move-object v7, v0
goto :goto_b
.line 114
:cond_24
if-eqz v7, :cond_32
iget-wide v0, v7, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
iget-wide v2, v7, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->freeSize:J
const/4 v4, 0x4
move v5, p0
invoke-static/range {v0 .. v5}, Lcom/cleanmaster/junk/util/StorageInsufficientCheckHelp;->showStorageNotEnough(JJII)Z
move-result v0
if-nez v0, :cond_1d
.line 118
:cond_32
const/4 v6, 0x0
goto :goto_1d
:cond_34
move v4, v6
goto :goto_12
.end method
.method private static getPercentage(JJ)I
.registers 6
.prologue
.line 123
sub-long v0, p0, p2
:try_start_2
invoke-static {v0, v1, p0, p1}, Lcom/cleanmaster/junk/util/Commons;->calcPercentage(JJ)I
:try_end_5
.catch Ljava/lang/IllegalArgumentException; {:try_start_2 .. :try_end_5} :catch_7
move-result v0
.line 127
:goto_6
return v0
.line 124
:catch_7
move-exception v0
.line 127
const/4 v0, -0x1
goto :goto_6
.end method
.method public static getPhoneStorageInfo()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
.registers 8
.prologue
const-wide/16 v0, 0x0
.line 161
new-instance v4, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
invoke-direct {v4}, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;-><init>()V
.line 163
invoke-static {}, Lcom/cleanmaster/junk/util/StorageInfoUtils;->getDeviceStorageInfoEx()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v5
.line 164
if-eqz v5, :cond_34
.line 165
iget-wide v2, v5, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->freeSize:J
add-long/2addr v2, v0
.line 166
iget-wide v6, v5, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
add-long/2addr v0, v6
.line 168
:goto_13
sget-boolean v5, Lcom/cleanmaster/junk/util/EmulateSdCardUtils;->s_bSdcardDataSame:Z
if-nez v5, :cond_23
.line 169
invoke-static {}, Lcom/cleanmaster/junk/util/Commons;->getInternalSdCardsStorageInfo()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v5
.line 170
if-eqz v5, :cond_23
.line 171
iget-wide v6, v5, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->freeSize:J
add-long/2addr v2, v6
.line 172
iget-wide v6, v5, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
add-long/2addr v0, v6
.line 175
:cond_23
invoke-static {}, Lcom/cleanmaster/junk/util/Commons;->getRemovableSdCardsStorageInfo()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v5
.line 176
if-eqz v5, :cond_2f
.line 177
iget-wide v6, v5, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->freeSize:J
add-long/2addr v2, v6
.line 178
iget-wide v6, v5, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
add-long/2addr v0, v6
.line 180
:cond_2f
iput-wide v0, v4, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
.line 181
iput-wide v2, v4, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->freeSize:J
.line 182
return-object v4
:cond_34
move-wide v2, v0
goto :goto_13
.end method
.method public static getPhoneStorageMaxSize()J
.registers 6
.prologue
.line 38
const-wide/16 v0, 0x0
.line 40
invoke-static {}, Lcom/cleanmaster/junk/util/StorageInfoUtils;->getDeviceStorageInfoEx()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v2
.line 41
if-eqz v2, :cond_a
.line 42
iget-wide v0, v2, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
.line 45
:cond_a
sget-boolean v2, Lcom/cleanmaster/junk/util/EmulateSdCardUtils;->s_bSdcardDataSame:Z
if-nez v2, :cond_1a
.line 46
invoke-static {}, Lcom/cleanmaster/junk/util/Commons;->getInternalSdCardsStorageInfo()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v2
.line 47
if-eqz v2, :cond_1a
.line 48
iget-wide v4, v2, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
cmp-long v3, v0, v4
if-lez v3, :cond_27
.line 51
:cond_1a
:goto_1a
invoke-static {}, Lcom/cleanmaster/junk/util/Commons;->getRemovableSdCardsStorageInfo()Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;
move-result-object v2
.line 52
if-eqz v2, :cond_26
.line 53
iget-wide v4, v2, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
cmp-long v3, v0, v4
if-lez v3, :cond_2a
.line 56
:cond_26
:goto_26
return-wide v0
.line 48
:cond_27
iget-wide v0, v2, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
goto :goto_1a
.line 53
:cond_2a
iget-wide v0, v2, Lcom/cleanmaster/hpsharelib/base/util/io/StorageInfo;->allSize:J
goto :goto_26
.end method
.method public static getPhoneStorageState(JJI)I
.registers 13
.prologue
const-wide/16 v4, 0x0
const/4 v2, 0x3
const/4 v3, 0x1
.line 135
cmp-long v0, p0, v4
if-lez v0, :cond_c
cmp-long v0, p2, v4
if-gtz v0, :cond_e
:cond_c
move v0, v2
.line 154
:goto_d
return v0
.line 138
:cond_e
const-string v0, "space_ui_setting"
const-string v1, "space_notification_remind_size"
const/16 v4, 0x1f4
invoke-static {v0, v1, v4}, Lcom/cleanmaster/junkengine/junk/util/JunkCloudConfig;->getIntValue(Ljava/lang/String;Ljava/lang/String;I)I
move-result v0
mul-int/lit16 v0, v0, 0x400
int-to-long v0, v0
const-wide/16 v4, 0x400
mul-long/2addr v4, v0
.line 140
const-wide v0, 0x80000000L
.line 142
if-ne v3, p4, :cond_2c
sget-boolean v6, Lcom/cleanmaster/junk/util/EmulateSdCardUtils;->s_bSdcardDataSame:Z
if-nez v6, :cond_2c
.line 143
const-wide/32 v0, 0x40000000
.line 146
:cond_2c
invoke-static {p0, p1, p2, p3}, Lcom/cleanmaster/junk/util/StorageInsufficientCheckHelp;->getPercentage(JJ)I
move-result v6
.line 147
const/4 v7, -0x1
if-ne v7, v6, :cond_35
.line 148
const/4 v0, 0x0
goto :goto_d
.line 149
:cond_35
const/16 v7, 0x55
if-lt v6, v7, :cond_3f
cmp-long v7, p2, v4
if-gez v7, :cond_3f
move v0, v2
.line 150
goto :goto_d
.line 151
:cond_3f
const/16 v2, 0x50
if-lt v6, v2, :cond_4d
cmp-long v2, p2, v4
if-lez v2, :cond_4d
cmp-long v0, p2, v0
if-gtz v0, :cond_4d
.line 152
const/4 v0, 0x2
goto :goto_d
:cond_4d
move v0, v3
.line 154
goto :goto_d
.end method
.method public static isStorageInsufficeint(JJII)Z
.registers 16
.prologue
const-wide/16 v8, 0x0
const/16 v2, 0x55
const/4 v7, -0x1
const/4 v4, 0x1
const/4 v3, 0x0
.line 63
cmp-long v0, p0, v8
if-lez v0, :cond_f
cmp-long v0, p2, v8
if-gez v0, :cond_11
:cond_f
move v0, v3
.line 85
:goto_10
return v0
.line 67
:cond_11
const-wide v0, 0x80000000L
.line 68
if-eq p5, v7, :cond_1a
if-ne p5, v4, :cond_2e
:cond_1a
move v5, v4
.line 69
:goto_1b
if-eqz v5, :cond_30
.line 70
if-ne v4, p4, :cond_26
sget-boolean v6, Lcom/cleanmaster/junk/util/EmulateSdCardUtils;->s_bSdcardDataSame:Z
if-nez v6, :cond_26
.line 72
const-wide/32 v0, 0x40000000
.line 80
:cond_26
:goto_26
invoke-static {p0, p1, p2, p3}, Lcom/cleanmaster/junk/util/StorageInsufficientCheckHelp;->getPercentage(JJ)I
move-result v6
.line 81
if-ne v7, v6, :cond_3c
move v0, v3
.line 82
goto :goto_10
:cond_2e
move v5, v3
.line 68
goto :goto_1b
.line 74
:cond_30
const/4 v6, 0x3
if-ne p5, v6, :cond_36
.line 75
const/16 v2, 0x5a
goto :goto_26
.line 76
:cond_36
const/4 v6, 0x2
if-ne p5, v6, :cond_26
.line 77
const/16 v2, 0x5f
goto :goto_26
.line 83
:cond_3c
if-lt v6, v2, :cond_46
if-eqz v5, :cond_44
cmp-long v0, p2, v0
if-gez v0, :cond_46
:cond_44
move v0, v4
.line 84
goto :goto_10
:cond_46
move v0, v3
.line 85
goto :goto_10
.end method
.method private static showStorageNotEnough(JJII)Z
.registers 7
.prologue
.line 131
const/4 v0, 0x0
return v0
.end method