Rabbit-R1/original r1/smali/smali_classes2/androidx/transition/ViewOverlayApi14$OverlayViewGroup.smali
2024-05-21 17:08:36 -04:00

700 lines
17 KiB
Smali

.class Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;
.super Landroid/view/ViewGroup;
.source "ViewOverlayApi14.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/transition/ViewOverlayApi14;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "OverlayViewGroup"
.end annotation
# static fields
.field static sInvalidateChildInParentFastMethod:Ljava/lang/reflect/Method;
# instance fields
.field private mDisposed:Z
.field mDrawables:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Landroid/graphics/drawable/Drawable;",
">;"
}
.end annotation
.end field
.field mHostView:Landroid/view/ViewGroup;
.field mRequestingView:Landroid/view/View;
.field mViewOverlay:Landroidx/transition/ViewOverlayApi14;
# direct methods
.method static constructor <clinit>()V
.locals 5
.line 116
:try_start_0
const-class v0, Landroid/view/ViewGroup;
const-string v1, "invalidateChildInParentFast"
const/4 v2, 0x3
new-array v2, v2, [Ljava/lang/Class;
sget-object v3, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
const/4 v4, 0x0
aput-object v3, v2, v4
sget-object v3, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
const/4 v4, 0x1
aput-object v3, v2, v4
const-class v3, Landroid/graphics/Rect;
const/4 v4, 0x2
aput-object v3, v2, v4
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
sput-object v0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->sInvalidateChildInParentFastMethod:Ljava/lang/reflect/Method;
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
.method constructor <init>(Landroid/content/Context;Landroid/view/ViewGroup;Landroid/view/View;Landroidx/transition/ViewOverlayApi14;)V
.locals 0
.line 142
invoke-direct {p0, p1}, Landroid/view/ViewGroup;-><init>(Landroid/content/Context;)V
const/4 p1, 0x0
iput-object p1, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
iput-object p2, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
iput-object p3, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mRequestingView:Landroid/view/View;
.line 145
invoke-virtual {p2}, Landroid/view/ViewGroup;->getWidth()I
move-result p1
invoke-virtual {p0, p1}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->setRight(I)V
.line 146
invoke-virtual {p2}, Landroid/view/ViewGroup;->getHeight()I
move-result p1
invoke-virtual {p0, p1}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->setBottom(I)V
.line 147
invoke-virtual {p2, p0}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
iput-object p4, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mViewOverlay:Landroidx/transition/ViewOverlayApi14;
return-void
.end method
.method private assertNotDisposed()V
.locals 1
iget-boolean p0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDisposed:Z
if-nez p0, :cond_0
return-void
.line 222
:cond_0
new-instance p0, Ljava/lang/IllegalStateException;
const-string v0, "This overlay was disposed already. Please use a new one via ViewGroupUtils.getOverlay()"
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private disposeIfEmpty()V
.locals 1
.line 228
invoke-virtual {p0}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->getChildCount()I
move-result v0
if-nez v0, :cond_1
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
if-nez v0, :cond_1
:cond_0
const/4 v0, 0x1
iput-boolean v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDisposed:Z
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
.line 230
invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
:cond_1
return-void
.end method
.method private getOffset([I)V
.locals 4
const/4 v0, 0x2
new-array v1, v0, [I
new-array v0, v0, [I
iget-object v2, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
.line 274
invoke-virtual {v2, v1}, Landroid/view/ViewGroup;->getLocationOnScreen([I)V
iget-object p0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mRequestingView:Landroid/view/View;
.line 275
invoke-virtual {p0, v0}, Landroid/view/View;->getLocationOnScreen([I)V
const/4 p0, 0x0
aget v2, v0, p0
aget v3, v1, p0
sub-int/2addr v2, v3
.line 276
aput v2, p1, p0
const/4 p0, 0x1
aget v0, v0, p0
aget v1, v1, p0
sub-int/2addr v0, v1
.line 277
aput v0, p1, p0
return-void
.end method
# virtual methods
.method public add(Landroid/graphics/drawable/Drawable;)V
.locals 1
.line 159
invoke-direct {p0}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->assertNotDisposed()V
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
if-nez v0, :cond_0
.line 162
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
:cond_0
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
.line 164
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
.line 166
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 167
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
move-result-object v0
invoke-virtual {p0, v0}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->invalidate(Landroid/graphics/Rect;)V
.line 168
invoke-virtual {p1, p0}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
:cond_1
return-void
.end method
.method public add(Landroid/view/View;)V
.locals 5
.line 188
invoke-direct {p0}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->assertNotDisposed()V
.line 189
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v0
instance-of v0, v0, Landroid/view/ViewGroup;
if-eqz v0, :cond_1
.line 190
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v0
check-cast v0, Landroid/view/ViewGroup;
iget-object v1, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
if-eq v0, v1, :cond_0
.line 191
invoke-virtual {v0}, Landroid/view/ViewGroup;->getParent()Landroid/view/ViewParent;
move-result-object v1
if-eqz v1, :cond_0
.line 192
invoke-static {v0}, Landroidx/core/view/ViewCompat;->isAttachedToWindow(Landroid/view/View;)Z
move-result v1
if-eqz v1, :cond_0
const/4 v1, 0x2
new-array v2, v1, [I
new-array v1, v1, [I
.line 197
invoke-virtual {v0, v2}, Landroid/view/ViewGroup;->getLocationOnScreen([I)V
iget-object v3, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
.line 198
invoke-virtual {v3, v1}, Landroid/view/ViewGroup;->getLocationOnScreen([I)V
const/4 v3, 0x0
aget v4, v2, v3
aget v3, v1, v3
sub-int/2addr v4, v3
.line 199
invoke-static {p1, v4}, Landroidx/core/view/ViewCompat;->offsetLeftAndRight(Landroid/view/View;I)V
const/4 v3, 0x1
aget v2, v2, v3
aget v1, v1, v3
sub-int/2addr v2, v1
.line 200
invoke-static {p1, v2}, Landroidx/core/view/ViewCompat;->offsetTopAndBottom(Landroid/view/View;I)V
.line 202
:cond_0
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
.line 208
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
move-result-object v1
if-eqz v1, :cond_1
.line 209
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
.line 212
:cond_1
invoke-super {p0, p1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
return-void
.end method
.method protected dispatchDraw(Landroid/graphics/Canvas;)V
.locals 5
const/4 v0, 0x2
new-array v1, v0, [I
new-array v0, v0, [I
iget-object v2, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
.line 244
invoke-virtual {v2, v1}, Landroid/view/ViewGroup;->getLocationOnScreen([I)V
iget-object v2, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mRequestingView:Landroid/view/View;
.line 245
invoke-virtual {v2, v0}, Landroid/view/View;->getLocationOnScreen([I)V
const/4 v2, 0x0
aget v3, v0, v2
aget v4, v1, v2
sub-int/2addr v3, v4
int-to-float v3, v3
const/4 v4, 0x1
aget v0, v0, v4
aget v1, v1, v4
sub-int/2addr v0, v1
int-to-float v0, v0
.line 246
invoke-virtual {p1, v3, v0}, Landroid/graphics/Canvas;->translate(FF)V
.line 248
new-instance v0, Landroid/graphics/Rect;
iget-object v1, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mRequestingView:Landroid/view/View;
.line 249
invoke-virtual {v1}, Landroid/view/View;->getWidth()I
move-result v1
iget-object v3, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mRequestingView:Landroid/view/View;
invoke-virtual {v3}, Landroid/view/View;->getHeight()I
move-result v3
invoke-direct {v0, v2, v2, v1, v3}, Landroid/graphics/Rect;-><init>(IIII)V
.line 248
invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->clipRect(Landroid/graphics/Rect;)Z
.line 250
invoke-super {p0, p1}, Landroid/view/ViewGroup;->dispatchDraw(Landroid/graphics/Canvas;)V
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
if-nez v0, :cond_0
move v0, v2
goto :goto_0
.line 251
:cond_0
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
:goto_0
if-ge v2, v0, :cond_1
iget-object v1, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
.line 253
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/graphics/drawable/Drawable;
invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
.locals 0
const/4 p0, 0x0
return p0
.end method
.method public invalidateChildInParent([ILandroid/graphics/Rect;)Landroid/view/ViewParent;
.locals 4
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
if-eqz v0, :cond_1
const/4 v0, 0x0
.line 303
aget v1, p1, v0
const/4 v2, 0x1
aget v3, p1, v2
invoke-virtual {p2, v1, v3}, Landroid/graphics/Rect;->offset(II)V
iget-object v1, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
if-eqz v1, :cond_0
.line 305
aput v0, p1, v0
.line 306
aput v0, p1, v2
const/4 v1, 0x2
new-array v1, v1, [I
.line 308
invoke-direct {p0, v1}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->getOffset([I)V
aget v0, v1, v0
aget v1, v1, v2
.line 309
invoke-virtual {p2, v0, v1}, Landroid/graphics/Rect;->offset(II)V
.line 310
invoke-super {p0, p1, p2}, Landroid/view/ViewGroup;->invalidateChildInParent([ILandroid/graphics/Rect;)Landroid/view/ViewParent;
move-result-object p0
return-object p0
.line 313
:cond_0
invoke-virtual {p0, p2}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->invalidate(Landroid/graphics/Rect;)V
:cond_1
const/4 p0, 0x0
return-object p0
.end method
.method protected invalidateChildInParentFast(IILandroid/graphics/Rect;)Landroid/view/ViewParent;
.locals 4
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
if-eqz v0, :cond_0
sget-object v0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->sInvalidateChildInParentFastMethod:Ljava/lang/reflect/Method;
if-eqz v0, :cond_0
const/4 v0, 0x2
:try_start_0
new-array v1, v0, [I
.line 288
invoke-direct {p0, v1}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->getOffset([I)V
sget-object v1, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->sInvalidateChildInParentFastMethod:Ljava/lang/reflect/Method;
iget-object p0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mHostView:Landroid/view/ViewGroup;
const/4 v2, 0x3
new-array v2, v2, [Ljava/lang/Object;
.line 289
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
const/4 v3, 0x0
aput-object p1, v2, v3
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
const/4 p2, 0x1
aput-object p1, v2, p2
aput-object p3, v2, v0
invoke-virtual {v1, p0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p0
.line 293
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->printStackTrace()V
goto :goto_0
:catch_1
move-exception p0
.line 291
invoke-virtual {p0}, Ljava/lang/IllegalAccessException;->printStackTrace()V
:cond_0
:goto_0
const/4 p0, 0x0
return-object p0
.end method
.method public invalidateDrawable(Landroid/graphics/drawable/Drawable;)V
.locals 0
.line 237
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
move-result-object p1
invoke-virtual {p0, p1}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->invalidate(Landroid/graphics/Rect;)V
return-void
.end method
.method protected onLayout(ZIIII)V
.locals 0
return-void
.end method
.method public remove(Landroid/graphics/drawable/Drawable;)V
.locals 1
iget-object v0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
if-eqz v0, :cond_0
.line 175
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
.line 176
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
move-result-object v0
invoke-virtual {p0, v0}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->invalidate(Landroid/graphics/Rect;)V
const/4 v0, 0x0
.line 177
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
.line 178
invoke-direct {p0}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->disposeIfEmpty()V
:cond_0
return-void
.end method
.method public remove(Landroid/view/View;)V
.locals 0
.line 216
invoke-super {p0, p1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
.line 217
invoke-direct {p0}, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->disposeIfEmpty()V
return-void
.end method
.method protected verifyDrawable(Landroid/graphics/drawable/Drawable;)Z
.locals 1
.line 184
invoke-super {p0, p1}, Landroid/view/ViewGroup;->verifyDrawable(Landroid/graphics/drawable/Drawable;)Z
move-result v0
if-nez v0, :cond_1
iget-object p0, p0, Landroidx/transition/ViewOverlayApi14$OverlayViewGroup;->mDrawables:Ljava/util/ArrayList;
if-eqz p0, :cond_0
invoke-virtual {p0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_0
goto :goto_0
:cond_0
const/4 p0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p0, 0x1
:goto_1
return p0
.end method