.class public Lcom/airbnb/lottie/TextDelegate; .super Ljava/lang/Object; .source "TextDelegate.java" # instance fields .field private final animationView:Lcom/airbnb/lottie/LottieAnimationView; .field private cacheText:Z .field private final drawable:Lcom/airbnb/lottie/LottieDrawable; .field private final stringMap:Ljava/util/Map; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Map<", "Ljava/lang/String;", "Ljava/lang/String;", ">;" } .end annotation .end field # direct methods .method constructor ()V .locals 1 .line 28 invoke-direct {p0}, Ljava/lang/Object;->()V .line 19 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; const/4 v0, 0x1 iput-boolean v0, p0, Lcom/airbnb/lottie/TextDelegate;->cacheText:Z const/4 v0, 0x0 iput-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->animationView:Lcom/airbnb/lottie/LottieAnimationView; iput-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->drawable:Lcom/airbnb/lottie/LottieDrawable; return-void .end method .method public constructor (Lcom/airbnb/lottie/LottieAnimationView;)V .locals 1 .line 34 invoke-direct {p0}, Ljava/lang/Object;->()V .line 19 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; const/4 v0, 0x1 iput-boolean v0, p0, Lcom/airbnb/lottie/TextDelegate;->cacheText:Z iput-object p1, p0, Lcom/airbnb/lottie/TextDelegate;->animationView:Lcom/airbnb/lottie/LottieAnimationView; const/4 p1, 0x0 iput-object p1, p0, Lcom/airbnb/lottie/TextDelegate;->drawable:Lcom/airbnb/lottie/LottieDrawable; return-void .end method .method public constructor (Lcom/airbnb/lottie/LottieDrawable;)V .locals 1 .line 40 invoke-direct {p0}, Ljava/lang/Object;->()V .line 19 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; const/4 v0, 0x1 iput-boolean v0, p0, Lcom/airbnb/lottie/TextDelegate;->cacheText:Z iput-object p1, p0, Lcom/airbnb/lottie/TextDelegate;->drawable:Lcom/airbnb/lottie/LottieDrawable; const/4 p1, 0x0 iput-object p1, p0, Lcom/airbnb/lottie/TextDelegate;->animationView:Lcom/airbnb/lottie/LottieAnimationView; return-void .end method .method private invalidate()V .locals 1 iget-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->animationView:Lcom/airbnb/lottie/LottieAnimationView; if-eqz v0, :cond_0 .line 110 invoke-virtual {v0}, Lcom/airbnb/lottie/LottieAnimationView;->invalidate()V :cond_0 iget-object p0, p0, Lcom/airbnb/lottie/TextDelegate;->drawable:Lcom/airbnb/lottie/LottieDrawable; if-eqz p0, :cond_1 .line 113 invoke-virtual {p0}, Lcom/airbnb/lottie/LottieDrawable;->invalidateSelf()V :cond_1 return-void .end method # virtual methods .method public getText(Ljava/lang/String;)Ljava/lang/String; .locals 0 return-object p1 .end method .method public getText(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 0 .line 53 invoke-virtual {p0, p2}, Lcom/airbnb/lottie/TextDelegate;->getText(Ljava/lang/String;)Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public final getTextInternal(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 1 iget-boolean v0, p0, Lcom/airbnb/lottie/TextDelegate;->cacheText:Z if-eqz v0, :cond_0 iget-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; .line 98 invoke-interface {v0, p2}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 iget-object p0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; .line 99 invoke-interface {p0, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Ljava/lang/String; return-object p0 .line 101 :cond_0 invoke-virtual {p0, p1, p2}, Lcom/airbnb/lottie/TextDelegate;->getText(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p1 iget-boolean v0, p0, Lcom/airbnb/lottie/TextDelegate;->cacheText:Z if-eqz v0, :cond_1 iget-object p0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; .line 103 invoke-interface {p0, p2, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :cond_1 return-object p1 .end method .method public invalidateAllText()V .locals 1 iget-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; .line 92 invoke-interface {v0}, Ljava/util/Map;->clear()V .line 93 invoke-direct {p0}, Lcom/airbnb/lottie/TextDelegate;->invalidate()V return-void .end method .method public invalidateText(Ljava/lang/String;)V .locals 1 iget-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; .line 84 invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object; .line 85 invoke-direct {p0}, Lcom/airbnb/lottie/TextDelegate;->invalidate()V return-void .end method .method public setCacheText(Z)V .locals 0 iput-boolean p1, p0, Lcom/airbnb/lottie/TextDelegate;->cacheText:Z return-void .end method .method public setText(Ljava/lang/String;Ljava/lang/String;)V .locals 1 iget-object v0, p0, Lcom/airbnb/lottie/TextDelegate;->stringMap:Ljava/util/Map; .line 68 invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 69 invoke-direct {p0}, Lcom/airbnb/lottie/TextDelegate;->invalidate()V return-void .end method