mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
122 lines
3.1 KiB
Smali
122 lines
3.1 KiB
Smali
.class public final Landroidx/media3/common/util/NotificationUtil;
|
|
.super Ljava/lang/Object;
|
|
.source "NotificationUtil.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/media3/common/util/NotificationUtil$Importance;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final IMPORTANCE_DEFAULT:I = 0x3
|
|
|
|
.field public static final IMPORTANCE_HIGH:I = 0x4
|
|
|
|
.field public static final IMPORTANCE_LOW:I = 0x2
|
|
|
|
.field public static final IMPORTANCE_MIN:I = 0x1
|
|
|
|
.field public static final IMPORTANCE_NONE:I = 0x0
|
|
|
|
.field public static final IMPORTANCE_UNSPECIFIED:I = -0x3e8
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 144
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static createNotificationChannel(Landroid/content/Context;Ljava/lang/String;III)V
|
|
.locals 2
|
|
|
|
.line 110
|
|
sget v0, Landroidx/media3/common/util/Util;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1a
|
|
|
|
if-lt v0, v1, :cond_1
|
|
|
|
const-string v0, "notification"
|
|
|
|
.line 113
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/app/NotificationManager;
|
|
|
|
.line 112
|
|
invoke-static {v0}, Landroidx/media3/common/util/Assertions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/app/NotificationManager;
|
|
|
|
.line 114
|
|
new-instance v1, Landroid/app/NotificationChannel;
|
|
|
|
.line 115
|
|
invoke-virtual {p0, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {v1, p1, p2, p4}, Landroid/app/NotificationChannel;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;I)V
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
.line 117
|
|
invoke-virtual {p0, p3}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v1, p0}, Landroid/app/NotificationChannel;->setDescription(Ljava/lang/String;)V
|
|
|
|
.line 119
|
|
:cond_0
|
|
invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public static setNotification(Landroid/content/Context;ILandroid/app/Notification;)V
|
|
.locals 1
|
|
|
|
const-string v0, "notification"
|
|
|
|
.line 136
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Landroid/app/NotificationManager;
|
|
|
|
invoke-static {p0}, Landroidx/media3/common/util/Assertions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Landroid/app/NotificationManager;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 138
|
|
invoke-virtual {p0, p1, p2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 140
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Landroid/app/NotificationManager;->cancel(I)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|