- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
625 lines
15 KiB
Smali
625 lines
15 KiB
Smali
.class Landroidx/appcompat/widget/TooltipPopup;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final TAG:Ljava/lang/String; = "TooltipPopup"
|
|
|
|
|
|
# instance fields
|
|
.field private final mContentView:Landroid/view/View;
|
|
|
|
.field private final mContext:Landroid/content/Context;
|
|
|
|
.field private final mLayoutParams:Landroid/view/WindowManager$LayoutParams;
|
|
|
|
.field private final mMessageView:Landroid/widget/TextView;
|
|
|
|
.field private final mTmpAnchorPos:[I
|
|
|
|
.field private final mTmpAppPos:[I
|
|
|
|
.field private final mTmpDisplayFrame:Landroid/graphics/Rect;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 4
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 58
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 53
|
|
new-instance v0, Landroid/view/WindowManager$LayoutParams;
|
|
|
|
invoke-direct {v0}, Landroid/view/WindowManager$LayoutParams;-><init>()V
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/widget/TooltipPopup;->mLayoutParams:Landroid/view/WindowManager$LayoutParams;
|
|
|
|
.line 54
|
|
new-instance v1, Landroid/graphics/Rect;
|
|
|
|
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
iput-object v1, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpDisplayFrame:Landroid/graphics/Rect;
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v2, v1, [I
|
|
|
|
iput-object v2, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpAnchorPos:[I
|
|
|
|
new-array v1, v1, [I
|
|
|
|
iput-object v1, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpAppPos:[I
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/widget/TooltipPopup;->mContext:Landroid/content/Context;
|
|
|
|
.line 61
|
|
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object v1
|
|
|
|
sget v2, Landroidx/appcompat/R$layout;->abc_tooltip:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Landroidx/appcompat/widget/TooltipPopup;->mContentView:Landroid/view/View;
|
|
|
|
sget v2, Landroidx/appcompat/R$id;->message:I
|
|
|
|
.line 62
|
|
invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/widget/TextView;
|
|
|
|
iput-object v1, p0, Landroidx/appcompat/widget/TooltipPopup;->mMessageView:Landroid/widget/TextView;
|
|
|
|
.line 64
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V
|
|
|
|
.line 65
|
|
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, v0, Landroid/view/WindowManager$LayoutParams;->packageName:Ljava/lang/String;
|
|
|
|
const/16 p1, 0x3ea
|
|
|
|
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->type:I
|
|
|
|
const/4 p1, -0x2
|
|
|
|
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->width:I
|
|
|
|
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->height:I
|
|
|
|
const/4 p1, -0x3
|
|
|
|
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->format:I
|
|
|
|
sget p1, Landroidx/appcompat/R$style;->Animation_AppCompat_Tooltip:I
|
|
|
|
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
|
|
|
|
const/16 p1, 0x18
|
|
|
|
iput p1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private computePosition(Landroid/view/View;IIZLandroid/view/WindowManager$LayoutParams;)V
|
|
.locals 8
|
|
|
|
.line 104
|
|
invoke-virtual {p1}, Landroid/view/View;->getApplicationWindowToken()Landroid/os/IBinder;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p5, Landroid/view/WindowManager$LayoutParams;->token:Landroid/os/IBinder;
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/TooltipPopup;->mContext:Landroid/content/Context;
|
|
|
|
.line 105
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v1, Landroidx/appcompat/R$dimen;->tooltip_precise_anchor_threshold:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I
|
|
|
|
move-result v0
|
|
|
|
.line 109
|
|
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
|
|
|
|
move-result v1
|
|
|
|
if-lt v1, v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 114
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
|
|
|
|
move-result p2
|
|
|
|
div-int/lit8 p2, p2, 0x2
|
|
|
|
.line 119
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-lt v1, v0, :cond_1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/TooltipPopup;->mContext:Landroid/content/Context;
|
|
|
|
.line 121
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v1, Landroidx/appcompat/R$dimen;->tooltip_precise_anchor_extra_offset:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I
|
|
|
|
move-result v0
|
|
|
|
add-int v1, p3, v0
|
|
|
|
sub-int/2addr p3, v0
|
|
|
|
goto :goto_1
|
|
|
|
.line 127
|
|
:cond_1
|
|
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
move p3, v2
|
|
|
|
:goto_1
|
|
const/16 v0, 0x31
|
|
|
|
.line 131
|
|
iput v0, p5, Landroid/view/WindowManager$LayoutParams;->gravity:I
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/TooltipPopup;->mContext:Landroid/content/Context;
|
|
|
|
.line 133
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
sget v3, Landroidx/appcompat/R$dimen;->tooltip_y_offset_touch:I
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
sget v3, Landroidx/appcompat/R$dimen;->tooltip_y_offset_non_touch:I
|
|
|
|
:goto_2
|
|
invoke-virtual {v0, v3}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I
|
|
|
|
move-result v0
|
|
|
|
.line 136
|
|
invoke-static {p1}, Landroidx/appcompat/widget/TooltipPopup;->getAppRootView(Landroid/view/View;)Landroid/view/View;
|
|
|
|
move-result-object v3
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
const-string p1, "TooltipPopup"
|
|
|
|
const-string p2, "Cannot find app view"
|
|
|
|
.line 138
|
|
invoke-static {p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
iget-object v4, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpDisplayFrame:Landroid/graphics/Rect;
|
|
|
|
.line 141
|
|
invoke-virtual {v3, v4}, Landroid/view/View;->getWindowVisibleDisplayFrame(Landroid/graphics/Rect;)V
|
|
|
|
iget-object v4, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpDisplayFrame:Landroid/graphics/Rect;
|
|
|
|
.line 142
|
|
iget v5, v4, Landroid/graphics/Rect;->left:I
|
|
|
|
if-gez v5, :cond_5
|
|
|
|
iget v4, v4, Landroid/graphics/Rect;->top:I
|
|
|
|
if-gez v4, :cond_5
|
|
|
|
iget-object v4, p0, Landroidx/appcompat/widget/TooltipPopup;->mContext:Landroid/content/Context;
|
|
|
|
.line 145
|
|
invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "dimen"
|
|
|
|
const-string v6, "android"
|
|
|
|
const-string v7, "status_bar_height"
|
|
|
|
.line 147
|
|
invoke-virtual {v4, v7, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
.line 149
|
|
invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v5
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
move v5, v2
|
|
|
|
.line 153
|
|
:goto_3
|
|
invoke-virtual {v4}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object v6, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpDisplayFrame:Landroid/graphics/Rect;
|
|
|
|
.line 154
|
|
iget v7, v4, Landroid/util/DisplayMetrics;->widthPixels:I
|
|
|
|
iget v4, v4, Landroid/util/DisplayMetrics;->heightPixels:I
|
|
|
|
invoke-virtual {v6, v2, v5, v7, v4}, Landroid/graphics/Rect;->set(IIII)V
|
|
|
|
:cond_5
|
|
iget-object v4, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpAppPos:[I
|
|
|
|
.line 156
|
|
invoke-virtual {v3, v4}, Landroid/view/View;->getLocationOnScreen([I)V
|
|
|
|
iget-object v4, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpAnchorPos:[I
|
|
|
|
.line 158
|
|
invoke-virtual {p1, v4}, Landroid/view/View;->getLocationOnScreen([I)V
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpAnchorPos:[I
|
|
|
|
.line 159
|
|
aget v4, p1, v2
|
|
|
|
iget-object v5, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpAppPos:[I
|
|
|
|
aget v6, v5, v2
|
|
|
|
sub-int/2addr v4, v6
|
|
|
|
aput v4, p1, v2
|
|
|
|
const/4 v6, 0x1
|
|
|
|
.line 160
|
|
aget v7, p1, v6
|
|
|
|
aget v5, v5, v6
|
|
|
|
sub-int/2addr v7, v5
|
|
|
|
aput v7, p1, v6
|
|
|
|
add-int/2addr v4, p2
|
|
|
|
.line 163
|
|
invoke-virtual {v3}, Landroid/view/View;->getWidth()I
|
|
|
|
move-result p1
|
|
|
|
div-int/lit8 p1, p1, 0x2
|
|
|
|
sub-int/2addr v4, p1
|
|
|
|
iput v4, p5, Landroid/view/WindowManager$LayoutParams;->x:I
|
|
|
|
.line 165
|
|
invoke-static {v2, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
move-result p1
|
|
|
|
iget-object p2, p0, Landroidx/appcompat/widget/TooltipPopup;->mContentView:Landroid/view/View;
|
|
|
|
.line 166
|
|
invoke-virtual {p2, p1, p1}, Landroid/view/View;->measure(II)V
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/TooltipPopup;->mContentView:Landroid/view/View;
|
|
|
|
.line 167
|
|
invoke-virtual {p1}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result p1
|
|
|
|
iget-object p2, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpAnchorPos:[I
|
|
|
|
.line 169
|
|
aget p2, p2, v6
|
|
|
|
add-int/2addr p3, p2
|
|
|
|
sub-int/2addr p3, v0
|
|
|
|
sub-int/2addr p3, p1
|
|
|
|
add-int/2addr p2, v1
|
|
|
|
add-int/2addr p2, v0
|
|
|
|
if-eqz p4, :cond_7
|
|
|
|
if-ltz p3, :cond_6
|
|
|
|
.line 173
|
|
iput p3, p5, Landroid/view/WindowManager$LayoutParams;->y:I
|
|
|
|
goto :goto_4
|
|
|
|
.line 175
|
|
:cond_6
|
|
iput p2, p5, Landroid/view/WindowManager$LayoutParams;->y:I
|
|
|
|
goto :goto_4
|
|
|
|
:cond_7
|
|
add-int/2addr p1, p2
|
|
|
|
iget-object p4, p0, Landroidx/appcompat/widget/TooltipPopup;->mTmpDisplayFrame:Landroid/graphics/Rect;
|
|
|
|
.line 178
|
|
invoke-virtual {p4}, Landroid/graphics/Rect;->height()I
|
|
|
|
move-result p4
|
|
|
|
if-gt p1, p4, :cond_8
|
|
|
|
.line 179
|
|
iput p2, p5, Landroid/view/WindowManager$LayoutParams;->y:I
|
|
|
|
goto :goto_4
|
|
|
|
.line 181
|
|
:cond_8
|
|
iput p3, p5, Landroid/view/WindowManager$LayoutParams;->y:I
|
|
|
|
:goto_4
|
|
return-void
|
|
.end method
|
|
|
|
.method private static getAppRootView(Landroid/view/View;)Landroid/view/View;
|
|
.locals 3
|
|
|
|
.line 187
|
|
invoke-virtual {p0}, Landroid/view/View;->getRootView()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
.line 188
|
|
invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v1
|
|
|
|
.line 189
|
|
instance-of v2, v1, Landroid/view/WindowManager$LayoutParams;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
check-cast v1, Landroid/view/WindowManager$LayoutParams;
|
|
|
|
iget v1, v1, Landroid/view/WindowManager$LayoutParams;->type:I
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
return-object v0
|
|
|
|
.line 197
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
.line 198
|
|
:goto_0
|
|
instance-of v1, p0, Landroid/content/ContextWrapper;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 199
|
|
instance-of v1, p0, Landroid/app/Activity;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 200
|
|
check-cast p0, Landroid/app/Activity;
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/view/Window;->getDecorView()Landroid/view/View;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 202
|
|
:cond_1
|
|
check-cast p0, Landroid/content/ContextWrapper;
|
|
|
|
invoke-virtual {p0}, Landroid/content/ContextWrapper;->getBaseContext()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public hide()V
|
|
.locals 2
|
|
|
|
.line 90
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/TooltipPopup;->isShowing()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/appcompat/widget/TooltipPopup;->mContext:Landroid/content/Context;
|
|
|
|
const-string v1, "window"
|
|
|
|
.line 94
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/WindowManager;
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/widget/TooltipPopup;->mContentView:Landroid/view/View;
|
|
|
|
.line 95
|
|
invoke-interface {v0, v1}, Landroid/view/ViewManager;->removeView(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public isShowing()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/TooltipPopup;->mContentView:Landroid/view/View;
|
|
|
|
.line 99
|
|
invoke-virtual {v0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public show(Landroid/view/View;IIZLjava/lang/CharSequence;)V
|
|
.locals 7
|
|
|
|
.line 77
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/TooltipPopup;->isShowing()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 78
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/TooltipPopup;->hide()V
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/appcompat/widget/TooltipPopup;->mMessageView:Landroid/widget/TextView;
|
|
|
|
.line 81
|
|
invoke-virtual {v0, p5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v6, p0, Landroidx/appcompat/widget/TooltipPopup;->mLayoutParams:Landroid/view/WindowManager$LayoutParams;
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move v3, p2
|
|
|
|
move v4, p3
|
|
|
|
move v5, p4
|
|
|
|
.line 83
|
|
invoke-direct/range {v1 .. v6}, Landroidx/appcompat/widget/TooltipPopup;->computePosition(Landroid/view/View;IIZLandroid/view/WindowManager$LayoutParams;)V
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/TooltipPopup;->mContext:Landroid/content/Context;
|
|
|
|
const-string p2, "window"
|
|
|
|
.line 85
|
|
invoke-virtual {p1, p2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/view/WindowManager;
|
|
|
|
iget-object p2, p0, Landroidx/appcompat/widget/TooltipPopup;->mContentView:Landroid/view/View;
|
|
|
|
iget-object p3, p0, Landroidx/appcompat/widget/TooltipPopup;->mLayoutParams:Landroid/view/WindowManager$LayoutParams;
|
|
|
|
.line 86
|
|
invoke-interface {p1, p2, p3}, Landroid/view/ViewManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
return-void
|
|
.end method
|