GameBoostedView.smali
.class public Lcom/cleanmaster/gameboost/ui/GameBoostedView;
.super Landroid/widget/FrameLayout;
.source "GameBoostedView.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;
}
.end annotation
# instance fields
.field a:Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;
.field b:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Lcom/cleanmaster/gameboost/modle/AbsGameModel;",
">;"
}
.end annotation
.end field
.field private c:Landroid/widget/GridView;
.field private d:Landroid/widget/TextView;
.field private e:Landroid/widget/TextView;
.field private f:Landroid/widget/LinearLayout;
.field private g:Lcom/cleanmaster/gameboost/view/GameBoostLoadingView;
.field private h:Ljava/lang/Runnable;
.field private i:I
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
.param p1 # Landroid/content/Context;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.prologue
.line 50
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 51
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 4
.param p1 # Landroid/content/Context;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroid/support/annotation/Nullable;
.end annotation
.end param
.prologue
.line 54
const/4 v0, 0x0
invoke-direct {p0, p1, p2, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 55
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 5
.param p1 # Landroid/content/Context;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroid/support/annotation/Nullable;
.end annotation
.end param
.param p3 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
.line 58
invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 74
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b:Ljava/util/List;
.line 161
new-instance v0, Lcom/cleanmaster/gameboost/ui/i;
invoke-direct {v0, p0}, Lcom/cleanmaster/gameboost/ui/i;-><init>(Lcom/cleanmaster/gameboost/ui/GameBoostedView;)V
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->h:Ljava/lang/Runnable;
.line 205
const/4 v0, 0x0
iput v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->i:I
.line 59
invoke-direct {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->d()V
.line 60
return-void
.end method
.method static synthetic a(Lcom/cleanmaster/gameboost/ui/GameBoostedView;)I
.registers 3
.prologue
.line 40
iget v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->i:I
add-int/lit8 v1, v0, 0x1
iput v1, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->i:I
return v0
.end method
.method static synthetic a(Lcom/cleanmaster/gameboost/ui/GameBoostedView;I)I
.registers 2
.prologue
.line 40
iput p1, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->i:I
return p1
.end method
.method static synthetic a(Lcom/cleanmaster/gameboost/ui/GameBoostedView;J)Ljava/lang/String;
.registers 4
.prologue
.line 40
invoke-direct {p0, p1, p2}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b(J)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public static a(J)[I
.registers 8
.prologue
const-wide/16 v4, 0x3c
const/4 v1, 0x0
.line 182
const/16 v0, 0xe10
.line 187
cmp-long v2, p0, v4
if-gez v2, :cond_18
.line 189
long-to-int v0, p0
move v2, v1
move v3, v1
.line 201
:goto_c
const/4 v4, 0x3
new-array v4, v4, [I
aput v3, v4, v1
const/4 v1, 0x1
aput v2, v4, v1
const/4 v1, 0x2
aput v0, v4, v1
return-object v4
.line 190
:cond_18
cmp-long v2, p0, v4
if-ltz v2, :cond_30
int-to-long v2, v0
cmp-long v2, p0, v2
if-gez v2, :cond_30
.line 192
long-to-float v0, p0
const/high16 v2, 0x42700000 # 60.0f
div-float/2addr v0, v2
float-to-double v2, v0
invoke-static {v2, v3}, Ljava/lang/Math;->floor(D)D
move-result-wide v2
double-to-int v2, v2
.line 193
long-to-int v0, p0
rem-int/lit8 v0, v0, 0x3c
move v3, v1
goto :goto_c
.line 194
:cond_30
int-to-long v2, v0
cmp-long v2, p0, v2
if-ltz v2, :cond_40
.line 195
long-to-int v2, p0
div-int v3, v2, v0
.line 196
long-to-int v2, p0
rem-int v0, v2, v0
.line 197
div-int/lit8 v2, v0, 0x3c
.line 198
rem-int/lit8 v0, v0, 0x3c
goto :goto_c
:cond_40
move v0, v1
move v2, v1
move v3, v1
goto :goto_c
.end method
.method static synthetic b(Lcom/cleanmaster/gameboost/ui/GameBoostedView;)Landroid/widget/TextView;
.registers 2
.prologue
.line 40
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->e:Landroid/widget/TextView;
return-object v0
.end method
.method private b(J)Ljava/lang/String;
.registers 10
.prologue
.line 173
:try_start_0
invoke-static {p1, p2}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->a(J)[I
move-result-object v0
.line 174
sget-object v1, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
const-string v2, "%02d:%02d:%02d"
const/4 v3, 0x3
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
const/4 v5, 0x0
aget v5, v0, v5
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
aput-object v5, v3, v4
const/4 v4, 0x1
const/4 v5, 0x1
aget v5, v0, v5
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
aput-object v5, v3, v4
const/4 v4, 0x2
const/4 v5, 0x2
aget v0, v0, v5
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, v3, v4
invoke-static {v1, v2, v3}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
:try_end_2c
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_2c} :catch_2e
move-result-object v0
.line 178
:goto_2d
return-object v0
.line 175
:catch_2e
move-exception v0
.line 176
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
.line 178
const-string v0, "00:00:00"
goto :goto_2d
.end method
.method static synthetic c(Lcom/cleanmaster/gameboost/ui/GameBoostedView;)Ljava/lang/Runnable;
.registers 2
.prologue
.line 40
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->h:Ljava/lang/Runnable;
return-object v0
.end method
.method private d()V
.registers 4
.prologue
.line 63
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
sget v1, Lcom/cleanmaster/gameboost/R$layout;->game_boosted_view:I
const/4 v2, 0x1
invoke-virtual {v0, v1, p0, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
.line 64
sget v0, Lcom/cleanmaster/gameboost/R$id;->grid_net:I
invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/GridView;
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->c:Landroid/widget/GridView;
.line 65
sget v0, Lcom/cleanmaster/gameboost/R$id;->tv_net_title:I
invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->d:Landroid/widget/TextView;
.line 66
sget v0, Lcom/cleanmaster/gameboost/R$id;->tv_net_time:I
invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->e:Landroid/widget/TextView;
.line 67
sget v0, Lcom/cleanmaster/gameboost/R$id;->ll_boosted:I
invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/LinearLayout;
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->f:Landroid/widget/LinearLayout;
.line 68
sget v0, Lcom/cleanmaster/gameboost/R$id;->iv_net_icon:I
invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/cleanmaster/gameboost/view/GameBoostLoadingView;
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->g:Lcom/cleanmaster/gameboost/view/GameBoostLoadingView;
.line 69
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->g:Lcom/cleanmaster/gameboost/view/GameBoostLoadingView;
invoke-virtual {v0}, Lcom/cleanmaster/gameboost/view/GameBoostLoadingView;->b()V
.line 70
new-instance v0, Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;-><init>(Lcom/cleanmaster/gameboost/ui/GameBoostedView;Lcom/cleanmaster/gameboost/ui/i;)V
iput-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->a:Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;
.line 71
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->c:Landroid/widget/GridView;
iget-object v1, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->a:Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;
invoke-virtual {v0, v1}, Landroid/widget/GridView;->setAdapter(Landroid/widget/ListAdapter;)V
.line 72
return-void
.end method
# virtual methods
.method public a()V
.registers 1
.prologue
.line 106
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->c()V
.line 107
return-void
.end method
.method public a(Ljava/util/List;)V
.registers 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;)V"
}
.end annotation
.prologue
const/4 v6, 0x7
const/4 v5, 0x1
const/4 v1, 0x0
.line 77
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b()V
.line 78
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->clear()V
.line 79
iget-object v2, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->d:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->getResources()Landroid/content/res/Resources;
move-result-object v0
sget v3, Lcom/cleanmaster/gameboost/R$string;->game_boost_boosted_title:I
invoke-virtual {v0, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v3
new-array v4, v5, [Ljava/lang/Object;
if-nez p1, :cond_7e
move v0, v1
:goto_1c
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
aput-object v0, v4, v1
invoke-static {v3, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 80
if-eqz p1, :cond_6e
.line 81
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_2f
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_51
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 82
new-instance v3, Lcom/cleanmaster/gameboost/modle/b;
invoke-direct {v3}, Lcom/cleanmaster/gameboost/modle/b;-><init>()V
.line 83
iput-object v0, v3, Lcom/cleanmaster/gameboost/modle/b;->d:Ljava/lang/String;
.line 84
iput-boolean v5, v3, Lcom/cleanmaster/gameboost/modle/b;->c:Z
.line 85
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b:Ljava/util/List;
invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 86
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
if-lt v0, v6, :cond_2f
.line 90
:cond_51
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
if-le v0, v6, :cond_67
.line 91
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b:Ljava/util/List;
const/4 v2, 0x6
invoke-interface {v0, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
.line 92
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b:Ljava/util/List;
new-instance v2, Lcom/cleanmaster/gameboost/modle/h;
invoke-direct {v2}, Lcom/cleanmaster/gameboost/modle/h;-><init>()V
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 94
:cond_67
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->a:Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;
iget-object v2, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b:Ljava/util/List;
invoke-virtual {v0, v2}, Lcom/cleanmaster/gameboost/ui/GameBoostedView$a;->a(Ljava/util/List;)V
.line 97
:cond_6e
if-eqz p1, :cond_76
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
move-result v0
if-eqz v0, :cond_83
.line 98
:cond_76
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->f:Landroid/widget/LinearLayout;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V
.line 103
:goto_7d
return-void
.line 79
:cond_7e
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
goto :goto_1c
.line 100
:cond_83
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->f:Landroid/widget/LinearLayout;
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V
goto :goto_7d
.end method
.method public b()V
.registers 4
.prologue
.line 208
invoke-static {}, Lcom/cleanmaster/gameboost/GameBoostManager;->a()Lcom/cleanmaster/gameboost/GameBoostManager;
move-result-object v0
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->getContext()Landroid/content/Context;
move-result-object v1
new-instance v2, Lcom/cleanmaster/gameboost/ui/j;
invoke-direct {v2, p0}, Lcom/cleanmaster/gameboost/ui/j;-><init>(Lcom/cleanmaster/gameboost/ui/GameBoostedView;)V
invoke-virtual {v0, v1, v2}, Lcom/cleanmaster/gameboost/GameBoostManager;->a(Landroid/content/Context;Lcom/cleanmaster/gameboost/GameBoostManager$CallBackVpnTime;)V
.line 216
return-void
.end method
.method public c()V
.registers 2
.prologue
.line 219
iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->h:Ljava/lang/Runnable;
invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->removeCallbacks(Ljava/lang/Runnable;)Z
.line 220
return-void
.end method
.method protected onDetachedFromWindow()V
.registers 1
.prologue
.line 224
invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V
.line 225
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->c()V
.line 226
return-void
.end method
.method protected onVisibilityChanged(Landroid/view/View;I)V
.registers 4
.param p1 # Landroid/view/View;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.prologue
.line 230
invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->onVisibilityChanged(Landroid/view/View;I)V
.line 231
if-nez p2, :cond_9
.line 232
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->b()V
.line 236
:cond_8
:goto_8
return-void
.line 233
:cond_9
const/16 v0, 0x8
if-ne p2, v0, :cond_8
.line 234
invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostedView;->c()V
goto :goto_8
.end method