365 lines
9.1 KiB
Smali
365 lines
9.1 KiB
Smali
.class public final Lcom/vk/pushes/NotificationChannelsController;
|
|
.super Ljava/lang/Object;
|
|
.source "NotificationChannelsController.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"CheckResult"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final a:Lcom/vk/pushes/NotificationChannelsController;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 17
|
|
new-instance v0, Lcom/vk/pushes/NotificationChannelsController;
|
|
|
|
invoke-direct {v0}, Lcom/vk/pushes/NotificationChannelsController;-><init>()V
|
|
|
|
sput-object v0, Lcom/vk/pushes/NotificationChannelsController;->a:Lcom/vk/pushes/NotificationChannelsController;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 17
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Lcom/vk/pushes/NotificationChannelsController;Landroid/content/Context;ZILjava/lang/Object;)V
|
|
.locals 0
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x1a
|
|
.end annotation
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 75
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/vk/pushes/NotificationChannelsController;->b(Landroid/content/Context;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Landroid/content/Context;)Landroid/app/NotificationChannel;
|
|
.locals 3
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x1a
|
|
.end annotation
|
|
|
|
const-string v0, "ctx"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 55
|
|
new-instance v0, Landroid/app/NotificationChannel;
|
|
|
|
const-string v1, "sync_msg_send_channel"
|
|
|
|
const v2, 0x7f1109cb
|
|
|
|
.line 57
|
|
invoke-virtual {p1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/CharSequence;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
.line 55
|
|
invoke-direct {v0, v1, p1, v2}, Landroid/app/NotificationChannel;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;I)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final a(Landroid/content/Context;Z)Landroid/app/NotificationChannel;
|
|
.locals 3
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x1a
|
|
.end annotation
|
|
|
|
const-string v0, "ctx"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 68
|
|
new-instance v0, Landroid/app/NotificationChannel;
|
|
|
|
const-string v1, "uploads_group"
|
|
|
|
const v2, 0x7f1107f1
|
|
|
|
.line 70
|
|
invoke-virtual {p1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/CharSequence;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 p2, 0x2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p2, 0x3
|
|
|
|
.line 68
|
|
:goto_0
|
|
invoke-direct {v0, v1, p1, p2}, Landroid/app/NotificationChannel;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;I)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final a()V
|
|
.locals 2
|
|
|
|
.line 40
|
|
invoke-virtual {p0}, Lcom/vk/pushes/NotificationChannelsController;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 41
|
|
:cond_0
|
|
sget-object v0, Lcom/vk/pushes/NotificationChannelsLocal;->a:Lcom/vk/pushes/NotificationChannelsLocal;
|
|
|
|
invoke-virtual {v0}, Lcom/vk/pushes/NotificationChannelsLocal;->a()V
|
|
|
|
.line 42
|
|
sget-object v0, Lcom/vk/pushes/NotificationChannelsServer;->a:Lcom/vk/pushes/NotificationChannelsServer;
|
|
|
|
invoke-virtual {v0}, Lcom/vk/pushes/NotificationChannelsServer;->a()V
|
|
|
|
.line 43
|
|
sget-object v0, Lcom/vk/core/util/AppContextHolder;->a:Landroid/content/Context;
|
|
|
|
const-string v1, "AppContextHolder.context"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0}, Lcom/vk/music/notifications/MusicNotificationManager;->a(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
const-string v0, "accessToken"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "secret"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 47
|
|
invoke-virtual {p0}, Lcom/vk/pushes/NotificationChannelsController;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 48
|
|
:cond_0
|
|
sget-object v0, Lcom/vk/pushes/NotificationChannelsLocal;->a:Lcom/vk/pushes/NotificationChannelsLocal;
|
|
|
|
invoke-virtual {v0}, Lcom/vk/pushes/NotificationChannelsLocal;->b()V
|
|
|
|
.line 49
|
|
sget-object v0, Lcom/vk/pushes/NotificationChannelsServer;->a:Lcom/vk/pushes/NotificationChannelsServer;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/vk/pushes/NotificationChannelsServer;->a(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 50
|
|
sget-object p1, Lcom/vk/core/util/AppContextHolder;->a:Landroid/content/Context;
|
|
|
|
const-string p2, "AppContextHolder.context"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lcom/vk/music/notifications/MusicNotificationManager;->b(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Ljava/lang/String;)Z
|
|
.locals 4
|
|
|
|
const-string v0, "channelName"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 80
|
|
invoke-virtual {p0}, Lcom/vk/pushes/NotificationChannelsController;->b()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 82
|
|
:cond_0
|
|
sget-object v0, Lcom/vk/core/util/AppContextHolder;->a:Landroid/content/Context;
|
|
|
|
.line 84
|
|
sget-object v2, Lcom/vk/pushes/a/NotificationHelper;->a:Lcom/vk/pushes/a/NotificationHelper;
|
|
|
|
const-string v3, "ctx"
|
|
|
|
invoke-static {v0, v3}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2, v0}, Lcom/vk/pushes/a/NotificationHelper;->e(Landroid/content/Context;)Landroid/app/NotificationManager;
|
|
|
|
move-result-object v0
|
|
|
|
.line 85
|
|
invoke-virtual {v0, p1}, Landroid/app/NotificationManager;->getNotificationChannel(Ljava/lang/String;)Landroid/app/NotificationChannel;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 86
|
|
invoke-virtual {p1}, Landroid/app/NotificationChannel;->getImportance()I
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public final b(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 89
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Ljava/lang/CharSequence;
|
|
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string p1, "default"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-nez p1, :cond_1
|
|
|
|
invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->a()V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final b(Landroid/content/Context;)V
|
|
.locals 1
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x1a
|
|
.end annotation
|
|
|
|
const-string v0, "ctx"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 63
|
|
sget-object v0, Lcom/vk/pushes/a/NotificationHelper;->a:Lcom/vk/pushes/a/NotificationHelper;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/vk/pushes/a/NotificationHelper;->e(Landroid/content/Context;)Landroid/app/NotificationManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, p1}, Lcom/vk/pushes/NotificationChannelsController;->a(Landroid/content/Context;)Landroid/app/NotificationChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final b(Landroid/content/Context;Z)V
|
|
.locals 1
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x1a
|
|
.end annotation
|
|
|
|
const-string v0, "ctx"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 76
|
|
sget-object v0, Lcom/vk/pushes/a/NotificationHelper;->a:Lcom/vk/pushes/a/NotificationHelper;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/vk/pushes/a/NotificationHelper;->e(Landroid/content/Context;)Landroid/app/NotificationManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/vk/pushes/NotificationChannelsController;->a(Landroid/content/Context;Z)Landroid/app/NotificationChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final b()Z
|
|
.locals 2
|
|
|
|
.line 91
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1a
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|