2019-07-24 11:27:29 +00:00
|
|
|
.class public Landroidx/appcompat/widget/ViewUtils;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "ViewUtils.java"
|
|
|
|
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
# annotations
|
|
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
|
|
value = {
|
|
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
# static fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static final TAG:Ljava/lang/String; = "ViewUtils"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public static sComputeFitSystemWindowsMethod:Ljava/lang/reflect/Method;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static constructor <clinit>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 5
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
: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;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object v0, Landroidx/appcompat/widget/ViewUtils;->sComputeFitSystemWindowsMethod:Ljava/lang/reflect/Method;
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
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
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
: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
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_0
|
|
|
|
:goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public constructor <init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.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
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
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
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
: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
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
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
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v0, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_0
|
|
|
|
return v0
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static makeOptionalFitsSystemWindows(Landroid/view/View;)V
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
const-string v0, "Could not invoke makeOptionalFitsSystemWindows"
|
|
|
|
|
|
|
|
const-string v1, "ViewUtils"
|
|
|
|
|
|
|
|
sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v3, "makeOptionalFitsSystemWindows"
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
new-array v5, v4, [Ljava/lang/Class;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/reflect/Method;->isAccessible()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-array v3, v4, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p0, v3}, 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
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
invoke-static {v1, v0, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
invoke-static {v1, v0, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:catch_2
|
|
|
|
const-string p0, "Could not find method makeOptionalFitsSystemWindows. Oh well..."
|
|
|
|
|
|
|
|
invoke-static {v1, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|