177 lines
4.1 KiB
Smali
177 lines
4.1 KiB
Smali
.class public final Le1/a;
|
|
.super Ljava/lang/Object;
|
|
.source "DisplayManagerCompat.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final b:Ljava/util/WeakHashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/WeakHashMap<",
|
|
"Landroid/content/Context;",
|
|
"Le1/a;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final c:Ljava/lang/String; = "android.hardware.display.category.PRESENTATION"
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Landroid/content/Context;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/util/WeakHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/WeakHashMap;-><init>()V
|
|
|
|
sput-object v0, Le1/a;->b:Ljava/util/WeakHashMap;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
iput-object p1, p0, Le1/a;->a:Landroid/content/Context;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static d(Landroid/content/Context;)Le1/a;
|
|
.locals 2
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
sget-object v0, Le1/a;->b:Ljava/util/WeakHashMap;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 2
|
|
:try_start_0
|
|
invoke-virtual {v0, p0}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Le1/a;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 3
|
|
new-instance v1, Le1/a;
|
|
|
|
invoke-direct {v1, p0}, Le1/a;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 4
|
|
invoke-virtual {v0, p0, v1}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 5
|
|
:cond_0
|
|
monitor-exit v0
|
|
|
|
return-object v1
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
.line 6
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(I)Landroid/view/Display;
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Le1/a;->a:Landroid/content/Context;
|
|
|
|
const-string v1, "display"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/hardware/display/DisplayManager;
|
|
|
|
.line 2
|
|
invoke-virtual {v0, p1}, Landroid/hardware/display/DisplayManager;->getDisplay(I)Landroid/view/Display;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public b()[Landroid/view/Display;
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Le1/a;->a:Landroid/content/Context;
|
|
|
|
const-string v1, "display"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/hardware/display/DisplayManager;
|
|
|
|
.line 2
|
|
invoke-virtual {v0}, Landroid/hardware/display/DisplayManager;->getDisplays()[Landroid/view/Display;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c(Ljava/lang/String;)[Landroid/view/Display;
|
|
.locals 2
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Le1/a;->a:Landroid/content/Context;
|
|
|
|
const-string v1, "display"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/hardware/display/DisplayManager;
|
|
|
|
.line 2
|
|
invoke-virtual {v0, p1}, Landroid/hardware/display/DisplayManager;->getDisplays(Ljava/lang/String;)[Landroid/view/Display;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|