WindowRootViewCompactV18Impl.smali
.class public Lcom/facebook/stetho/inspector/elements/android/window/WindowRootViewCompactV18Impl;
.super Lcom/facebook/stetho/inspector/elements/android/window/WindowRootViewCompat;
.source "WindowRootViewCompactV18Impl.java"
# instance fields
.field public mViewsField:Ljava/lang/reflect/Field;
.field public mWindowManagerGlobal:Ljava/lang/Object;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 5
invoke-direct {p0}, Lcom/facebook/stetho/inspector/elements/android/window/WindowRootViewCompat;-><init>()V
:try_start_3
const-string v0, "android.view.WindowManagerGlobal"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
const-string v1, "getInstance"
const/4 v2, 0x0
new-array v3, v2, [Ljava/lang/Class;
invoke-virtual {v0, v1, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
new-array v2, v2, [Ljava/lang/Object;
invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
iput-object v1, p0, Lcom/facebook/stetho/inspector/elements/android/window/WindowRootViewCompactV18Impl;->mWindowManagerGlobal:Ljava/lang/Object;
const-string v1, "mViews"
invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
iput-object v0, p0, Lcom/facebook/stetho/inspector/elements/android/window/WindowRootViewCompactV18Impl;->mViewsField:Ljava/lang/reflect/Field;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->setAccessible(Z)V
:try_end_26
.catch Ljava/lang/ClassNotFoundException; {:try_start_3 .. :try_end_26} :catch_43
.catch Ljava/lang/NoSuchMethodException; {:try_start_3 .. :try_end_26} :catch_3c
.catch Ljava/lang/IllegalAccessException; {:try_start_3 .. :try_end_26} :catch_35
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_3 .. :try_end_26} :catch_2e
.catch Ljava/lang/NoSuchFieldException; {:try_start_3 .. :try_end_26} :catch_27
return-void
:catch_27
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
:catch_2e
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
:catch_35
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
:catch_3c
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
:catch_43
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
# virtual methods
.method public getRootViews()Ljava/util/List;
.registers 3
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Landroid/view/View;",
">;"
}
.end annotation
:try_start_0
iget-object v0, p0, Lcom/facebook/stetho/inspector/elements/android/window/WindowRootViewCompactV18Impl;->mViewsField:Ljava/lang/reflect/Field;
iget-object v1, p0, Lcom/facebook/stetho/inspector/elements/android/window/WindowRootViewCompactV18Impl;->mWindowManagerGlobal:Ljava/lang/Object;
invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [Landroid/view/View;
invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
move-result-object v0
:try_end_12
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_12} :catch_13
return-object v0
:catch_13
move-exception v0
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method