.class public final Lcom/floydwiz/gamingcenter/receivers/AppInstallReceiver;
.super Landroid/content/BroadcastReceiver;
.source ""


# direct methods
.method public constructor <init>()V
    .registers 1

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

    return-void
.end method


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

    const/4 v0, 0x1

    const/4 v1, 0x0

    if-nez p2, :cond_6

    :cond_4
    :goto_4
    move v2, v1

    goto :goto_16

    :cond_6
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v2

    if-nez v2, :cond_d

    goto :goto_4

    :cond_d
    const-string v3, "android.intent.action.PACKAGE_ADDED"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-ne v2, v0, :cond_4

    move v2, v0

    :goto_16
    if-eqz v2, :cond_51

    invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object p2

    if-nez p2, :cond_20

    const/4 p2, 0x0

    goto :goto_24

    :cond_20
    invoke-virtual {p2}, Landroid/net/Uri;->getSchemeSpecificPart()Ljava/lang/String;

    move-result-object p2

    :goto_24
    if-eqz p2, :cond_2e

    invoke-interface {p2}, Ljava/lang/CharSequence;->length()I

    move-result v2

    if-nez v2, :cond_2d

    goto :goto_2e

    :cond_2d
    move v0, v1

    :cond_2e
    :goto_2e
    if-nez v0, :cond_4a

    new-array v0, v1, [Ljava/lang/Object;

    const-string v1, "Some app installed, launching listener service"

    invoke-static {v1, v0}, Lbb/a;->a(Ljava/lang/String;[Ljava/lang/Object;)V

    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/floydwiz/gamingcenter/services/AppInstallListenerService;

    invoke-direct {v0, p1, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "package"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    if-nez p1, :cond_46

    goto :goto_51

    :cond_46
    invoke-virtual {p1, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    goto :goto_51

    :cond_4a
    new-array p1, v1, [Ljava/lang/Object;

    const-string p2, "package name is null or empty"

    invoke-static {p2, p1}, Lbb/a;->b(Ljava/lang/String;[Ljava/lang/Object;)V

    :cond_51
    :goto_51
    return-void
.end method
