granularity level: instruction

		.class public abstract Landroidx/core/app/SharedElementCallback;
.super Ljava/lang/Object;
.source "SharedElementCallback.java"

.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/core/app/SharedElementCallback$OnSharedElementsReadyListener;
}
.end annotation

.field private static final BUNDLE_SNAPSHOT_BITMAP:Ljava/lang/String; = "sharedElement:snapshot:bitmap"
.field private static final BUNDLE_SNAPSHOT_IMAGE_MATRIX:Ljava/lang/String; = "sharedElement:snapshot:imageMatrix"
.field private static final BUNDLE_SNAPSHOT_IMAGE_SCALETYPE:Ljava/lang/String; = "sharedElement:snapshot:imageScaleType"
.field private static final MAX_IMAGE_SIZE:I = 0x100000
.field private mTempMatrix:Landroid/graphics/Matrix;


.method public constructor <init>()V
	.locals 0

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	return-void
.end method

.method private static createDrawableBitmap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/Bitmap;
	.locals 9

	invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
	move-result v0
	invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
	move-result v1
	if-lez v0, :cond_2
	if-gtz v1, :cond_0
	goto :goto_0
	:cond_0
	const/high16 v2, 0x49800000    # 1048576.0f
	mul-int v3, v0, v1
	int-to-float v3, v3
	div-float/2addr v2, v3
	const/high16 v3, 0x3f800000    # 1.0f
	invoke-static {v3, v2}, Ljava/lang/Math;->min(FF)F
	move-result v2
	instance-of v4, p0, Landroid/graphics/drawable/BitmapDrawable;
	if-eqz v4, :cond_1
	cmpl-float v3, v2, v3
	if-nez v3, :cond_1
	check-cast p0, Landroid/graphics/drawable/BitmapDrawable;
	invoke-virtual {p0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
	move-result-object p0
	return-object p0
	:cond_1
	int-to-float v0, v0
	mul-float v0, v0, v2
	float-to-int v0, v0
	int-to-float v1, v1
	mul-float v1, v1, v2
	float-to-int v1, v1
	sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
	invoke-static {v0, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
	move-result-object v2
	new-instance v3, Landroid/graphics/Canvas;
	invoke-direct {v3, v2}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
	invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
	move-result-object v4
	iget v5, v4, Landroid/graphics/Rect;->left:I
	iget v6, v4, Landroid/graphics/Rect;->top:I
	iget v7, v4, Landroid/graphics/Rect;->right:I
	iget v4, v4, Landroid/graphics/Rect;->bottom:I
	const/4 v8, 0x0
	invoke-virtual {p0, v8, v8, v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
	invoke-virtual {p0, v3}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
	invoke-virtual {p0, v5, v6, v7, v4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
	return-object v2
	:cond_2
	:goto_0
	const/4 p0, 0x0
	return-object p0
.end method

.method public onCaptureSharedElementSnapshot(Landroid/view/View;Landroid/graphics/Matrix;Landroid/graphics/RectF;)Landroid/os/Parcelable;
	.locals 5

	instance-of v0, p1, Landroid/widget/ImageView;
	if-eqz v0, :cond_1
	move-object v0, p1
	check-cast v0, Landroid/widget/ImageView;
	invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
	move-result-object v1
	invoke-virtual {v0}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;
	move-result-object v2
	if-eqz v1, :cond_1
	if-nez v2, :cond_1
	invoke-static {v1}, Landroidx/core/app/SharedElementCallback;->createDrawableBitmap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/Bitmap;
	move-result-object v1
	if-eqz v1, :cond_1
	new-instance p1, Landroid/os/Bundle;
	invoke-direct {p1}, Landroid/os/Bundle;-><init>()V
	const-string p2, "sharedElement:snapshot:bitmap"
	invoke-virtual {p1, p2, v1}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
	invoke-virtual {v0}, Landroid/widget/ImageView;->getScaleType()Landroid/widget/ImageView$ScaleType;
	move-result-object p2
	invoke-virtual {p2}, Landroid/widget/ImageView$ScaleType;->toString()Ljava/lang/String;
	move-result-object p2
	const-string p3, "sharedElement:snapshot:imageScaleType"
	invoke-virtual {p1, p3, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
	invoke-virtual {v0}, Landroid/widget/ImageView;->getScaleType()Landroid/widget/ImageView$ScaleType;
	move-result-object p2
	sget-object p3, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;
	if-ne p2, p3, :cond_0
	invoke-virtual {v0}, Landroid/widget/ImageView;->getImageMatrix()Landroid/graphics/Matrix;
	move-result-object p2
	const/16 p3, 0x9
	new-array p3, p3, [F
	invoke-virtual {p2, p3}, Landroid/graphics/Matrix;->getValues([F)V
	const-string p2, "sharedElement:snapshot:imageMatrix"
	invoke-virtual {p1, p2, p3}, Landroid/os/Bundle;->putFloatArray(Ljava/lang/String;[F)V
	:cond_0
	return-object p1
	:cond_1
	invoke-virtual {p3}, Landroid/graphics/RectF;->width()F
	move-result v0
	invoke-static {v0}, Ljava/lang/Math;->round(F)I
	move-result v0
	invoke-virtual {p3}, Landroid/graphics/RectF;->height()F
	move-result v1
	invoke-static {v1}, Ljava/lang/Math;->round(F)I
	move-result v1
	const/4 v2, 0x0
	if-lez v0, :cond_3
	if-lez v1, :cond_3
	const/high16 v2, 0x3f800000    # 1.0f
	const/high16 v3, 0x49800000    # 1048576.0f
	mul-int v4, v0, v1
	int-to-float v4, v4
	div-float/2addr v3, v4
	invoke-static {v2, v3}, Ljava/lang/Math;->min(FF)F
	move-result v2
	int-to-float v0, v0
	mul-float v0, v0, v2
	float-to-int v0, v0
	int-to-float v1, v1
	mul-float v1, v1, v2
	float-to-int v1, v1
	iget-object v3, p0, Landroidx/core/app/SharedElementCallback;->mTempMatrix:Landroid/graphics/Matrix;
	if-nez v3, :cond_2
	new-instance v3, Landroid/graphics/Matrix;
	invoke-direct {v3}, Landroid/graphics/Matrix;-><init>()V
	iput-object v3, p0, Landroidx/core/app/SharedElementCallback;->mTempMatrix:Landroid/graphics/Matrix;
	:cond_2
	iget-object v3, p0, Landroidx/core/app/SharedElementCallback;->mTempMatrix:Landroid/graphics/Matrix;
	invoke-virtual {v3, p2}, Landroid/graphics/Matrix;->set(Landroid/graphics/Matrix;)V
	iget-object p2, p0, Landroidx/core/app/SharedElementCallback;->mTempMatrix:Landroid/graphics/Matrix;
	iget v3, p3, Landroid/graphics/RectF;->left:F
	neg-float v3, v3
	iget p3, p3, Landroid/graphics/RectF;->top:F
	neg-float p3, p3
	invoke-virtual {p2, v3, p3}, Landroid/graphics/Matrix;->postTranslate(FF)Z
	iget-object p2, p0, Landroidx/core/app/SharedElementCallback;->mTempMatrix:Landroid/graphics/Matrix;
	invoke-virtual {p2, v2, v2}, Landroid/graphics/Matrix;->postScale(FF)Z
	sget-object p2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
	invoke-static {v0, v1, p2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
	move-result-object v2
	new-instance p2, Landroid/graphics/Canvas;
	invoke-direct {p2, v2}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
	iget-object p3, p0, Landroidx/core/app/SharedElementCallback;->mTempMatrix:Landroid/graphics/Matrix;
	invoke-virtual {p2, p3}, Landroid/graphics/Canvas;->concat(Landroid/graphics/Matrix;)V
	invoke-virtual {p1, p2}, Landroid/view/View;->draw(Landroid/graphics/Canvas;)V
	:cond_3
	return-object v2
.end method

.method public onCreateSnapshotView(Landroid/content/Context;Landroid/os/Parcelable;)Landroid/view/View;
	.locals 2

	instance-of v0, p2, Landroid/os/Bundle;
	const/4 v1, 0x0
	if-eqz v0, :cond_1
	check-cast p2, Landroid/os/Bundle;
	const-string v0, "sharedElement:snapshot:bitmap"
	invoke-virtual {p2, v0}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
	move-result-object v0
	check-cast v0, Landroid/graphics/Bitmap;
	if-nez v0, :cond_0
	return-object v1
	:cond_0
	new-instance v1, Landroid/widget/ImageView;
	invoke-direct {v1, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
	invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
	const-string p1, "sharedElement:snapshot:imageScaleType"
	invoke-virtual {p2, p1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	move-result-object p1
	invoke-static {p1}, Landroid/widget/ImageView$ScaleType;->valueOf(Ljava/lang/String;)Landroid/widget/ImageView$ScaleType;
	move-result-object p1
	invoke-virtual {v1, p1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
	invoke-virtual {v1}, Landroid/widget/ImageView;->getScaleType()Landroid/widget/ImageView$ScaleType;
	move-result-object p1
	sget-object v0, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;
	if-ne p1, v0, :cond_2
	const-string p1, "sharedElement:snapshot:imageMatrix"
	invoke-virtual {p2, p1}, Landroid/os/Bundle;->getFloatArray(Ljava/lang/String;)[F
	move-result-object p1
	new-instance p2, Landroid/graphics/Matrix;
	invoke-direct {p2}, Landroid/graphics/Matrix;-><init>()V
	invoke-virtual {p2, p1}, Landroid/graphics/Matrix;->setValues([F)V
	invoke-virtual {v1, p2}, Landroid/widget/ImageView;->setImageMatrix(Landroid/graphics/Matrix;)V
	goto :goto_0
	:cond_1
	instance-of v0, p2, Landroid/graphics/Bitmap;
	if-eqz v0, :cond_2
	check-cast p2, Landroid/graphics/Bitmap;
	new-instance v1, Landroid/widget/ImageView;
	invoke-direct {v1, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
	invoke-virtual {v1, p2}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
	:cond_2
	:goto_0
	return-object v1
.end method

.method public onMapSharedElements(Ljava/util/List;Ljava/util/Map;)V
	.locals 0
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(",
	"Ljava/util/List<",
	"Ljava/lang/String;",
	">;",
	"Ljava/util/Map<",
	"Ljava/lang/String;",
	"Landroid/view/View;",
	">;)V"
	}
	.end annotation

	return-void
.end method

.method public onRejectSharedElements(Ljava/util/List;)V
	.locals 0
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(",
	"Ljava/util/List<",
	"Landroid/view/View;",
	">;)V"
	}
	.end annotation

	return-void
.end method

.method public onSharedElementEnd(Ljava/util/List;Ljava/util/List;Ljava/util/List;)V
	.locals 0
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(",
	"Ljava/util/List<",
	"Ljava/lang/String;",
	">;",
	"Ljava/util/List<",
	"Landroid/view/View;",
	">;",
	"Ljava/util/List<",
	"Landroid/view/View;",
	">;)V"
	}
	.end annotation

	return-void
.end method

.method public onSharedElementStart(Ljava/util/List;Ljava/util/List;Ljava/util/List;)V
	.locals 0
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(",
	"Ljava/util/List<",
	"Ljava/lang/String;",
	">;",
	"Ljava/util/List<",
	"Landroid/view/View;",
	">;",
	"Ljava/util/List<",
	"Landroid/view/View;",
	">;)V"
	}
	.end annotation

	return-void
.end method

.method public onSharedElementsArrived(Ljava/util/List;Ljava/util/List;Landroidx/core/app/SharedElementCallback$OnSharedElementsReadyListener;)V
	.locals 0
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(",
	"Ljava/util/List<",
	"Ljava/lang/String;",
	">;",
	"Ljava/util/List<",
	"Landroid/view/View;",
	">;",
	"Landroidx/core/app/SharedElementCallback$OnSharedElementsReadyListener;",
	")V"
	}
	.end annotation

	invoke-interface {p3}, Landroidx/core/app/SharedElementCallback$OnSharedElementsReadyListener;->onSharedElementsReady()V
	return-void
.end method