apkfuckery/com.discord/smali/androidx/transition/TransitionInflater.smali
2019-07-24 13:27:29 +02:00

1246 lines
34 KiB
Smali

.class public Landroidx/transition/TransitionInflater;
.super Ljava/lang/Object;
.source "TransitionInflater.java"
# static fields
.field private static final CONSTRUCTORS:Landroidx/collection/ArrayMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/collection/ArrayMap<",
"Ljava/lang/String;",
"Ljava/lang/reflect/Constructor;",
">;"
}
.end annotation
.end field
.field private static final CONSTRUCTOR_SIGNATURE:[Ljava/lang/Class;
.annotation system Ldalvik/annotation/Signature;
value = {
"[",
"Ljava/lang/Class<",
"*>;"
}
.end annotation
.end field
# instance fields
.field private final mContext:Landroid/content/Context;
# direct methods
.method static constructor <clinit>()V
.locals 3
const/4 v0, 0x2
new-array v0, v0, [Ljava/lang/Class;
const-class v1, Landroid/content/Context;
const/4 v2, 0x0
aput-object v1, v0, v2
const-class v1, Landroid/util/AttributeSet;
const/4 v2, 0x1
aput-object v1, v0, v2
sput-object v0, Landroidx/transition/TransitionInflater;->CONSTRUCTOR_SIGNATURE:[Ljava/lang/Class;
new-instance v0, Landroidx/collection/ArrayMap;
invoke-direct {v0}, Landroidx/collection/ArrayMap;-><init>()V
sput-object v0, Landroidx/transition/TransitionInflater;->CONSTRUCTORS:Landroidx/collection/ArrayMap;
return-void
.end method
.method private constructor <init>(Landroid/content/Context;)V
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
return-void
.end method
.method private createCustom(Landroid/util/AttributeSet;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
.locals 6
const/4 v0, 0x0
const-string v1, "class"
invoke-interface {p1, v0, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_1
:try_start_0
sget-object p3, Landroidx/transition/TransitionInflater;->CONSTRUCTORS:Landroidx/collection/ArrayMap;
monitor-enter p3
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
:try_start_1
sget-object v1, Landroidx/transition/TransitionInflater;->CONSTRUCTORS:Landroidx/collection/ArrayMap;
invoke-virtual {v1, v0}, Landroidx/collection/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/reflect/Constructor;
const/4 v2, 0x1
if-nez v1, :cond_0
iget-object v3, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object v3
invoke-virtual {v3, v0}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v3
invoke-virtual {v3, p2}, Ljava/lang/Class;->asSubclass(Ljava/lang/Class;)Ljava/lang/Class;
move-result-object v3
if-eqz v3, :cond_0
sget-object v1, Landroidx/transition/TransitionInflater;->CONSTRUCTOR_SIGNATURE:[Ljava/lang/Class;
invoke-virtual {v3, v1}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
move-result-object v1
invoke-virtual {v1, v2}, Ljava/lang/reflect/Constructor;->setAccessible(Z)V
sget-object v3, Landroidx/transition/TransitionInflater;->CONSTRUCTORS:Landroidx/collection/ArrayMap;
invoke-virtual {v3, v0, v1}, Landroidx/collection/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_0
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
iget-object v5, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
aput-object v5, v3, v4
aput-object p1, v3, v2
invoke-virtual {v1, v3}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
monitor-exit p3
return-object p1
:catchall_0
move-exception p1
monitor-exit p3
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
throw p1
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
:catch_0
move-exception p1
new-instance p3, Landroid/view/InflateException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Could not instantiate "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p2, " class "
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p3, p2, p1}, Landroid/view/InflateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p3
:cond_1
new-instance p1, Landroid/view/InflateException;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p3, " tag must have a \'class\' attribute"
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Landroid/view/InflateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method private createTransitionFromXml(Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroidx/transition/Transition;)Landroidx/transition/Transition;
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/xmlpull/v1/XmlPullParserException;,
Ljava/io/IOException;
}
.end annotation
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
move-result v0
instance-of v1, p3, Landroidx/transition/TransitionSet;
const/4 v2, 0x0
if-eqz v1, :cond_0
move-object v1, p3
check-cast v1, Landroidx/transition/TransitionSet;
goto :goto_0
:cond_0
move-object v1, v2
:goto_0
move-object v3, v2
:cond_1
:goto_1
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->next()I
move-result v4
const/4 v5, 0x3
if-ne v4, v5, :cond_2
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
move-result v5
if-le v5, v0, :cond_18
:cond_2
const/4 v5, 0x1
if-eq v4, v5, :cond_18
const/4 v5, 0x2
if-ne v4, v5, :cond_1
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
move-result-object v4
const-string v5, "fade"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_3
new-instance v3, Landroidx/transition/Fade;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/Fade;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_3
const-string v5, "changeBounds"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_4
new-instance v3, Landroidx/transition/ChangeBounds;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/ChangeBounds;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_4
const-string v5, "slide"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_5
new-instance v3, Landroidx/transition/Slide;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/Slide;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_5
const-string v5, "explode"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_6
new-instance v3, Landroidx/transition/Explode;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/Explode;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_6
const-string v5, "changeImageTransform"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_7
new-instance v3, Landroidx/transition/ChangeImageTransform;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/ChangeImageTransform;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_7
const-string v5, "changeTransform"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_8
new-instance v3, Landroidx/transition/ChangeTransform;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/ChangeTransform;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_8
const-string v5, "changeClipBounds"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_9
new-instance v3, Landroidx/transition/ChangeClipBounds;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/ChangeClipBounds;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_9
const-string v5, "autoTransition"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_a
new-instance v3, Landroidx/transition/AutoTransition;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/AutoTransition;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_a
const-string v5, "changeScroll"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_b
new-instance v3, Landroidx/transition/ChangeScroll;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/ChangeScroll;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto/16 :goto_2
:cond_b
const-string v5, "transitionSet"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_c
new-instance v3, Landroidx/transition/TransitionSet;
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v3, v4, p2}, Landroidx/transition/TransitionSet;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
goto :goto_2
:cond_c
const-string v5, "transition"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_d
const-class v3, Landroidx/transition/Transition;
invoke-direct {p0, p2, v3, v5}, Landroidx/transition/TransitionInflater;->createCustom(Landroid/util/AttributeSet;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroidx/transition/Transition;
goto :goto_2
:cond_d
const-string v5, "targets"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_e
invoke-direct {p0, p1, p2, p3}, Landroidx/transition/TransitionInflater;->getTargetIds(Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroidx/transition/Transition;)V
goto :goto_2
:cond_e
const-string v5, "arcMotion"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_10
if-eqz p3, :cond_f
new-instance v4, Landroidx/transition/ArcMotion;
iget-object v5, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v4, v5, p2}, Landroidx/transition/ArcMotion;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
invoke-virtual {p3, v4}, Landroidx/transition/Transition;->setPathMotion(Landroidx/transition/PathMotion;)V
goto :goto_2
:cond_f
new-instance p1, Ljava/lang/RuntimeException;
const-string p2, "Invalid use of arcMotion element"
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
:cond_10
const-string v5, "pathMotion"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_12
if-eqz p3, :cond_11
const-class v4, Landroidx/transition/PathMotion;
invoke-direct {p0, p2, v4, v5}, Landroidx/transition/TransitionInflater;->createCustom(Landroid/util/AttributeSet;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Landroidx/transition/PathMotion;
invoke-virtual {p3, v4}, Landroidx/transition/Transition;->setPathMotion(Landroidx/transition/PathMotion;)V
goto :goto_2
:cond_11
new-instance p1, Ljava/lang/RuntimeException;
const-string p2, "Invalid use of pathMotion element"
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
:cond_12
const-string v5, "patternPathMotion"
invoke-virtual {v5, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_17
if-eqz p3, :cond_16
new-instance v4, Landroidx/transition/PatternPathMotion;
iget-object v5, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-direct {v4, v5, p2}, Landroidx/transition/PatternPathMotion;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
invoke-virtual {p3, v4}, Landroidx/transition/Transition;->setPathMotion(Landroidx/transition/PathMotion;)V
:goto_2
if-eqz v3, :cond_1
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->isEmptyElementTag()Z
move-result v4
if-nez v4, :cond_13
invoke-direct {p0, p1, p2, v3}, Landroidx/transition/TransitionInflater;->createTransitionFromXml(Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroidx/transition/Transition;)Landroidx/transition/Transition;
:cond_13
if-eqz v1, :cond_14
invoke-virtual {v1, v3}, Landroidx/transition/TransitionSet;->addTransition(Landroidx/transition/Transition;)Landroidx/transition/TransitionSet;
goto/16 :goto_0
:cond_14
if-nez p3, :cond_15
goto/16 :goto_1
:cond_15
new-instance p1, Landroid/view/InflateException;
const-string p2, "Could not add transition to another transition."
invoke-direct {p1, p2}, Landroid/view/InflateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_16
new-instance p1, Ljava/lang/RuntimeException;
const-string p2, "Invalid use of patternPathMotion element"
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
:cond_17
new-instance p2, Ljava/lang/RuntimeException;
new-instance p3, Ljava/lang/StringBuilder;
const-string v0, "Unknown scene name: "
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p2
:cond_18
return-object v3
.end method
.method private createTransitionManagerFromXml(Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/view/ViewGroup;)Landroidx/transition/TransitionManager;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/xmlpull/v1/XmlPullParserException;,
Ljava/io/IOException;
}
.end annotation
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
move-result v0
const/4 v1, 0x0
:cond_0
:goto_0
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->next()I
move-result v2
const/4 v3, 0x3
if-ne v2, v3, :cond_1
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
move-result v3
if-le v3, v0, :cond_4
:cond_1
const/4 v3, 0x1
if-eq v2, v3, :cond_4
const/4 v3, 0x2
if-ne v2, v3, :cond_0
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
move-result-object v2
const-string v3, "transitionManager"
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_2
new-instance v1, Landroidx/transition/TransitionManager;
invoke-direct {v1}, Landroidx/transition/TransitionManager;-><init>()V
goto :goto_0
:cond_2
const-string v3, "transition"
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
if-eqz v1, :cond_3
invoke-direct {p0, p2, p1, p3, v1}, Landroidx/transition/TransitionInflater;->loadTransition(Landroid/util/AttributeSet;Lorg/xmlpull/v1/XmlPullParser;Landroid/view/ViewGroup;Landroidx/transition/TransitionManager;)V
goto :goto_0
:cond_3
new-instance p2, Ljava/lang/RuntimeException;
new-instance p3, Ljava/lang/StringBuilder;
const-string v0, "Unknown scene name: "
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p2
:cond_4
return-object v1
.end method
.method public static from(Landroid/content/Context;)Landroidx/transition/TransitionInflater;
.locals 1
new-instance v0, Landroidx/transition/TransitionInflater;
invoke-direct {v0, p0}, Landroidx/transition/TransitionInflater;-><init>(Landroid/content/Context;)V
return-object v0
.end method
.method private getTargetIds(Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroidx/transition/Transition;)V
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/xmlpull/v1/XmlPullParserException;,
Ljava/io/IOException;
}
.end annotation
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
move-result v0
:cond_0
:goto_0
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->next()I
move-result v1
const/4 v2, 0x3
if-ne v1, v2, :cond_1
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
move-result v3
if-le v3, v0, :cond_9
:cond_1
const/4 v3, 0x1
if-eq v1, v3, :cond_9
const/4 v4, 0x2
if-ne v1, v4, :cond_0
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
move-result-object v1
const-string v5, "target"
invoke-virtual {v1, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_8
iget-object v1, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
sget-object v5, Landroidx/transition/Styleable;->TRANSITION_TARGET:[I
invoke-virtual {v1, p2, v5}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
move-result-object v1
const/4 v5, 0x0
const-string v6, "targetId"
invoke-static {v1, p1, v6, v3, v5}, Landroidx/core/content/res/TypedArrayUtils;->getNamedResourceId(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
move-result v6
if-eqz v6, :cond_2
invoke-virtual {p3, v6}, Landroidx/transition/Transition;->addTarget(I)Landroidx/transition/Transition;
goto :goto_1
:cond_2
const-string v6, "excludeId"
invoke-static {v1, p1, v6, v4, v5}, Landroidx/core/content/res/TypedArrayUtils;->getNamedResourceId(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
move-result v4
if-eqz v4, :cond_3
invoke-virtual {p3, v4, v3}, Landroidx/transition/Transition;->excludeTarget(IZ)Landroidx/transition/Transition;
goto :goto_1
:cond_3
const/4 v4, 0x4
const-string v6, "targetName"
invoke-static {v1, p1, v6, v4}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
move-result-object v4
if-eqz v4, :cond_4
invoke-virtual {p3, v4}, Landroidx/transition/Transition;->addTarget(Ljava/lang/String;)Landroidx/transition/Transition;
goto :goto_1
:cond_4
const/4 v4, 0x5
const-string v6, "excludeName"
invoke-static {v1, p1, v6, v4}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
move-result-object v4
if-eqz v4, :cond_5
invoke-virtual {p3, v4, v3}, Landroidx/transition/Transition;->excludeTarget(Ljava/lang/String;Z)Landroidx/transition/Transition;
goto :goto_1
:cond_5
const-string v4, "excludeClass"
invoke-static {v1, p1, v4, v2}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_6
:try_start_0
invoke-static {v2}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v4
invoke-virtual {p3, v4, v3}, Landroidx/transition/Transition;->excludeTarget(Ljava/lang/Class;Z)Landroidx/transition/Transition;
goto :goto_1
:cond_6
const-string v3, "targetClass"
invoke-static {v1, p1, v3, v5}, Landroidx/core/content/res/TypedArrayUtils;->getNamedString(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_7
invoke-static {v2}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v3
invoke-virtual {p3, v3}, Landroidx/transition/Transition;->addTarget(Ljava/lang/Class;)Landroidx/transition/Transition;
:try_end_0
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
:cond_7
:goto_1
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
goto :goto_0
:catch_0
move-exception p1
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
new-instance p2, Ljava/lang/RuntimeException;
invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p3
const-string v0, "Could not create "
invoke-virtual {v0, p3}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p3
invoke-direct {p2, p3, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p2
:cond_8
new-instance p2, Ljava/lang/RuntimeException;
new-instance p3, Ljava/lang/StringBuilder;
const-string v0, "Unknown scene name: "
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-interface {p1}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p2
:cond_9
return-void
.end method
.method private loadTransition(Landroid/util/AttributeSet;Lorg/xmlpull/v1/XmlPullParser;Landroid/view/ViewGroup;Landroidx/transition/TransitionManager;)V
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/content/res/Resources$NotFoundException;
}
.end annotation
iget-object v0, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
sget-object v1, Landroidx/transition/Styleable;->TRANSITION_MANAGER:[I
invoke-virtual {v0, p1, v1}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
move-result-object p1
const/4 v0, -0x1
const-string v1, "transition"
const/4 v2, 0x2
invoke-static {p1, p2, v1, v2, v0}, Landroidx/core/content/res/TypedArrayUtils;->getNamedResourceId(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
move-result v1
const-string v2, "fromScene"
const/4 v3, 0x0
invoke-static {p1, p2, v2, v3, v0}, Landroidx/core/content/res/TypedArrayUtils;->getNamedResourceId(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
move-result v2
const/4 v3, 0x0
if-gez v2, :cond_0
move-object v2, v3
goto :goto_0
:cond_0
iget-object v4, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-static {p3, v2, v4}, Landroidx/transition/Scene;->getSceneForLayout(Landroid/view/ViewGroup;ILandroid/content/Context;)Landroidx/transition/Scene;
move-result-object v2
:goto_0
const/4 v4, 0x1
const-string v5, "toScene"
invoke-static {p1, p2, v5, v4, v0}, Landroidx/core/content/res/TypedArrayUtils;->getNamedResourceId(Landroid/content/res/TypedArray;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;II)I
move-result p2
if-gez p2, :cond_1
goto :goto_1
:cond_1
iget-object v0, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-static {p3, p2, v0}, Landroidx/transition/Scene;->getSceneForLayout(Landroid/view/ViewGroup;ILandroid/content/Context;)Landroidx/transition/Scene;
move-result-object v3
:goto_1
if-ltz v1, :cond_4
invoke-virtual {p0, v1}, Landroidx/transition/TransitionInflater;->inflateTransition(I)Landroidx/transition/Transition;
move-result-object p2
if-eqz p2, :cond_4
if-eqz v3, :cond_3
if-nez v2, :cond_2
invoke-virtual {p4, v3, p2}, Landroidx/transition/TransitionManager;->setTransition(Landroidx/transition/Scene;Landroidx/transition/Transition;)V
goto :goto_2
:cond_2
invoke-virtual {p4, v2, v3, p2}, Landroidx/transition/TransitionManager;->setTransition(Landroidx/transition/Scene;Landroidx/transition/Scene;Landroidx/transition/Transition;)V
goto :goto_2
:cond_3
new-instance p1, Ljava/lang/RuntimeException;
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p2
const-string p3, "No toScene for transition ID "
invoke-virtual {p3, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
:cond_4
:goto_2
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
return-void
.end method
# virtual methods
.method public inflateTransition(I)Landroidx/transition/Transition;
.locals 4
iget-object v0, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
move-result-object p1
:try_start_0
invoke-static {p1}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
move-result-object v0
const/4 v1, 0x0
invoke-direct {p0, p1, v0, v1}, Landroidx/transition/TransitionInflater;->createTransitionFromXml(Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroidx/transition/Transition;)Landroidx/transition/Transition;
move-result-object v0
:try_end_0
.catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-interface {p1}, Landroid/content/res/XmlResourceParser;->close()V
return-object v0
:catchall_0
move-exception v0
goto :goto_0
:catch_0
move-exception v0
:try_start_1
new-instance v1, Landroid/view/InflateException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
invoke-interface {p1}, Landroid/content/res/XmlResourceParser;->getPositionDescription()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, ": "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2, v0}, Landroid/view/InflateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:catch_1
move-exception v0
new-instance v1, Landroid/view/InflateException;
invoke-virtual {v0}, Lorg/xmlpull/v1/XmlPullParserException;->getMessage()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2, v0}, Landroid/view/InflateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:goto_0
invoke-interface {p1}, Landroid/content/res/XmlResourceParser;->close()V
throw v0
.end method
.method public inflateTransitionManager(ILandroid/view/ViewGroup;)Landroidx/transition/TransitionManager;
.locals 3
iget-object v0, p0, Landroidx/transition/TransitionInflater;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
move-result-object p1
:try_start_0
invoke-static {p1}, Landroid/util/Xml;->asAttributeSet(Lorg/xmlpull/v1/XmlPullParser;)Landroid/util/AttributeSet;
move-result-object v0
invoke-direct {p0, p1, v0, p2}, Landroidx/transition/TransitionInflater;->createTransitionManagerFromXml(Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/view/ViewGroup;)Landroidx/transition/TransitionManager;
move-result-object p2
:try_end_0
.catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-interface {p1}, Landroid/content/res/XmlResourceParser;->close()V
return-object p2
:catchall_0
move-exception p2
goto :goto_0
:catch_0
move-exception p2
:try_start_1
new-instance v0, Landroid/view/InflateException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-interface {p1}, Landroid/content/res/XmlResourceParser;->getPositionDescription()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, ": "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Landroid/view/InflateException;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p2}, Landroid/view/InflateException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
throw v0
:catch_1
move-exception p2
new-instance v0, Landroid/view/InflateException;
invoke-virtual {p2}, Lorg/xmlpull/v1/XmlPullParserException;->getMessage()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Landroid/view/InflateException;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p2}, Landroid/view/InflateException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:goto_0
invoke-interface {p1}, Landroid/content/res/XmlResourceParser;->close()V
throw p2
.end method