a.smali

.class public Lcom/cmcm/a/a;
.super Ljava/lang/Object;
.source "AdSkipBtnUtil.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/cmcm/a/a$a;
    }
.end annotation


# static fields
.field public static a:Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor$ActivityStateListener;

.field private static b:Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;

.field private static c:I

.field private static d:Ljava/lang/String;

.field private static e:Z

.field private static f:J


# direct methods
.method static constructor <clinit>()V
    .registers 2

    .prologue
    .line 42
    const/4 v0, 0x0

    sput-boolean v0, Lcom/cmcm/a/a;->e:Z

    .line 101
    const-wide/16 v0, 0x0

    sput-wide v0, Lcom/cmcm/a/a;->f:J

    .line 102
    new-instance v0, Lcom/cmcm/a/b;

    invoke-direct {v0}, Lcom/cmcm/a/b;-><init>()V

    sput-object v0, Lcom/cmcm/a/a;->a:Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor$ActivityStateListener;

    return-void
.end method

.method static synthetic a()Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;
    .registers 1

    .prologue
    .line 29
    sget-object v0, Lcom/cmcm/a/a;->b:Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;

    return-object v0
.end method

.method public static a(Landroid/app/Activity;)V
    .registers 4

    .prologue
    const/4 v2, 0x0

    .line 86
    if-nez p0, :cond_4

    .line 98
    :cond_3
    :goto_3
    return-void

    .line 89
    :cond_4
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;

    move-result-object v0

    .line 90
    const-string v1, "com.qq.e.ads.PortraitADActivity"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1c

    const-string v1, "com.bytedance.sdk.openadsdk.activity.TTFullScreenVideoActivity"

    .line 91
    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 94
    :cond_1c
    sput-object v2, Lcom/cmcm/a/a;->b:Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;

    .line 95
    sput-object v2, Lcom/cmcm/a/a;->d:Ljava/lang/String;

    .line 96
    const/4 v0, 0x0

    sput-boolean v0, Lcom/cmcm/a/a;->e:Z

    .line 97
    const-wide/16 v0, 0x0

    sput-wide v0, Lcom/cmcm/a/a;->f:J

    goto :goto_3
.end method

.method private static a(Landroid/app/Activity;I)V
    .registers 6

    .prologue
    .line 166
    if-nez p0, :cond_3

    .line 185
    :cond_2
    :goto_2
    return-void

    .line 169
    :cond_3
    invoke-static {p0}, Lcom/cmcm/a/a;->h(Landroid/app/Activity;)Landroid/widget/FrameLayout;

    move-result-object v0

    .line 170
    if-eqz v0, :cond_2

    .line 173
    new-instance v1, Lcom/cmcm/a/c;

    invoke-direct {v1, p0}, Lcom/cmcm/a/c;-><init>(Landroid/app/Activity;)V

    mul-int/lit16 v2, p1, 0x3e8

    int-to-long v2, v2

    invoke-virtual {v0, v1, v2, v3}, Landroid/widget/FrameLayout;->postDelayed(Ljava/lang/Runnable;J)Z

    goto :goto_2
.end method

.method public static a(Landroid/content/Context;)V
    .registers 3

    .prologue
    .line 73
    invoke-static {}, Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor;->get()Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor;

    move-result-object v0

    sget-object v1, Lcom/cmcm/a/a;->a:Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor$ActivityStateListener;

    invoke-virtual {v0, v1}, Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor;->addActivityStateListener(Lcom/cleanmaster/pluginscommonlib/util/appMonitor/AndroidStateMonitor$ActivityStateListener;)V

    .line 74
    return-void
.end method

.method public static a(Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;)V
    .registers 1

    .prologue
    .line 78
    sput-object p0, Lcom/cmcm/a/a;->b:Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;

    .line 79
    return-void
.end method

.method public static a(Ljava/lang/String;)V
    .registers 1

    .prologue
    .line 82
    sput-object p0, Lcom/cmcm/a/a;->d:Ljava/lang/String;

    .line 83
    return-void
.end method

.method static synthetic a(Z)Z
    .registers 1

    .prologue
    .line 29
    sput-boolean p0, Lcom/cmcm/a/a;->e:Z

    return p0
.end method

.method static synthetic b()J
    .registers 2

    .prologue
    .line 29
    sget-wide v0, Lcom/cmcm/a/a;->f:J

    return-wide v0
.end method

.method private static b(Landroid/content/Context;)Landroid/widget/RelativeLayout$LayoutParams;
    .registers 9

    .prologue
    const/16 v7, 0x9

    const/4 v6, 0x2

    const/4 v1, 0x1

    const/high16 v5, 0x41500000    # 13.0f

    const/high16 v4, 0x41200000    # 10.0f

    .line 236
    new-instance v2, Landroid/widget/RelativeLayout$LayoutParams;

    const/high16 v0, 0x42b00000    # 88.0f

    invoke-static {p0, v0}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    const/high16 v3, 0x42180000    # 38.0f

    invoke-static {p0, v3}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v3

    invoke-direct {v2, v0, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 238
    sget v0, Lcom/cmcm/a/a;->c:I

    if-ne v0, v6, :cond_33

    .line 239
    invoke-static {}, Lcom/cmcm/a/a;->i()I

    move-result v0

    .line 243
    :goto_21
    if-ne v0, v1, :cond_3c

    .line 244
    invoke-virtual {v2, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 245
    invoke-static {p0, v5}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    iput v0, v2, Landroid/widget/RelativeLayout$LayoutParams;->leftMargin:I

    .line 246
    invoke-static {p0, v4}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    iput v0, v2, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I

    .line 256
    :goto_32
    return-object v2

    .line 240
    :cond_33
    sget v0, Lcom/cmcm/a/a;->c:I

    if-ne v0, v1, :cond_60

    .line 241
    invoke-static {}, Lcom/cmcm/a/a;->h()I

    move-result v0

    goto :goto_21

    .line 247
    :cond_3c
    if-ne v0, v6, :cond_50

    .line 248
    const/16 v0, 0xb

    invoke-virtual {v2, v0}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 249
    invoke-static {p0, v5}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    iput v0, v2, Landroid/widget/RelativeLayout$LayoutParams;->rightMargin:I

    .line 250
    invoke-static {p0, v4}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    iput v0, v2, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I

    goto :goto_32

    .line 252
    :cond_50
    invoke-virtual {v2, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 253
    invoke-static {p0, v5}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    iput v0, v2, Landroid/widget/RelativeLayout$LayoutParams;->leftMargin:I

    .line 254
    invoke-static {p0, v4}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    iput v0, v2, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I

    goto :goto_32

    :cond_60
    move v0, v1

    goto :goto_21
.end method

.method static synthetic b(Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;)Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;
    .registers 1

    .prologue
    .line 29
    sput-object p0, Lcom/cmcm/a/a;->b:Lcom/cm/plugincluster/ad/video/fullscreen/IFullScreenVideoAdInteractionListener;

    return-object p0
.end method

.method public static b(Landroid/app/Activity;)V
    .registers 4

    .prologue
    const/4 v2, -0x1

    .line 137
    sget-boolean v0, Lcom/cmcm/a/a;->e:Z

    if-eqz v0, :cond_6

    .line 162
    :cond_5
    :goto_5
    return-void

    .line 140
    :cond_6
    invoke-static {}, Lcom/cmcm/a/a;->e()Z

    move-result v0

    if-eqz v0, :cond_5

    .line 143
    if-eqz p0, :cond_5

    .line 146
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;

    move-result-object v0

    .line 147
    sput v2, Lcom/cmcm/a/a;->c:I

    .line 148
    const-string v1, "com.qq.e.ads.PortraitADActivity"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_31

    .line 149
    const/4 v0, 0x2

    sput v0, Lcom/cmcm/a/a;->c:I

    .line 153
    :cond_23
    :goto_23
    sget v0, Lcom/cmcm/a/a;->c:I

    if-eq v0, v2, :cond_5

    .line 156
    invoke-static {}, Lcom/cmcm/a/a;->f()I

    move-result v0

    .line 157
    if-gtz v0, :cond_3d

    .line 158
    invoke-static {p0}, Lcom/cmcm/a/a;->e(Landroid/app/Activity;)V

    goto :goto_5

    .line 150
    :cond_31
    const-string v1, "com.bytedance.sdk.openadsdk.activity.TTFullScreenVideoActivity"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_23

    .line 151
    const/4 v0, 0x1

    sput v0, Lcom/cmcm/a/a;->c:I

    goto :goto_23

    .line 160
    :cond_3d
    invoke-static {p0, v0}, Lcom/cmcm/a/a;->a(Landroid/app/Activity;I)V

    goto :goto_5
.end method

.method static synthetic c()I
    .registers 1

    .prologue
    .line 29
    sget v0, Lcom/cmcm/a/a;->c:I

    return v0
.end method

.method static synthetic c(Landroid/app/Activity;)V
    .registers 1

    .prologue
    .line 29
    invoke-static {p0}, Lcom/cmcm/a/a;->e(Landroid/app/Activity;)V

    return-void
.end method

.method static synthetic d()Ljava/lang/String;
    .registers 1

    .prologue
    .line 29
    sget-object v0, Lcom/cmcm/a/a;->d:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic d(Landroid/app/Activity;)V
    .registers 1

    .prologue
    .line 29
    invoke-static {p0}, Lcom/cmcm/a/a;->g(Landroid/app/Activity;)V

    return-void
.end method

.method private static e(Landroid/app/Activity;)V
    .registers 9

    .prologue
    const/4 v7, 0x2

    const/4 v6, 0x1

    .line 189
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;

    move-result-object v0

    .line 190
    invoke-static {p0}, Lcom/cmcm/a/a;->h(Landroid/app/Activity;)Landroid/widget/FrameLayout;

    move-result-object v1

    .line 191
    if-eqz v0, :cond_e

    if-nez v1, :cond_f

    .line 233
    :cond_e
    :goto_e
    return-void

    .line 194
    :cond_f
    sput-boolean v6, Lcom/cmcm/a/a;->e:Z

    .line 195
    new-instance v2, Landroid/widget/RelativeLayout;

    invoke-direct {v2, p0}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    .line 196
    const v3, 0x7f10001a

    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->setId(I)V

    .line 197
    new-instance v3, Landroid/widget/FrameLayout$LayoutParams;

    const/4 v4, -0x1

    const/4 v5, -0x2

    invoke-direct {v3, v4, v5}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    .line 198
    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 200
    new-instance v3, Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-direct {v3, v4}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 201
    invoke-static {v0}, Lcom/cmcm/a/a;->b(Landroid/content/Context;)Landroid/widget/RelativeLayout$LayoutParams;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 202
    const v4, 0x7f0a17be

    invoke-virtual {v0, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 203
    const/4 v4, 0x0

    const/high16 v5, 0x41600000    # 14.0f

    invoke-static {v0, v5}, Lcom/cleanmaster/pluginscommonlib/g;->a(Landroid/content/Context;F)I

    move-result v0

    int-to-float v0, v0

    invoke-virtual {v3, v4, v0}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 204
    const-string v0, "#000000"

    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 205
    const/16 v0, 0x11

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setGravity(I)V

    .line 206
    const v0, 0x7f0200d1

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setBackgroundResource(I)V

    .line 207
    new-instance v0, Lcom/cmcm/a/d;

    invoke-direct {v0, p0}, Lcom/cmcm/a/d;-><init>(Landroid/app/Activity;)V

    invoke-virtual {v3, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 224
    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    .line 225
    invoke-virtual {v1, v2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    .line 226
    invoke-static {p0}, Lcom/cmcm/a/a;->f(Landroid/app/Activity;)V

    .line 227
    sget v0, Lcom/cmcm/a/a;->c:I

    if-ne v0, v7, :cond_80

    .line 228
    sget-object v0, Lcom/cmcm/a/a;->d:Ljava/lang/String;

    invoke-static {v7, v0}, Lcom/cleanmaster/pluginscommonlib/a/b;->a(BLjava/lang/String;)V

    .line 232
    :cond_79
    :goto_79
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    sput-wide v0, Lcom/cmcm/a/a;->f:J

    goto :goto_e

    .line 229
    :cond_80
    sget v0, Lcom/cmcm/a/a;->c:I

    if-ne v0, v6, :cond_79

    .line 230
    sget-object v0, Lcom/cmcm/a/a;->d:Ljava/lang/String;

    invoke-static {v6, v0}, Lcom/cleanmaster/pluginscommonlib/a/b;->a(BLjava/lang/String;)V

    goto :goto_79
.end method

.method private static e()Z
    .registers 4

    .prologue
    .line 45
    const/4 v0, 0x1

    const-string v1, "cm_cn_fullscreen_video_selfview_posid"

    const-string/jumbo v2, "switch"

    const/4 v3, 0x0

    invoke-static {v0, v1, v2, v3}, Lcom/cleanmaster/hpsharelib/recommendapps/CloudConfigDataGetter;->getBooleanValue(ILjava/lang/String;Ljava/lang/String;Z)Z

    move-result v0

    .line 46
    return v0
.end method

.method private static f()I
    .registers 4

    .prologue
    .line 51
    const/4 v0, 0x1

    const-string v1, "cm_cn_fullscreen_video_selfview_posid"

    const-string/jumbo v2, "selfbutton_start_key"

    const/4 v3, 0x0

    invoke-static {v0, v1, v2, v3}, Lcom/cleanmaster/hpsharelib/recommendapps/CloudConfigDataGetter;->getIntValue(ILjava/lang/String;Ljava/lang/String;I)I

    move-result v0

    .line 52
    return v0
.end method

.method private static f(Landroid/app/Activity;)V
    .registers 7

    .prologue
    .line 260
    invoke-static {}, Lcom/cmcm/a/a;->g()I

    move-result v0

    .line 261
    const/16 v1, 0x63

    if-lt v0, v1, :cond_9

    .line 285
    :cond_8
    :goto_8
    return-void

    .line 264
    :cond_9
    if-lez v0, :cond_8

    .line 267
    if-eqz p0, :cond_8

    .line 270
    invoke-static {p0}, Lcom/cmcm/a/a;->h(Landroid/app/Activity;)Landroid/widget/FrameLayout;

    move-result-object v1

    .line 271
    if-eqz v1, :cond_8

    .line 274
    new-instance v2, Lcom/cmcm/a/e;

    invoke-direct {v2, p0}, Lcom/cmcm/a/e;-><init>(Landroid/app/Activity;)V

    mul-int/lit16 v0, v0, 0x3e8

    int-to-long v4, v0

    invoke-virtual {v1, v2, v4, v5}, Landroid/widget/FrameLayout;->postDelayed(Ljava/lang/Runnable;J)Z

    goto :goto_8
.end method

.method private static g()I
    .registers 4

    .prologue
    .line 57
    const/4 v0, 0x1

    const-string v1, "cm_cn_fullscreen_video_selfview_posid"

    const-string/jumbo v2, "selfbutton_end_key"

    const/4 v3, 0x5

    invoke-static {v0, v1, v2, v3}, Lcom/cleanmaster/hpsharelib/recommendapps/CloudConfigDataGetter;->getIntValue(ILjava/lang/String;Ljava/lang/String;I)I

    move-result v0

    .line 58
    return v0
.end method

.method private static g(Landroid/app/Activity;)V
    .registers 3

    .prologue
    .line 288
    invoke-static {p0}, Lcom/cmcm/a/a;->h(Landroid/app/Activity;)Landroid/widget/FrameLayout;

    move-result-object v0

    .line 289
    if-nez v0, :cond_7

    .line 297
    :cond_6
    :goto_6
    return-void

    .line 292
    :cond_7
    const v1, 0x7f10001a

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;

    move-result-object v1

    .line 293
    if-eqz v1, :cond_6

    .line 296
    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->removeView(Landroid/view/View;)V

    goto :goto_6
.end method

.method private static h()I
    .registers 4

    .prologue
    .line 63
    const/4 v0, 0x1

    const-string v1, "cm_cn_fullscreen_video_selfview_posid"

    const-string/jumbo v2, "selfbutton_pos_tt_key"

    const/4 v3, 0x2

    invoke-static {v0, v1, v2, v3}, Lcom/cleanmaster/hpsharelib/recommendapps/CloudConfigDataGetter;->getIntValue(ILjava/lang/String;Ljava/lang/String;I)I

    move-result v0

    .line 64
    return v0
.end method

.method private static h(Landroid/app/Activity;)Landroid/widget/FrameLayout;
    .registers 4

    .prologue
    const/4 v1, 0x0

    .line 316
    if-nez p0, :cond_5

    move-object v0, v1

    .line 324
    :goto_4
    return-object v0

    .line 320
    :cond_5
    :try_start_5
    invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v0

    const v2, 0x1020002

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/FrameLayout;
    :try_end_16
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_16} :catch_17

    goto :goto_4

    .line 321
    :catch_17
    move-exception v0

    .line 322
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    move-object v0, v1

    .line 324
    goto :goto_4
.end method

.method private static i()I
    .registers 3

    .prologue
    const/4 v2, 0x1

    .line 69
    const-string v0, "cm_cn_fullscreen_video_selfview_posid"

    const-string/jumbo v1, "selfbutton_pos_gdt_key"

    invoke-static {v2, v0, v1, v2}, Lcom/cleanmaster/hpsharelib/recommendapps/CloudConfigDataGetter;->getIntValue(ILjava/lang/String;Ljava/lang/String;I)I

    move-result v0

    .line 70
    return v0
.end method