251 lines
		
	
	
		
			8.2 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			251 lines
		
	
	
		
			8.2 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager$2;
 | |
| .super Ljava/lang/Object;
 | |
| .source "RealSubscriptionManager.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lcom/amazonaws/mobileconnectors/appsync/subscription/SubscriptionCallback;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x1
 | |
|     name = null
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public final synthetic this$0:Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iput-object p1, p0, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager$2;->this$0:Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;
 | |
| 
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public onError(Ljava/lang/String;Ljava/lang/Exception;)V
 | |
|     .locals 5
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager$2;->this$0:Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;
 | |
| 
 | |
|     invoke-static {v0, p1}, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;->access$300(Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;Ljava/lang/String;)Ljava/util/Set;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const-string v1, "]"
 | |
| 
 | |
|     if-eqz v0, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     invoke-interface {v0}, Ljava/util/Set;->size()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     if-nez v2, :cond_0
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     :goto_0
 | |
|     invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_2
 | |
| 
 | |
|     invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Lcom/amazonaws/mobileconnectors/appsync/subscription/SubscriptionObject;
 | |
| 
 | |
|     .line 4
 | |
|     new-instance v2, Lcom/apollographql/apollo/exception/ApolloException;
 | |
| 
 | |
|     new-instance v3, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     const-string v4, "Subscription Infrastructure: onError called for Subscription ["
 | |
| 
 | |
|     invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     invoke-direct {v2, v3, p2}, Lcom/apollographql/apollo/exception/ApolloException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
 | |
| 
 | |
|     invoke-virtual {v0, v2}, Lcom/amazonaws/mobileconnectors/appsync/subscription/SubscriptionObject;->onFailure(Lcom/apollographql/apollo/exception/ApolloException;)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_1
 | |
|     :goto_1
 | |
|     invoke-static {}, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;->access$100()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     new-instance v0, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     const-string v2, "Subscription Infrastructure: No subscription objects found for topic ["
 | |
| 
 | |
|     invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-static {p2, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
 | |
| 
 | |
|     :cond_2
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onMessage(Ljava/lang/String;Ljava/lang/String;)V
 | |
|     .locals 5
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {}, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;->access$100()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     new-instance v1, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     const-string v2, "Subscription Infrastructure: Received message on topic ["
 | |
| 
 | |
|     invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     const-string v2, "]. Message is \n"
 | |
| 
 | |
|     invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v1, p2}, 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-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager$2;->this$0:Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;
 | |
| 
 | |
|     invoke-static {v0, p1}, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;->access$300(Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;Ljava/lang/String;)Ljava/util/Set;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {}, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;->access$100()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     new-instance v0, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     const-string v1, "Subscription Infrastructure: No subscription objects found for topic ["
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     const-string p1, "]"
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-static {p2, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     :goto_0
 | |
|     invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-eqz v1, :cond_1
 | |
| 
 | |
|     invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     check-cast v1, Lcom/amazonaws/mobileconnectors/appsync/subscription/SubscriptionObject;
 | |
| 
 | |
|     .line 5
 | |
|     invoke-static {}, Lcom/amazonaws/mobileconnectors/appsync/subscription/RealSubscriptionManager;->access$100()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     const-string v3, "Subscription Infrastructure: Propagating message received on topic "
 | |
| 
 | |
|     const-string v4, " to "
 | |
| 
 | |
|     invoke-static {v3, p1, v4}, Landroidx/activity/result/g;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     iget-object v4, v1, Lcom/amazonaws/mobileconnectors/appsync/subscription/SubscriptionObject;->subscription:Lcom/apollographql/apollo/api/f;
 | |
| 
 | |
|     invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     invoke-static {v2, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {v1, p2}, Lcom/amazonaws/mobileconnectors/appsync/subscription/SubscriptionObject;->onMessage(Ljava/lang/String;)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_1
 | |
|     return-void
 | |
| .end method
 |