apkfuckery/com.discord/smali/androidx/transition/ViewGroupUtilsApi18.smali

134 lines
3.4 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class Landroidx/transition/ViewGroupUtilsApi18;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "ViewGroupUtilsApi18.java"
2019-02-04 20:08:30 +00:00
# annotations
.annotation build Landroidx/annotation/RequiresApi;
value = 0x12
.end annotation
# static fields
.field private static final TAG:Ljava/lang/String; = "ViewUtilsApi18"
.field private static sSuppressLayoutMethod:Ljava/lang/reflect/Method;
.field private static sSuppressLayoutMethodFetched:Z
# direct methods
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static fetchSuppressLayoutMethod()V
.locals 6
sget-boolean v0, Landroidx/transition/ViewGroupUtilsApi18;->sSuppressLayoutMethodFetched:Z
if-nez v0, :cond_0
const/4 v0, 0x1
:try_start_0
const-class v1, Landroid/view/ViewGroup;
const-string v2, "suppressLayout"
new-array v3, v0, [Ljava/lang/Class;
const/4 v4, 0x0
sget-object v5, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
aput-object v5, v3, v4
invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
sput-object v1, Landroidx/transition/ViewGroupUtilsApi18;->sSuppressLayoutMethod:Ljava/lang/reflect/Method;
invoke-virtual {v1, v0}, Ljava/lang/reflect/Method;->setAccessible(Z)V
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v1
const-string v2, "ViewUtilsApi18"
const-string v3, "Failed to retrieve suppressLayout method"
invoke-static {v2, v3, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:goto_0
sput-boolean v0, Landroidx/transition/ViewGroupUtilsApi18;->sSuppressLayoutMethodFetched:Z
:cond_0
return-void
.end method
.method static suppressLayout(Landroid/view/ViewGroup;Z)V
2019-05-03 18:53:54 +00:00
.locals 4
2019-02-04 20:08:30 +00:00
.param p0 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2019-05-03 18:53:54 +00:00
const-string v0, "ViewUtilsApi18"
2019-02-04 20:08:30 +00:00
invoke-static {}, Landroidx/transition/ViewGroupUtilsApi18;->fetchSuppressLayoutMethod()V
2019-05-03 18:53:54 +00:00
sget-object v1, Landroidx/transition/ViewGroupUtilsApi18;->sSuppressLayoutMethod:Ljava/lang/reflect/Method;
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v1, :cond_0
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const/4 v2, 0x1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
:try_start_0
2019-05-03 18:53:54 +00:00
new-array v2, v2, [Ljava/lang/Object;
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const/4 v3, 0x0
2019-02-04 20:08:30 +00:00
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p1
2019-05-03 18:53:54 +00:00
aput-object p1, v2, v3
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-virtual {v1, p0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
2019-02-04 20:08:30 +00:00
:try_end_0
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p0
2019-05-03 18:53:54 +00:00
const-string p1, "Error invoking suppressLayout method"
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, p1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
2019-02-04 20:08:30 +00:00
goto :goto_0
:catch_1
move-exception p0
2019-05-03 18:53:54 +00:00
const-string p1, "Failed to invoke suppressLayout method"
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, p1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
2019-02-04 20:29:01 +00:00
2019-02-04 20:08:30 +00:00
:cond_0
:goto_0
return-void
.end method