p.smali

.class public Lcom/cleanmaster/pluginscommonlib/p;
.super Ljava/lang/Object;
.source "PluginLayoutInflater.java"


# direct methods
.method public static a(Landroid/content/Context;Ljava/lang/ClassLoader;)Landroid/view/LayoutInflater;
    .registers 6

    .prologue
    .line 17
    const-string v0, "layout_inflater"

    .line 18
    invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    .line 19
    if-nez v0, :cond_12

    .line 20
    new-instance v0, Ljava/lang/AssertionError;

    const-string v1, "LayoutInflater not found."

    invoke-direct {v0, v1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V

    throw v0

    .line 23
    :cond_12
    invoke-virtual {v0}, Landroid/view/LayoutInflater;->getFactory2()Landroid/view/LayoutInflater$Factory2;

    move-result-object v1

    .line 24
    invoke-virtual {v0}, Landroid/view/LayoutInflater;->getFactory()Landroid/view/LayoutInflater$Factory;

    move-result-object v2

    .line 27
    invoke-static {v1}, Lcom/cleanmaster/pluginscommonlib/p;->a(Landroid/view/LayoutInflater$Factory2;)Z

    move-result v3

    if-eqz v3, :cond_29

    .line 28
    new-instance v2, Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;

    invoke-direct {v2, v1, p1}, Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;-><init>(Landroid/view/LayoutInflater$Factory2;Ljava/lang/ClassLoader;)V

    .line 29
    invoke-static {v0, v2}, Lcom/cleanmaster/pluginscommonlib/p;->b(Landroid/view/LayoutInflater;Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;)V

    .line 35
    :cond_28
    :goto_28
    return-object v0

    .line 30
    :cond_29
    invoke-static {v2}, Lcom/cleanmaster/pluginscommonlib/p;->a(Landroid/view/LayoutInflater$Factory;)Z

    move-result v1

    if-eqz v1, :cond_28

    .line 31
    new-instance v1, Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;

    invoke-direct {v1, v2, p1}, Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;-><init>(Landroid/view/LayoutInflater$Factory;Ljava/lang/ClassLoader;)V

    .line 32
    invoke-static {v0, v1}, Lcom/cleanmaster/pluginscommonlib/p;->a(Landroid/view/LayoutInflater;Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;)V

    goto :goto_28
.end method

.method private static a(Landroid/view/LayoutInflater;Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;)V
    .registers 4

    .prologue
    .line 57
    :try_start_0
    const-class v0, Landroid/view/LayoutInflater;

    const-string v1, "mFactory"

    invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v0

    .line 58
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 59
    invoke-virtual {v0, p0, p1}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V
    :try_end_f
    .catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_f} :catch_10
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_f} :catch_15

    .line 65
    :goto_f
    return-void

    .line 60
    :catch_10
    move-exception v0

    .line 61
    invoke-virtual {v0}, Ljava/lang/NoSuchFieldException;->printStackTrace()V

    goto :goto_f

    .line 62
    :catch_15
    move-exception v0

    .line 63
    invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    goto :goto_f
.end method

.method private static a(Landroid/view/LayoutInflater$Factory2;)Z
    .registers 2

    .prologue
    .line 49
    if-eqz p0, :cond_6

    instance-of v0, p0, Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;

    if-eqz v0, :cond_8

    .line 50
    :cond_6
    const/4 v0, 0x0

    .line 52
    :goto_7
    return v0

    :cond_8
    const/4 v0, 0x1

    goto :goto_7
.end method

.method private static a(Landroid/view/LayoutInflater$Factory;)Z
    .registers 3

    .prologue
    const/4 v0, 0x1

    .line 39
    if-nez p0, :cond_4

    .line 45
    :cond_3
    :goto_3
    return v0

    .line 42
    :cond_4
    instance-of v1, p0, Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;

    if-eqz v1, :cond_3

    .line 43
    const/4 v0, 0x0

    goto :goto_3
.end method

.method private static b(Landroid/view/LayoutInflater;Lcom/cleanmaster/hpcommonlib/PluginInflaterFactory;)V
    .registers 4

    .prologue
    .line 69
    :try_start_0
    const-class v0, Landroid/view/LayoutInflater;

    const-string v1, "mFactory2"

    invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v0

    .line 70
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 71
    invoke-virtual {v0, p0, p1}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V
    :try_end_f
    .catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_f} :catch_10
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_f} :catch_15

    .line 77
    :goto_f
    return-void

    .line 72
    :catch_10
    move-exception v0

    .line 73
    invoke-virtual {v0}, Ljava/lang/NoSuchFieldException;->printStackTrace()V

    goto :goto_f

    .line 74
    :catch_15
    move-exception v0

    .line 75
    invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    goto :goto_f
.end method