.class Lcom/moji/api/APIManager$RemoteServiceConn; .super Ljava/lang/Object; .source "APIManager.java" # interfaces .implements Landroid/content/ServiceConnection; # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/moji/api/APIManager; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0xa name = "RemoteServiceConn" .end annotation .annotation system Ldalvik/annotation/Signature; value = { "", "Ljava/lang/Object;", "Landroid/content/ServiceConnection;" } .end annotation # instance fields .field private a:Ljava/lang/String; .field private b:Ljava/lang/Class; .field private c:Ljava/lang/ref/SoftReference; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ref/SoftReference<", "Lcom/moji/api/APIListener<", "TT;>;>;" } .end annotation .end field # direct methods .method constructor (Ljava/lang/String;Ljava/lang/Class;Lcom/moji/api/APIListener;)V .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", "Ljava/lang/Class;", "Lcom/moji/api/APIListener<", "TT;>;)V" } .end annotation .line 547 invoke-direct {p0}, Ljava/lang/Object;->()V .line 548 iput-object p1, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->a:Ljava/lang/String; .line 549 iput-object p2, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->b:Ljava/lang/Class; .line 550 new-instance p1, Ljava/lang/ref/SoftReference; invoke-direct {p1, p3}, Ljava/lang/ref/SoftReference;->(Ljava/lang/Object;)V iput-object p1, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->c:Ljava/lang/ref/SoftReference; return-void .end method .method static synthetic a(Lcom/moji/api/APIManager$RemoteServiceConn;)Ljava/lang/ref/SoftReference; .locals 0 .line 542 iget-object p0, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->c:Ljava/lang/ref/SoftReference; return-object p0 .end method # virtual methods .method public onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V .locals 4 .line 555 invoke-static {p2}, Lcom/moji/api/service/IAPInterface$Stub;->a(Landroid/os/IBinder;)Lcom/moji/api/service/IAPInterface; move-result-object p1 if-eqz p1, :cond_0 .line 557 invoke-static {}, Lcom/moji/api/APIManager;->d()Ljava/util/concurrent/ConcurrentHashMap; move-result-object p2 iget-object v0, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->a:Ljava/lang/String; invoke-virtual {p2, v0, p1}, Ljava/util/concurrent/ConcurrentHashMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 558 invoke-static {}, Lcom/moji/api/APIManager;->e()Ljava/util/concurrent/ConcurrentHashMap; move-result-object p2 iget-object v0, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->a:Ljava/lang/String; invoke-virtual {p2, v0, p0}, Ljava/util/concurrent/ConcurrentHashMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 559 iget-object p2, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->c:Ljava/lang/ref/SoftReference; invoke-virtual {p2}, Ljava/lang/ref/SoftReference;->get()Ljava/lang/Object; move-result-object p2 check-cast p2, Lcom/moji/api/APIListener; if-eqz p2, :cond_1 .line 560 iget-object v0, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->b:Ljava/lang/Class; if-eqz v0, :cond_1 .line 561 iget-object v0, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->b:Ljava/lang/Class; invoke-virtual {v0}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader; move-result-object v0 const/4 v1, 0x1 new-array v1, v1, [Ljava/lang/Class; const/4 v2, 0x0 iget-object v3, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->b:Ljava/lang/Class; aput-object v3, v1, v2 new-instance v2, Lcom/moji/api/handler/APInvokeHandler; iget-object v3, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->b:Ljava/lang/Class; invoke-direct {v2, v3, p1}, Lcom/moji/api/handler/APInvokeHandler;->(Ljava/lang/Class;Lcom/moji/api/service/IAPInterface;)V invoke-static {v0, v1, v2}, Ljava/lang/reflect/Proxy;->newProxyInstance(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object; move-result-object p1 invoke-interface {p2, p1}, Lcom/moji/api/APIListener;->a(Ljava/lang/Object;)V goto :goto_0 .line 564 :cond_0 iget-object p1, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->c:Ljava/lang/ref/SoftReference; invoke-virtual {p1}, Ljava/lang/ref/SoftReference;->get()Ljava/lang/Object; move-result-object p1 check-cast p1, Lcom/moji/api/APIListener; if-eqz p1, :cond_1 const/4 p2, 0x4 .line 566 invoke-interface {p1, p2}, Lcom/moji/api/APIListener;->a(I)V :cond_1 :goto_0 return-void .end method .method public onServiceDisconnected(Landroid/content/ComponentName;)V .locals 1 .line 573 invoke-static {}, Lcom/moji/api/APIManager;->d()Ljava/util/concurrent/ConcurrentHashMap; move-result-object p1 iget-object v0, p0, Lcom/moji/api/APIManager$RemoteServiceConn;->a:Ljava/lang/String; invoke-virtual {p1, v0}, Ljava/util/concurrent/ConcurrentHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; return-void .end method