RNPushNotification$b.smali

.class public final Lcom/dieam/reactnativepushnotification/modules/RNPushNotification$b;
.super Landroid/content/BroadcastReceiver;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;->registerNotificationsReceiveNotificationActions(Lcom/facebook/react/bridge/ReadableArray;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = null
.end annotation


# instance fields
.field public final synthetic a:Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;


# direct methods
.method public constructor <init>(Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;)V
    .registers 2

    iput-object p1, p0, Lcom/dieam/reactnativepushnotification/modules/RNPushNotification$b;->a:Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;

    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method


# virtual methods
.method public final onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .registers 11

    const-string v0, "onReceive"

    const-string v1, "com/dieam/reactnativepushnotification/modules/RNPushNotification$2"

    const-string v2, "broadcast"

    invoke-static {v0, v1, v2}, Lcom/shopee/monitor/trace/c;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    const-string v3, "notification"

    .line 1
    invoke-virtual {p2, v3}, Landroid/content/Intent;->getBundleExtra(Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object p2

    .line 2
    iget-object v4, p0, Lcom/dieam/reactnativepushnotification/modules/RNPushNotification$b;->a:Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;

    # getter for: Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;->mJsDelivery:Lcom/dieam/reactnativepushnotification/modules/c;
    invoke-static {v4}, Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;->access$000(Lcom/dieam/reactnativepushnotification/modules/RNPushNotification;)Lcom/dieam/reactnativepushnotification/modules/c;

    move-result-object v4

    .line 3
    invoke-virtual {v4, p2}, Lcom/dieam/reactnativepushnotification/modules/c;->a(Landroid/os/Bundle;)Ljava/lang/String;

    move-result-object v5

    .line 4
    invoke-static {}, Lcom/facebook/react/bridge/Arguments;->createMap()Lcom/facebook/react/bridge/WritableMap;

    move-result-object v6

    const-string v7, "dataJSON"

    .line 5
    invoke-interface {v6, v7, v5}, Lcom/facebook/react/bridge/WritableMap;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v5, "notificationActionReceived"

    .line 6
    invoke-virtual {v4, v5, v6}, Lcom/dieam/reactnativepushnotification/modules/c;->c(Ljava/lang/String;Ljava/lang/Object;)V

    .line 7
    invoke-virtual {p1, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/app/NotificationManager;

    const-string v3, "id"

    .line 8
    invoke-virtual {p2, v3}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result p2

    .line 9
    invoke-virtual {p1, p2}, Landroid/app/NotificationManager;->cancel(I)V

    .line 10
    invoke-static {v0, v1, v2}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method