apkfuckery/com.discord/smali/androidx/appcompat/app/AppCompatDelegate.smali

605 lines
16 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public abstract Landroidx/appcompat/app/AppCompatDelegate;
.super Ljava/lang/Object;
.source "AppCompatDelegate.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/app/AppCompatDelegate$NightMode;
}
.end annotation
# static fields
2020-09-09 19:21:20 +00:00
.field public static final DEBUG:Z = false
2020-05-17 12:40:10 +00:00
.field public static final FEATURE_ACTION_MODE_OVERLAY:I = 0xa
.field public static final FEATURE_SUPPORT_ACTION_BAR:I = 0x6c
.field public static final FEATURE_SUPPORT_ACTION_BAR_OVERLAY:I = 0x6d
.field public static final MODE_NIGHT_AUTO:I = 0x0
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end field
.field public static final MODE_NIGHT_AUTO_BATTERY:I = 0x3
.field public static final MODE_NIGHT_AUTO_TIME:I = 0x0
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.end field
.field public static final MODE_NIGHT_FOLLOW_SYSTEM:I = -0x1
.field public static final MODE_NIGHT_NO:I = 0x1
.field public static final MODE_NIGHT_UNSPECIFIED:I = -0x64
.field public static final MODE_NIGHT_YES:I = 0x2
.field public static final TAG:Ljava/lang/String; = "AppCompatDelegate"
2020-09-09 19:21:20 +00:00
.field public static final sActivityDelegates:Landroidx/collection/ArraySet;
2020-05-17 12:40:10 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/collection/ArraySet<",
"Ljava/lang/ref/WeakReference<",
"Landroidx/appcompat/app/AppCompatDelegate;",
">;>;"
}
.end annotation
.end field
2020-09-09 19:21:20 +00:00
.field public static final sActivityDelegatesLock:Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
.field public static sDefaultNightMode:I = -0x64
# direct methods
.method public static constructor <clinit>()V
.locals 1
new-instance v0, Landroidx/collection/ArraySet;
invoke-direct {v0}, Landroidx/collection/ArraySet;-><init>()V
2020-09-09 19:21:20 +00:00
sput-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegates:Landroidx/collection/ArraySet;
2020-05-17 12:40:10 +00:00
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
2020-09-09 19:21:20 +00:00
sput-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegatesLock:Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
2020-09-09 19:21:20 +00:00
.method public static addActiveDelegate(Landroidx/appcompat/app/AppCompatDelegate;)V
.locals 3
.param p0 # Landroidx/appcompat/app/AppCompatDelegate;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegatesLock:Ljava/lang/Object;
monitor-enter v0
:try_start_0
invoke-static {p0}, Landroidx/appcompat/app/AppCompatDelegate;->removeDelegateFromActives(Landroidx/appcompat/app/AppCompatDelegate;)V
sget-object v1, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegates:Landroidx/collection/ArraySet;
new-instance v2, Ljava/lang/ref/WeakReference;
invoke-direct {v2, p0}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
invoke-virtual {v1, v2}, Landroidx/collection/ArraySet;->add(Ljava/lang/Object;)Z
monitor-exit v0
return-void
:catchall_0
move-exception p0
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p0
.end method
2020-05-17 12:40:10 +00:00
.method public static applyDayNightToActiveDelegates()V
.locals 3
2020-09-09 19:21:20 +00:00
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegatesLock:Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
monitor-enter v0
:try_start_0
2020-09-09 19:21:20 +00:00
sget-object v1, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegates:Landroidx/collection/ArraySet;
2020-05-17 12:40:10 +00:00
invoke-virtual {v1}, Landroidx/collection/ArraySet;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_0
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/ref/WeakReference;
invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/appcompat/app/AppCompatDelegate;
if-eqz v2, :cond_0
invoke-virtual {v2}, Landroidx/appcompat/app/AppCompatDelegate;->applyDayNight()Z
goto :goto_0
:cond_1
monitor-exit v0
return-void
:catchall_0
move-exception v1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method
.method public static create(Landroid/app/Activity;Landroidx/appcompat/app/AppCompatCallback;)Landroidx/appcompat/app/AppCompatDelegate;
.locals 1
.param p0 # Landroid/app/Activity;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroidx/appcompat/app/AppCompatCallback;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl;
invoke-direct {v0, p0, p1}, Landroidx/appcompat/app/AppCompatDelegateImpl;-><init>(Landroid/app/Activity;Landroidx/appcompat/app/AppCompatCallback;)V
return-object v0
.end method
.method public static create(Landroid/app/Dialog;Landroidx/appcompat/app/AppCompatCallback;)Landroidx/appcompat/app/AppCompatDelegate;
.locals 1
.param p0 # Landroid/app/Dialog;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroidx/appcompat/app/AppCompatCallback;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl;
invoke-direct {v0, p0, p1}, Landroidx/appcompat/app/AppCompatDelegateImpl;-><init>(Landroid/app/Dialog;Landroidx/appcompat/app/AppCompatCallback;)V
return-object v0
.end method
.method public static create(Landroid/content/Context;Landroid/app/Activity;Landroidx/appcompat/app/AppCompatCallback;)Landroidx/appcompat/app/AppCompatDelegate;
.locals 1
.param p0 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroid/app/Activity;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroidx/appcompat/app/AppCompatCallback;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl;
invoke-direct {v0, p0, p1, p2}, Landroidx/appcompat/app/AppCompatDelegateImpl;-><init>(Landroid/content/Context;Landroid/app/Activity;Landroidx/appcompat/app/AppCompatCallback;)V
return-object v0
.end method
.method public static create(Landroid/content/Context;Landroid/view/Window;Landroidx/appcompat/app/AppCompatCallback;)Landroidx/appcompat/app/AppCompatDelegate;
.locals 1
.param p0 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroid/view/Window;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroidx/appcompat/app/AppCompatCallback;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl;
invoke-direct {v0, p0, p1, p2}, Landroidx/appcompat/app/AppCompatDelegateImpl;-><init>(Landroid/content/Context;Landroid/view/Window;Landroidx/appcompat/app/AppCompatCallback;)V
return-object v0
.end method
.method public static getDefaultNightMode()I
.locals 1
sget v0, Landroidx/appcompat/app/AppCompatDelegate;->sDefaultNightMode:I
return v0
.end method
.method public static isCompatVectorFromResourcesEnabled()Z
.locals 1
invoke-static {}, Landroidx/appcompat/widget/VectorEnabledTintResources;->isCompatVectorFromResourcesEnabled()Z
move-result v0
return v0
.end method
2020-09-09 19:21:20 +00:00
.method public static removeActivityDelegate(Landroidx/appcompat/app/AppCompatDelegate;)V
2020-05-17 12:40:10 +00:00
.locals 1
.param p0 # Landroidx/appcompat/app/AppCompatDelegate;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2020-09-09 19:21:20 +00:00
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegatesLock:Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
monitor-enter v0
:try_start_0
invoke-static {p0}, Landroidx/appcompat/app/AppCompatDelegate;->removeDelegateFromActives(Landroidx/appcompat/app/AppCompatDelegate;)V
monitor-exit v0
return-void
:catchall_0
move-exception p0
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p0
.end method
.method public static removeDelegateFromActives(Landroidx/appcompat/app/AppCompatDelegate;)V
.locals 3
.param p0 # Landroidx/appcompat/app/AppCompatDelegate;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
2020-09-09 19:21:20 +00:00
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegatesLock:Ljava/lang/Object;
2020-05-17 12:40:10 +00:00
monitor-enter v0
:try_start_0
2020-09-09 19:21:20 +00:00
sget-object v1, Landroidx/appcompat/app/AppCompatDelegate;->sActivityDelegates:Landroidx/collection/ArraySet;
2020-05-17 12:40:10 +00:00
invoke-virtual {v1}, Landroidx/collection/ArraySet;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_0
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_2
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/ref/WeakReference;
invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroidx/appcompat/app/AppCompatDelegate;
if-eq v2, p0, :cond_1
if-nez v2, :cond_0
:cond_1
invoke-interface {v1}, Ljava/util/Iterator;->remove()V
goto :goto_0
:cond_2
monitor-exit v0
return-void
:catchall_0
move-exception p0
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p0
.end method
.method public static setCompatVectorFromResourcesEnabled(Z)V
.locals 0
invoke-static {p0}, Landroidx/appcompat/widget/VectorEnabledTintResources;->setCompatVectorFromResourcesEnabled(Z)V
return-void
.end method
.method public static setDefaultNightMode(I)V
.locals 1
const/4 v0, -0x1
if-eq p0, v0, :cond_0
if-eqz p0, :cond_0
const/4 v0, 0x1
if-eq p0, v0, :cond_0
const/4 v0, 0x2
if-eq p0, v0, :cond_0
const/4 v0, 0x3
if-eq p0, v0, :cond_0
const-string p0, "AppCompatDelegate"
const-string v0, "setDefaultNightMode() called with an unknown mode"
invoke-static {p0, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
:cond_0
sget v0, Landroidx/appcompat/app/AppCompatDelegate;->sDefaultNightMode:I
if-eq v0, p0, :cond_1
sput p0, Landroidx/appcompat/app/AppCompatDelegate;->sDefaultNightMode:I
invoke-static {}, Landroidx/appcompat/app/AppCompatDelegate;->applyDayNightToActiveDelegates()V
:cond_1
:goto_0
return-void
.end method
# virtual methods
.method public abstract addContentView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.end method
.method public abstract applyDayNight()Z
.end method
.method public attachBaseContext(Landroid/content/Context;)V
.locals 0
2020-09-09 19:21:20 +00:00
.annotation runtime Ljava/lang/Deprecated;
.end annotation
2020-05-17 12:40:10 +00:00
return-void
.end method
2020-09-09 19:21:20 +00:00
.method public attachBaseContext2(Landroid/content/Context;)Landroid/content/Context;
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/CallSuper;
.end annotation
.annotation build Landroidx/annotation/NonNull;
.end annotation
invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatDelegate;->attachBaseContext(Landroid/content/Context;)V
return-object p1
.end method
2020-05-17 12:40:10 +00:00
.method public abstract createView(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.param p3 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p4 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.end method
.method public abstract findViewById(I)Landroid/view/View;
.param p1 # I
.annotation build Landroidx/annotation/IdRes;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Landroid/view/View;",
">(I)TT;"
}
.end annotation
.end method
.method public abstract getDrawerToggleDelegate()Landroidx/appcompat/app/ActionBarDrawerToggle$Delegate;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end method
.method public getLocalNightMode()I
.locals 1
const/16 v0, -0x64
return v0
.end method
.method public abstract getMenuInflater()Landroid/view/MenuInflater;
.end method
.method public abstract getSupportActionBar()Landroidx/appcompat/app/ActionBar;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end method
.method public abstract hasWindowFeature(I)Z
.end method
.method public abstract installViewFactory()V
.end method
.method public abstract invalidateOptionsMenu()V
.end method
.method public abstract isHandleNativeActionModesEnabled()Z
.end method
.method public abstract onConfigurationChanged(Landroid/content/res/Configuration;)V
.end method
.method public abstract onCreate(Landroid/os/Bundle;)V
.end method
.method public abstract onDestroy()V
.end method
.method public abstract onPostCreate(Landroid/os/Bundle;)V
.end method
.method public abstract onPostResume()V
.end method
.method public abstract onSaveInstanceState(Landroid/os/Bundle;)V
.end method
.method public abstract onStart()V
.end method
.method public abstract onStop()V
.end method
.method public abstract requestWindowFeature(I)Z
.end method
.method public abstract setContentView(I)V
.param p1 # I
.annotation build Landroidx/annotation/LayoutRes;
.end annotation
.end param
.end method
.method public abstract setContentView(Landroid/view/View;)V
.end method
.method public abstract setContentView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.end method
.method public abstract setHandleNativeActionModesEnabled(Z)V
.end method
.method public abstract setLocalNightMode(I)V
2020-09-09 19:21:20 +00:00
.annotation build Landroidx/annotation/RequiresApi;
value = 0x11
.end annotation
2020-05-17 12:40:10 +00:00
.end method
.method public abstract setSupportActionBar(Landroidx/appcompat/widget/Toolbar;)V
.param p1 # Landroidx/appcompat/widget/Toolbar;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.end method
.method public setTheme(I)V
.locals 0
.param p1 # I
.annotation build Landroidx/annotation/StyleRes;
.end annotation
.end param
return-void
.end method
.method public abstract setTitle(Ljava/lang/CharSequence;)V
.param p1 # Ljava/lang/CharSequence;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.end method
.method public abstract startSupportActionMode(Landroidx/appcompat/view/ActionMode$Callback;)Landroidx/appcompat/view/ActionMode;
.param p1 # Landroidx/appcompat/view/ActionMode$Callback;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end method