a.smali
.class public Lcom/cleanmaster/notificationclean/utils/a;
.super Ljava/lang/Object;
.source "NotificationThemeHelper.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/cleanmaster/notificationclean/utils/a$a;
}
.end annotation
# static fields
.field public static a:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference",
"<",
"Lcom/cleanmaster/notificationclean/utils/a$a;",
">;"
}
.end annotation
.end field
.field private static b:Ljava/lang/String;
.field private static c:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 21
const-string v0, "DUMMY_TITLE"
sput-object v0, Lcom/cleanmaster/notificationclean/utils/a;->b:Ljava/lang/String;
.line 22
const-string v0, "TEXT_TEXT"
sput-object v0, Lcom/cleanmaster/notificationclean/utils/a;->c:Ljava/lang/String;
.line 24
const/4 v0, 0x0
sput-object v0, Lcom/cleanmaster/notificationclean/utils/a;->a:Ljava/lang/ref/WeakReference;
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 20
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private a(Landroid/view/ViewGroup;)I
.registers 15
.prologue
const/4 v5, -0x1
const/4 v0, 0x0
const/4 v12, 0x1
const/4 v7, 0x0
.line 78
.line 80
const/4 v1, 0x2
new-array v8, v1, [Landroid/widget/TextView;
.line 81
new-instance v9, Ljava/util/ArrayDeque;
invoke-direct {v9}, Ljava/util/ArrayDeque;-><init>()V
.line 82
invoke-interface {v9, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
move v1, v0
move v2, v0
.line 83
:cond_11
:goto_11
invoke-interface {v9}, Ljava/util/Queue;->isEmpty()Z
move-result v0
if-nez v0, :cond_5b
.line 84
invoke-interface {v9}, Ljava/util/Queue;->poll()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
.line 85
if-eqz v0, :cond_11
.line 89
invoke-virtual {v0}, Landroid/view/ViewGroup;->getChildCount()I
move-result v10
move v6, v7
move v3, v1
move v4, v2
.line 90
:goto_26
if-ge v6, v10, :cond_58
.line 91
invoke-virtual {v0, v6}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
move-result-object v1
.line 92
instance-of v2, v1, Landroid/view/ViewGroup;
if-eqz v2, :cond_39
.line 93
check-cast v1, Landroid/view/ViewGroup;
invoke-interface {v9, v1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
.line 90
:cond_35
:goto_35
add-int/lit8 v1, v6, 0x1
move v6, v1
goto :goto_26
.line 97
:cond_39
instance-of v2, v1, Landroid/widget/TextView;
if-eqz v2, :cond_35
move-object v2, v1
.line 101
check-cast v2, Landroid/widget/TextView;
invoke-virtual {v2}, Landroid/widget/TextView;->getTextSize()F
move-result v2
.line 102
cmpl-float v11, v2, v4
if-lez v11, :cond_4e
.line 104
check-cast v1, Landroid/widget/TextView;
aput-object v1, v8, v7
move v4, v2
.line 105
goto :goto_35
.line 108
:cond_4e
cmpl-float v11, v2, v3
if-lez v11, :cond_35
.line 110
check-cast v1, Landroid/widget/TextView;
aput-object v1, v8, v12
move v3, v2
.line 111
goto :goto_35
:cond_58
move v1, v3
move v2, v4
.line 114
goto :goto_11
.line 116
:cond_5b
aget-object v0, v8, v7
if-eqz v0, :cond_6e
aget-object v0, v8, v7
invoke-virtual {v0}, Landroid/widget/TextView;->getCurrentTextColor()I
move-result v0
if-eq v0, v5, :cond_6e
.line 117
aget-object v0, v8, v7
invoke-virtual {v0}, Landroid/widget/TextView;->getCurrentTextColor()I
move-result v0
.line 121
:goto_6d
return v0
.line 118
:cond_6e
aget-object v0, v8, v12
if-eqz v0, :cond_79
.line 119
aget-object v0, v8, v12
invoke-virtual {v0}, Landroid/widget/TextView;->getCurrentTextColor()I
move-result v0
goto :goto_6d
:cond_79
move v0, v5
.line 121
goto :goto_6d
.end method
.method private a(I)Z
.registers 10
.prologue
.line 130
const/high16 v0, -0x1000000
or-int/2addr v0, p1
.line 131
invoke-static {v0}, Landroid/graphics/Color;->red(I)I
move-result v1
.line 132
invoke-static {v0}, Landroid/graphics/Color;->green(I)I
move-result v2
.line 133
invoke-static {v0}, Landroid/graphics/Color;->blue(I)I
move-result v0
.line 134
int-to-double v4, v1
const-wide v6, 0x3fd322d0e5604189L # 0.299
mul-double/2addr v4, v6
int-to-double v2, v2
const-wide v6, 0x3fe2c8b439581062L # 0.587
mul-double/2addr v2, v6
add-double/2addr v2, v4
int-to-double v0, v0
const-wide v4, 0x3fbd2f1a9fbe76c9L # 0.114
mul-double/2addr v0, v4
add-double/2addr v0, v2
.line 135
const-wide/high16 v2, 0x4068000000000000L # 192.0
cmpg-double v0, v0, v2
if-gez v0, :cond_36
.line 136
const-string v0, "ColorInfo"
const-string/jumbo v1, "\u4eae\u8272"
invoke-static {v0, v1}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 137
const/4 v0, 0x1
.line 140
:goto_35
return v0
.line 139
:cond_36
const-string v0, "ColorInfo"
const-string/jumbo v1, "\u6df1\u8272"
invoke-static {v0, v1}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 140
const/4 v0, 0x0
goto :goto_35
.end method
# virtual methods
.method public a(Landroid/content/Context;)I
.registers 10
.prologue
const/4 v2, 0x0
.line 28
invoke-virtual {p0}, Lcom/cleanmaster/notificationclean/utils/a;->a()Lcom/cleanmaster/notificationclean/utils/a$a;
move-result-object v0
.line 29
if-eqz v0, :cond_a
.line 30
iget v0, v0, Lcom/cleanmaster/notificationclean/utils/a$a;->a:I
.line 73
:goto_9
return v0
.line 34
:cond_a
invoke-static {p1}, Lcom/cleanmaster/notificationclean/utils/NotificationContext;->a(Landroid/content/Context;)Lcom/cleanmaster/notificationclean/utils/NotificationContext;
move-result-object v0
.line 36
invoke-virtual {v0}, Lcom/cleanmaster/notificationclean/utils/NotificationContext;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
move-result-object v3
.line 37
iget v4, v3, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
.line 40
const/16 v1, 0x15
:try_start_16
invoke-static {v1, v4}, Ljava/lang/Math;->min(II)I
move-result v1
iput v1, v3, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
.line 42
new-instance v1, Landroid/support/v4/app/NotificationCompat$Builder;
const-string v5, "common"
invoke-direct {v1, v0, v5}, Landroid/support/v4/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;Ljava/lang/String;)V
.line 43
sget-object v0, Lcom/cleanmaster/notificationclean/utils/a;->b:Ljava/lang/String;
invoke-virtual {v1, v0}, Landroid/support/v4/app/NotificationCompat$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/support/v4/app/NotificationCompat$Builder;
.line 44
sget-object v0, Lcom/cleanmaster/notificationclean/utils/a;->c:Ljava/lang/String;
invoke-virtual {v1, v0}, Landroid/support/v4/app/NotificationCompat$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/support/v4/app/NotificationCompat$Builder;
.line 45
invoke-virtual {v1}, Landroid/support/v4/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
move-result-object v0
.line 46
iget-object v1, v0, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;
:try_end_33
.catch Ljava/lang/Exception; {:try_start_16 .. :try_end_33} :catch_9f
.catchall {:try_start_16 .. :try_end_33} :catchall_b1
if-nez v1, :cond_39
.line 71
iput v4, v3, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
move v0, v2
.line 47
goto :goto_9
.line 49
:cond_39
:try_start_39
iget-object v0, v0, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;
invoke-virtual {v0}, Landroid/widget/RemoteViews;->getLayoutId()I
move-result v0
.line 50
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v1
const/4 v5, 0x0
invoke-virtual {v1, v0, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
.line 51
const v1, 0x1020016
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/TextView;
.line 52
if-eqz v1, :cond_5c
invoke-virtual {v1}, Landroid/widget/TextView;->getCurrentTextColor()I
move-result v5
const/4 v6, -0x1
if-ne v5, v6, :cond_9a
.line 53
:cond_5c
invoke-direct {p0, v0}, Lcom/cleanmaster/notificationclean/utils/a;->a(Landroid/view/ViewGroup;)I
:try_end_5f
.catch Ljava/lang/Exception; {:try_start_39 .. :try_end_5f} :catch_9f
.catchall {:try_start_39 .. :try_end_5f} :catchall_b1
move-result v0
.line 58
:goto_60
:try_start_60
new-instance v1, Lcom/cleanmaster/notificationclean/utils/a$a;
invoke-direct {v1, p0}, Lcom/cleanmaster/notificationclean/utils/a$a;-><init>(Lcom/cleanmaster/notificationclean/utils/a;)V
.line 59
iput v0, v1, Lcom/cleanmaster/notificationclean/utils/a$a;->a:I
.line 60
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
iput-wide v6, v1, Lcom/cleanmaster/notificationclean/utils/a$a;->b:J
.line 61
sget-object v2, Lcom/cleanmaster/notificationclean/utils/a;->a:Ljava/lang/ref/WeakReference;
if-eqz v2, :cond_76
.line 62
sget-object v2, Lcom/cleanmaster/notificationclean/utils/a;->a:Ljava/lang/ref/WeakReference;
invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->clear()V
.line 64
:cond_76
new-instance v2, Ljava/lang/ref/WeakReference;
invoke-direct {v2, v1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
sput-object v2, Lcom/cleanmaster/notificationclean/utils/a;->a:Ljava/lang/ref/WeakReference;
.line 65
const-string v1, "ColorInfo"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v5, "\u66f4\u65b0\u989c\u8272 color="
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
:try_end_96
.catch Ljava/lang/Exception; {:try_start_60 .. :try_end_96} :catch_b5
.catchall {:try_start_60 .. :try_end_96} :catchall_b1
.line 71
iput v4, v3, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
goto/16 :goto_9
.line 55
:cond_9a
:try_start_9a
invoke-virtual {v1}, Landroid/widget/TextView;->getCurrentTextColor()I
:try_end_9d
.catch Ljava/lang/Exception; {:try_start_9a .. :try_end_9d} :catch_9f
.catchall {:try_start_9a .. :try_end_9d} :catchall_b1
move-result v0
goto :goto_60
.line 67
:catch_9f
move-exception v0
move-object v1, v0
move v0, v2
.line 68
:goto_a2
:try_start_a2
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
.line 69
const-string v1, "ColorInfo"
const-string/jumbo v2, "\u66f4\u65b0\u5931\u8d25"
invoke-static {v1, v2}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
:try_end_ad
.catchall {:try_start_a2 .. :try_end_ad} :catchall_b1
.line 71
iput v4, v3, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
goto/16 :goto_9
:catchall_b1
move-exception v0
iput v4, v3, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
throw v0
.line 67
:catch_b5
move-exception v1
goto :goto_a2
.end method
.method public a()Lcom/cleanmaster/notificationclean/utils/a$a;
.registers 7
.prologue
const/4 v1, 0x0
.line 144
sget-object v0, Lcom/cleanmaster/notificationclean/utils/a;->a:Ljava/lang/ref/WeakReference;
if-nez v0, :cond_e
.line 145
const-string v0, "ColorInfo"
const-string v2, "COLOR_REF = null"
invoke-static {v0, v2}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
move-object v0, v1
.line 162
:goto_d
return-object v0
.line 148
:cond_e
sget-object v0, Lcom/cleanmaster/notificationclean/utils/a;->a:Ljava/lang/ref/WeakReference;
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cleanmaster/notificationclean/utils/a$a;
.line 149
if-nez v0, :cond_21
.line 150
const-string v0, "ColorInfo"
const-string v2, "COLOR_REF.get()=null"
invoke-static {v0, v2}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
move-object v0, v1
.line 151
goto :goto_d
.line 154
:cond_21
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
iget-wide v4, v0, Lcom/cleanmaster/notificationclean/utils/a$a;->b:J
sub-long/2addr v2, v4
.line 156
const-wide/32 v4, 0xea60
cmp-long v2, v2, v4
if-lez v2, :cond_3e
.line 157
const-string v0, "ColorInfo"
const-string/jumbo v2, "\u989c\u8272\u503c\u4e0d\u5728\u6709\u6548\u671f"
invoke-static {v0, v2}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
.line 158
sget-object v0, Lcom/cleanmaster/notificationclean/utils/a;->a:Ljava/lang/ref/WeakReference;
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->clear()V
move-object v0, v1
.line 159
goto :goto_d
.line 161
:cond_3e
const-string v1, "ColorInfo"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v3, "\u8bfb\u53d6\u989c\u8272 colorInfo="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget v3, v0, Lcom/cleanmaster/notificationclean/utils/a$a;->a:I
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Lcom/cm/reminder/asr/helper/c;->b(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_d
.end method
.method public b(Landroid/content/Context;)Z
.registers 3
.prologue
.line 126
invoke-virtual {p0, p1}, Lcom/cleanmaster/notificationclean/utils/a;->a(Landroid/content/Context;)I
move-result v0
invoke-direct {p0, v0}, Lcom/cleanmaster/notificationclean/utils/a;->a(I)Z
move-result v0
if-nez v0, :cond_c
const/4 v0, 0x1
:goto_b
return v0
:cond_c
const/4 v0, 0x0
goto :goto_b
.end method