Files
rr3-apk/smali_classes2/com/firemint/realracing/NotificationChannelHelper.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

291 lines
8.9 KiB
Smali

.class public Lcom/firemint/realracing/NotificationChannelHelper;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;
}
.end annotation
# instance fields
.field private CHANNEL_ID_CARS:Ljava/lang/String;
.field private CHANNEL_ID_DOWNLOADS:Ljava/lang/String;
.field private CHANNEL_ID_GENERAL:Ljava/lang/String;
.field private CHANNEL_ID_SPECIAL_EVENTS:Ljava/lang/String;
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 0
.line 26
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 27
invoke-direct {p0, p1}, Lcom/firemint/realracing/NotificationChannelHelper;->InitialiseNotificationChannels(Landroid/content/Context;)V
return-void
.end method
.method private CacheChannelNames(Landroid/content/Context;)V
.locals 1
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_GENERAL_ID:I
.line 32
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_GENERAL:Ljava/lang/String;
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_CARS_ID:I
.line 33
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_CARS:Ljava/lang/String;
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_SPECIAL_EVENTS_ID:I
.line 34
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_SPECIAL_EVENTS:Ljava/lang/String;
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_DOWNLOADS_ID:I
.line 35
invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object p1
iput-object p1, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_DOWNLOADS:Ljava/lang/String;
return-void
.end method
.method private CreateNotificationChannels(Landroid/app/NotificationManager;Landroid/content/Context;)V
.locals 10
const/4 v6, 0x4
new-array v7, v6, [Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;
.line 146
new-instance v8, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;
iget-object v2, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_GENERAL:Ljava/lang/String;
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_GENERAL_TITLE:I
.line 149
invoke-virtual {p2, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
const/4 v4, 0x3
const/4 v5, 0x0
move-object v0, v8
move-object v1, p0
invoke-direct/range {v0 .. v5}, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;-><init>(Lcom/firemint/realracing/NotificationChannelHelper;Ljava/lang/String;Ljava/lang/String;ILcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer-IA;)V
const/4 v9, 0x0
aput-object v8, v7, v9
new-instance v8, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;
iget-object v2, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_CARS:Ljava/lang/String;
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_CARS_TITLE:I
.line 153
invoke-virtual {p2, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
move-object v0, v8
invoke-direct/range {v0 .. v5}, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;-><init>(Lcom/firemint/realracing/NotificationChannelHelper;Ljava/lang/String;Ljava/lang/String;ILcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer-IA;)V
const/4 v0, 0x1
aput-object v8, v7, v0
new-instance v8, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;
iget-object v2, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_SPECIAL_EVENTS:Ljava/lang/String;
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_SPECIAL_EVENTS_TITLE:I
.line 157
invoke-virtual {p2, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
move-object v0, v8
invoke-direct/range {v0 .. v5}, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;-><init>(Lcom/firemint/realracing/NotificationChannelHelper;Ljava/lang/String;Ljava/lang/String;ILcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer-IA;)V
const/4 v0, 0x2
aput-object v8, v7, v0
new-instance v8, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;
iget-object v2, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_DOWNLOADS:Ljava/lang/String;
sget v0, Lcom/firemint/realracing/R$string;->NOTIFICATION_CHANNEL_DOWNLOADS:I
.line 161
invoke-virtual {p2, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
const/4 v4, 0x2
move-object v0, v8
invoke-direct/range {v0 .. v5}, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;-><init>(Lcom/firemint/realracing/NotificationChannelHelper;Ljava/lang/String;Ljava/lang/String;ILcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer-IA;)V
const/4 v0, 0x3
aput-object v8, v7, v0
:goto_0
if-ge v9, v6, :cond_0
.line 165
aget-object v0, v7, v9
.line 167
invoke-virtual {v0, p1, p2}, Lcom/firemint/realracing/NotificationChannelHelper$NotificationChannelContainer;->CreateNotificationChannel(Landroid/app/NotificationManager;Landroid/content/Context;)V
add-int/lit8 v9, v9, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method private InitialiseNotificationChannels(Landroid/content/Context;)V
.locals 1
const/16 v0, 0x1a
.line 125
invoke-static {v0}, Lcom/firemint/realracing/MainActivity;->IsAtLeastAPI(I)Z
move-result v0
if-eqz v0, :cond_0
.line 127
invoke-direct {p0, p1}, Lcom/firemint/realracing/NotificationChannelHelper;->CacheChannelNames(Landroid/content/Context;)V
const-string v0, "notification"
.line 128
invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/NotificationManager;
.line 139
invoke-direct {p0, v0, p1}, Lcom/firemint/realracing/NotificationChannelHelper;->CreateNotificationChannels(Landroid/app/NotificationManager;Landroid/content/Context;)V
:cond_0
return-void
.end method
# virtual methods
.method public NotificationToChannelId(I)Ljava/lang/String;
.locals 2
packed-switch p1, :pswitch_data_0
.line 117
:pswitch_0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Failed to find a channel for id: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string v0, "RR3_Notif_Channel_Mgr"
invoke-static {v0, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
iget-object p1, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_GENERAL:Ljava/lang/String;
return-object p1
:pswitch_1
iget-object p1, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_CARS:Ljava/lang/String;
return-object p1
:pswitch_2
iget-object p1, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_SPECIAL_EVENTS:Ljava/lang/String;
return-object p1
:pswitch_3
iget-object p1, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_DOWNLOADS:Ljava/lang/String;
return-object p1
:pswitch_4
iget-object p1, p0, Lcom/firemint/realracing/NotificationChannelHelper;->CHANNEL_ID_GENERAL:Ljava/lang/String;
return-object p1
:pswitch_data_0
.packed-switch -0x2
:pswitch_4
:pswitch_0
:pswitch_0
:pswitch_3
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_1
:pswitch_1
:pswitch_4
:pswitch_2
:pswitch_4
:pswitch_4
:pswitch_2
:pswitch_0
:pswitch_1
:pswitch_1
.end packed-switch
.end method