apkfuckery/com.discord/smali/androidx/appcompat/widget/ViewUtils.smali

229 lines
5.4 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public Landroidx/appcompat/widget/ViewUtils;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "ViewUtils.java"
2019-02-04 20:08:30 +00:00
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
# static fields
.field private static final TAG:Ljava/lang/String; = "ViewUtils"
.field private static sComputeFitSystemWindowsMethod:Ljava/lang/reflect/Method;
# direct methods
.method static constructor <clinit>()V
.locals 5
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_1
:try_start_0
const-class v0, Landroid/view/View;
const-string v1, "computeFitSystemWindows"
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Class;
const/4 v3, 0x0
const-class v4, Landroid/graphics/Rect;
aput-object v4, v2, v3
const-class v3, Landroid/graphics/Rect;
const/4 v4, 0x1
aput-object v3, v2, v4
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
sput-object v0, Landroidx/appcompat/widget/ViewUtils;->sComputeFitSystemWindowsMethod:Ljava/lang/reflect/Method;
invoke-virtual {v0}, Ljava/lang/reflect/Method;->isAccessible()Z
move-result v0
if-nez v0, :cond_0
sget-object v0, Landroidx/appcompat/widget/ViewUtils;->sComputeFitSystemWindowsMethod:Ljava/lang/reflect/Method;
invoke-virtual {v0, v4}, Ljava/lang/reflect/Method;->setAccessible(Z)V
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
:cond_0
return-void
:catch_0
const-string v0, "ViewUtils"
const-string v1, "Could not find method computeFitSystemWindows. Oh well."
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_1
return-void
.end method
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static computeFitSystemWindows(Landroid/view/View;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
.locals 3
sget-object v0, Landroidx/appcompat/widget/ViewUtils;->sComputeFitSystemWindowsMethod:Ljava/lang/reflect/Method;
if-eqz v0, :cond_0
const/4 v1, 0x2
2019-02-04 20:29:01 +00:00
:try_start_0
2019-02-04 20:08:30 +00:00
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
aput-object p1, v1, v2
const/4 p1, 0x1
aput-object p2, v1, p1
invoke-virtual {v0, p0, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p0
const-string p1, "ViewUtils"
const-string p2, "Could not invoke computeFitSystemWindows"
invoke-static {p1, p2, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:cond_0
return-void
.end method
.method public static isLayoutRtl(Landroid/view/View;)Z
.locals 1
invoke-static {p0}, Landroidx/core/view/ViewCompat;->getLayoutDirection(Landroid/view/View;)I
move-result p0
const/4 v0, 0x1
if-ne p0, v0, :cond_0
return v0
:cond_0
const/4 p0, 0x0
return p0
.end method
.method public static makeOptionalFitsSystemWindows(Landroid/view/View;)V
.locals 4
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x10
if-lt v0, v1, :cond_1
:try_start_0
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
const-string v1, "makeOptionalFitsSystemWindows"
const/4 v2, 0x0
new-array v3, v2, [Ljava/lang/Class;
invoke-virtual {v0, v1, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/reflect/Method;->isAccessible()Z
move-result v1
if-nez v1, :cond_0
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljava/lang/reflect/Method;->setAccessible(Z)V
:cond_0
new-array v1, v2, [Ljava/lang/Object;
invoke-virtual {v0, p0, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_2
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
return-void
:catch_0
move-exception p0
const-string v0, "ViewUtils"
const-string v1, "Could not invoke makeOptionalFitsSystemWindows"
invoke-static {v0, v1, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_0
:catch_1
move-exception p0
const-string v0, "ViewUtils"
const-string v1, "Could not invoke makeOptionalFitsSystemWindows"
invoke-static {v0, v1, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
return-void
:catch_2
const-string p0, "ViewUtils"
const-string v0, "Could not find method makeOptionalFitsSystemWindows. Oh well..."
invoke-static {p0, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
2019-02-04 20:29:01 +00:00
return-void
2019-02-04 20:08:30 +00:00
:cond_1
:goto_0
return-void
.end method