y.smali

.class public Lcom/cleanmaster/pluginscommonlib/y;
.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 15
    const-string v0, "layout_inflater"

    .line 16
    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 17
    if-nez v0, :cond_12

    .line 18
    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 21
    :cond_12
    invoke-virtual {v0}, Landroid/view/LayoutInflater;->getFactory2()Landroid/view/LayoutInflater$Factory2;

    move-result-object v1

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

    move-result-object v2

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

    move-result v3

    if-eqz v3, :cond_29

    .line 26
    new-instance v2, Lcom/cleanmaster/pluginscommonlib/PluginInflaterFactory;

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

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

    .line 33
    :cond_28
    :goto_28
    return-object v0

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

    move-result v1

    if-eqz v1, :cond_28

    .line 29
    new-instance v1, Lcom/cleanmaster/pluginscommonlib/PluginInflaterFactory;

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

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

    goto :goto_28
.end method

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

    .prologue
    .line 55
    :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 56
    const/4 v1, 0x1

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

    .line 57
    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 63
    :goto_f
    return-void

    .line 58
    :catch_10
    move-exception v0

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

    goto :goto_f

    .line 60
    :catch_15
    move-exception v0

    .line 61
    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 47
    if-eqz p0, :cond_6

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

    if-eqz v0, :cond_8

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

    .line 50
    :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 37
    if-nez p0, :cond_4

    .line 43
    :cond_3
    :goto_3
    return v0

    .line 40
    :cond_4
    instance-of v1, p0, Lcom/cleanmaster/pluginscommonlib/PluginInflaterFactory;

    if-eqz v1, :cond_3

    .line 41
    const/4 v0, 0x0

    goto :goto_3
.end method

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

    .prologue
    .line 67
    :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 68
    const/4 v1, 0x1

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

    .line 69
    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 75
    :goto_f
    return-void

    .line 70
    :catch_10
    move-exception v0

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

    goto :goto_f

    .line 72
    :catch_15
    move-exception v0

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

    goto :goto_f
.end method