apkfuckery/com.discord/smali/androidx/appcompat/view/ActionBarPolicy.smali

268 lines
5.9 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/appcompat/view/ActionBarPolicy;
.super Ljava/lang/Object;
.source "ActionBarPolicy.java"
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
# instance fields
.field public mContext:Landroid/content/Context;
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
return-void
.end method
.method public static get(Landroid/content/Context;)Landroidx/appcompat/view/ActionBarPolicy;
.locals 1
new-instance v0, Landroidx/appcompat/view/ActionBarPolicy;
invoke-direct {v0, p0}, Landroidx/appcompat/view/ActionBarPolicy;-><init>(Landroid/content/Context;)V
return-object v0
.end method
# virtual methods
.method public enableHomeButtonByDefault()Z
.locals 2
iget-object v0, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
move-result-object v0
iget v0, v0, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
const/16 v1, 0xe
if-ge v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public getEmbeddedMenuWidthLimit()I
.locals 1
iget-object v0, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v0
iget v0, v0, Landroid/util/DisplayMetrics;->widthPixels:I
div-int/lit8 v0, v0, 0x2
return v0
.end method
.method public getMaxActionButtons()I
.locals 4
iget-object v0, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
iget v1, v0, Landroid/content/res/Configuration;->screenWidthDp:I
iget v2, v0, Landroid/content/res/Configuration;->screenHeightDp:I
iget v0, v0, Landroid/content/res/Configuration;->smallestScreenWidthDp:I
const/16 v3, 0x258
if-gt v0, v3, :cond_6
if-gt v1, v3, :cond_6
const/16 v0, 0x2d0
const/16 v3, 0x3c0
if-le v1, v3, :cond_0
if-gt v2, v0, :cond_6
:cond_0
if-le v1, v0, :cond_1
if-le v2, v3, :cond_1
goto :goto_1
:cond_1
const/16 v0, 0x1f4
if-ge v1, v0, :cond_5
const/16 v0, 0x1e0
const/16 v3, 0x280
if-le v1, v3, :cond_2
if-gt v2, v0, :cond_5
:cond_2
if-le v1, v0, :cond_3
if-le v2, v3, :cond_3
goto :goto_0
:cond_3
const/16 v0, 0x168
if-lt v1, v0, :cond_4
const/4 v0, 0x3
return v0
:cond_4
const/4 v0, 0x2
return v0
:cond_5
:goto_0
const/4 v0, 0x4
return v0
:cond_6
:goto_1
const/4 v0, 0x5
return v0
.end method
.method public getStackedTabMaxWidth()I
.locals 2
iget-object v0, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
sget v1, Landroidx/appcompat/R$dimen;->abc_action_bar_stacked_tab_max_width:I
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v0
return v0
.end method
.method public getTabContainerHeight()I
.locals 5
iget-object v0, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
sget-object v1, Landroidx/appcompat/R$styleable;->ActionBar:[I
sget v2, Landroidx/appcompat/R$attr;->actionBarStyle:I
const/4 v3, 0x0
const/4 v4, 0x0
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v3, v1, v2, v4}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
2020-05-17 12:40:10 +00:00
move-result-object v0
sget v1, Landroidx/appcompat/R$styleable;->ActionBar_height:I
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v1, v4}, Landroid/content/res/TypedArray;->getLayoutDimension(II)I
2020-05-17 12:40:10 +00:00
move-result v1
iget-object v2, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v2
invoke-virtual {p0}, Landroidx/appcompat/view/ActionBarPolicy;->hasEmbeddedTabs()Z
move-result v3
if-nez v3, :cond_0
sget v3, Landroidx/appcompat/R$dimen;->abc_action_bar_stacked_max_height:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v2
invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I
move-result v1
:cond_0
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
return v1
.end method
.method public hasEmbeddedTabs()Z
.locals 2
iget-object v0, p0, Landroidx/appcompat/view/ActionBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
sget v1, Landroidx/appcompat/R$bool;->abc_action_bar_embed_tabs:I
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v0
return v0
.end method
.method public showsOverflowMenuButton()Z
.locals 1
const/4 v0, 0x1
return v0
.end method