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

476 lines
12 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +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
.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
2019-11-15 02:21:15 +00:00
.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
2019-07-24 11:27:29 +00:00
.field public static final MODE_NIGHT_FOLLOW_SYSTEM:I = -0x1
.field public static final MODE_NIGHT_NO:I = 0x1
2019-11-15 02:21:15 +00:00
.field public static final MODE_NIGHT_UNSPECIFIED:I = -0x64
2019-07-24 11:27:29 +00:00
.field public static final MODE_NIGHT_YES:I = 0x2
.field static final TAG:Ljava/lang/String; = "AppCompatDelegate"
2019-11-15 02:21:15 +00:00
.field private static final sActiveDelegates:Landroidx/collection/ArraySet;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/collection/ArraySet<",
"Ljava/lang/ref/WeakReference<",
"Landroidx/appcompat/app/AppCompatDelegate;",
">;>;"
}
.end annotation
.end field
.field private static final sActiveDelegatesLock:Ljava/lang/Object;
.field private static sDefaultNightMode:I = -0x64
2019-07-24 11:27:29 +00:00
# direct methods
.method static constructor <clinit>()V
2019-11-15 02:21:15 +00:00
.locals 1
new-instance v0, Landroidx/collection/ArraySet;
invoke-direct {v0}, Landroidx/collection/ArraySet;-><init>()V
sput-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegates:Landroidx/collection/ArraySet;
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegatesLock:Ljava/lang/Object;
2019-07-24 11:27:29 +00:00
return-void
.end method
.method constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
2019-11-15 02:21:15 +00:00
.method private static applyDayNightToActiveDelegates()V
.locals 3
2019-11-10 14:21:47 +00:00
2019-11-15 02:21:15 +00:00
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegatesLock:Ljava/lang/Object;
monitor-enter v0
:try_start_0
sget-object v1, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegates:Landroidx/collection/ArraySet;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
invoke-virtual {v1}, Landroidx/collection/ArraySet;->iterator()Ljava/util/Iterator;
2019-07-24 11:27:29 +00:00
move-result-object v1
2019-11-15 02:21:15 +00:00
: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
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
2019-07-24 11:27:29 +00:00
return-object v0
.end method
.method public static create(Landroid/app/Dialog;Landroidx/appcompat/app/AppCompatCallback;)Landroidx/appcompat/app/AppCompatDelegate;
2019-11-15 02:21:15 +00:00
.locals 1
2019-07-24 11:27:29 +00:00
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl;
2019-11-15 02:21:15 +00:00
invoke-direct {v0, p0, p1}, Landroidx/appcompat/app/AppCompatDelegateImpl;-><init>(Landroid/app/Dialog;Landroidx/appcompat/app/AppCompatCallback;)V
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
return-object v0
.end method
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
.method public static create(Landroid/content/Context;Landroid/app/Activity;Landroidx/appcompat/app/AppCompatCallback;)Landroidx/appcompat/app/AppCompatDelegate;
.locals 1
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
invoke-direct {v0, p0, p1, p2}, Landroidx/appcompat/app/AppCompatDelegateImpl;-><init>(Landroid/content/Context;Landroid/app/Activity;Landroidx/appcompat/app/AppCompatCallback;)V
2019-07-24 11:27:29 +00:00
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
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
2019-11-15 02:21:15 +00:00
.method static markStarted(Landroidx/appcompat/app/AppCompatDelegate;)V
.locals 3
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegatesLock: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;->sActiveDelegates: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
.method static markStopped(Landroidx/appcompat/app/AppCompatDelegate;)V
.locals 1
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegatesLock:Ljava/lang/Object;
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 private static removeDelegateFromActives(Landroidx/appcompat/app/AppCompatDelegate;)V
.locals 3
sget-object v0, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegatesLock:Ljava/lang/Object;
monitor-enter v0
:try_start_0
sget-object v1, Landroidx/appcompat/app/AppCompatDelegate;->sActiveDelegates:Landroidx/collection/ArraySet;
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
2019-07-24 11:27:29 +00:00
.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
2019-11-15 02:21:15 +00:00
const/4 v0, 0x3
if-eq p0, v0, :cond_0
2019-07-24 11:27:29 +00:00
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
2019-11-15 02:21:15 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
2019-11-15 02:21:15 +00:00
sget v0, Landroidx/appcompat/app/AppCompatDelegate;->sDefaultNightMode:I
if-eq v0, p0, :cond_1
2019-07-24 11:27:29 +00:00
sput p0, Landroidx/appcompat/app/AppCompatDelegate;->sDefaultNightMode:I
2019-11-15 02:21:15 +00:00
invoke-static {}, Landroidx/appcompat/app/AppCompatDelegate;->applyDayNightToActiveDelegates()V
:cond_1
:goto_0
2019-07-24 11:27:29 +00:00
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
2019-11-15 02:21:15 +00:00
.method public attachBaseContext(Landroid/content/Context;)V
.locals 0
return-void
.end method
2019-07-24 11:27:29 +00:00
.method public abstract createView(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
.end method
.method public abstract findViewById(I)Landroid/view/View;
.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;
.end method
2019-11-15 02:21:15 +00:00
.method public getLocalNightMode()I
.locals 1
const/16 v0, -0x64
return v0
.end method
2019-07-24 11:27:29 +00:00
.method public abstract getMenuInflater()Landroid/view/MenuInflater;
.end method
.method public abstract getSupportActionBar()Landroidx/appcompat/app/ActionBar;
.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
.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
.end method
.method public abstract setSupportActionBar(Landroidx/appcompat/widget/Toolbar;)V
.end method
2019-11-15 02:21:15 +00:00
.method public setTheme(I)V
.locals 0
return-void
.end method
2019-07-24 11:27:29 +00:00
.method public abstract setTitle(Ljava/lang/CharSequence;)V
.end method
.method public abstract startSupportActionMode(Landroidx/appcompat/view/ActionMode$Callback;)Landroidx/appcompat/view/ActionMode;
.end method