.class public final Lcom/discord/stores/StoreGooglePlayPurchases; .super Ljava/lang/Object; .source "StoreGooglePlayPurchases.kt" # interfaces .implements Lcom/discord/stores/DispatchHandler; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/discord/stores/StoreGooglePlayPurchases$State;, Lcom/discord/stores/StoreGooglePlayPurchases$QueryState;, Lcom/discord/stores/StoreGooglePlayPurchases$Event; } .end annotation # instance fields .field public final dispatcher:Lcom/discord/stores/Dispatcher; .field public final eventSubject:Lrx/subjects/PublishSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/PublishSubject<", "Lcom/discord/stores/StoreGooglePlayPurchases$Event;", ">;" } .end annotation .end field .field public isDirty:Z .field public pendingDowngrade:Lcom/discord/stores/PendingDowngrade; .field public purchases:Ljava/util/List; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List<", "+", "Lcom/android/billingclient/api/Purchase;", ">;" } .end annotation .end field .field public final queryStateSubject:Lrx/subjects/BehaviorSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/BehaviorSubject<", "Lcom/discord/stores/StoreGooglePlayPurchases$QueryState;", ">;" } .end annotation .end field .field public final stateSubject:Lrx/subjects/BehaviorSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/BehaviorSubject<", "Lcom/discord/stores/StoreGooglePlayPurchases$State;", ">;" } .end annotation .end field # direct methods .method public constructor (Lcom/discord/stores/Dispatcher;)V .locals 1 const-string v0, "dispatcher" invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V invoke-direct {p0}, Ljava/lang/Object;->()V iput-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->dispatcher:Lcom/discord/stores/Dispatcher; sget-object p1, Lc0/i/l;->d:Lc0/i/l; iput-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->purchases:Ljava/util/List; invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->eventSubject:Lrx/subjects/PublishSubject; sget-object p1, Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress;->INSTANCE:Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress; invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; sget-object p1, Lcom/discord/stores/StoreGooglePlayPurchases$State$Uninitialized;->INSTANCE:Lcom/discord/stores/StoreGooglePlayPurchases$State$Uninitialized; invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->stateSubject:Lrx/subjects/BehaviorSubject; return-void .end method .method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreGooglePlayPurchases;)Lcom/discord/stores/Dispatcher; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->dispatcher:Lcom/discord/stores/Dispatcher; return-object p0 .end method .method public static final synthetic access$getPendingDowngrade$p(Lcom/discord/stores/StoreGooglePlayPurchases;)Lcom/discord/stores/PendingDowngrade; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->pendingDowngrade:Lcom/discord/stores/PendingDowngrade; return-object p0 .end method .method public static final synthetic access$getQueryStateSubject$p(Lcom/discord/stores/StoreGooglePlayPurchases;)Lrx/subjects/BehaviorSubject; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; return-object p0 .end method .method public static final synthetic access$getStateSubject$p(Lcom/discord/stores/StoreGooglePlayPurchases;)Lrx/subjects/BehaviorSubject; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->stateSubject:Lrx/subjects/BehaviorSubject; return-object p0 .end method .method public static final synthetic access$handleDowngradeFailure(Lcom/discord/stores/StoreGooglePlayPurchases;Ljava/lang/String;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->handleDowngradeFailure(Ljava/lang/String;)V return-void .end method .method public static final synthetic access$handleDowngradeSuccess(Lcom/discord/stores/StoreGooglePlayPurchases;Ljava/lang/String;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->handleDowngradeSuccess(Ljava/lang/String;)V return-void .end method .method public static final synthetic access$handlePurchases(Lcom/discord/stores/StoreGooglePlayPurchases;Ljava/util/List;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->handlePurchases(Ljava/util/List;)V return-void .end method .method public static final synthetic access$handleVerificationFailure(Lcom/discord/stores/StoreGooglePlayPurchases;Lcom/android/billingclient/api/Purchase;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->handleVerificationFailure(Lcom/android/billingclient/api/Purchase;)V return-void .end method .method public static final synthetic access$handleVerificationSuccess(Lcom/discord/stores/StoreGooglePlayPurchases;Lcom/android/billingclient/api/Purchase;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->handleVerificationSuccess(Lcom/android/billingclient/api/Purchase;)V return-void .end method .method public static final synthetic access$isDirty$p(Lcom/discord/stores/StoreGooglePlayPurchases;)Z .locals 0 iget-boolean p0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->isDirty:Z return p0 .end method .method public static final synthetic access$setDirty$p(Lcom/discord/stores/StoreGooglePlayPurchases;Z)V .locals 0 iput-boolean p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->isDirty:Z return-void .end method .method public static final synthetic access$setPendingDowngrade$p(Lcom/discord/stores/StoreGooglePlayPurchases;Lcom/discord/stores/PendingDowngrade;)V .locals 0 iput-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->pendingDowngrade:Lcom/discord/stores/PendingDowngrade; return-void .end method .method public static final synthetic access$shouldRetryDowngrade(Lcom/discord/stores/StoreGooglePlayPurchases;Ljava/lang/Throwable;)Z .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->shouldRetryDowngrade(Ljava/lang/Throwable;)Z move-result p0 return p0 .end method .method public static final synthetic access$verifyPurchases(Lcom/discord/stores/StoreGooglePlayPurchases;Ljava/util/List;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->verifyPurchases(Ljava/util/List;)V return-void .end method .method private final handleDowngradeFailure(Ljava/lang/String;)V .locals 2 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->eventSubject:Lrx/subjects/PublishSubject; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQueryFailure; invoke-direct {v1, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQueryFailure;->(Ljava/lang/String;)V iget-object p1, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b; invoke-virtual {p1, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V const/4 p1, 0x0 invoke-virtual {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->updatePendingDowngrade(Lcom/discord/stores/PendingDowngrade;)V iget-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; sget-object v0, Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress;->INSTANCE:Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress; invoke-virtual {p1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V return-void .end method .method private final handleDowngradeSuccess(Ljava/lang/String;)V .locals 2 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->eventSubject:Lrx/subjects/PublishSubject; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQuerySuccess; invoke-direct {v1, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQuerySuccess;->(Ljava/lang/String;)V iget-object p1, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b; invoke-virtual {p1, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V const/4 p1, 0x0 invoke-virtual {p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases;->updatePendingDowngrade(Lcom/discord/stores/PendingDowngrade;)V iget-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; sget-object v0, Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress;->INSTANCE:Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress; invoke-virtual {p1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V return-void .end method .method private final handlePurchases(Ljava/util/List;)V .locals 3 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Lcom/android/billingclient/api/Purchase;", ">;)V" } .end annotation const/4 v0, 0x1 if-eqz p1, :cond_0 invoke-interface {p1}, Ljava/util/List;->size()I move-result v1 iget-object v2, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->purchases:Ljava/util/List; invoke-interface {v2}, Ljava/util/List;->size()I move-result v2 if-ne v1, v2, :cond_0 iget-object v1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->purchases:Ljava/util/List; invoke-interface {p1, v1}, Ljava/util/List;->containsAll(Ljava/util/Collection;)Z move-result v1 if-eqz v1, :cond_0 iget-object v1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->purchases:Ljava/util/List; invoke-interface {v1, p1}, Ljava/util/List;->containsAll(Ljava/util/Collection;)Z move-result v1 if-eqz v1, :cond_0 const/4 v1, 0x1 goto :goto_0 :cond_0 const/4 v1, 0x0 :goto_0 if-eqz p1, :cond_1 invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z move-result v2 xor-int/2addr v2, v0 if-ne v2, v0, :cond_1 if-eqz v1, :cond_1 return-void :cond_1 if-eqz p1, :cond_2 goto :goto_1 :cond_2 sget-object p1, Lc0/i/l;->d:Lc0/i/l; :goto_1 iput-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->purchases:Ljava/util/List; iput-boolean v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->isDirty:Z return-void .end method .method private final handleVerificationFailure(Lcom/android/billingclient/api/Purchase;)V .locals 3 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->eventSubject:Lrx/subjects/PublishSubject; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQueryFailure; invoke-virtual {p1}, Lcom/android/billingclient/api/Purchase;->b()Ljava/lang/String; move-result-object p1 const-string v2, "purchase.sku" invoke-static {p1, v2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-direct {v1, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQueryFailure;->(Ljava/lang/String;)V iget-object p1, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b; invoke-virtual {p1, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V iget-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; sget-object v0, Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress;->INSTANCE:Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress; invoke-virtual {p1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V return-void .end method .method private final handleVerificationSuccess(Lcom/android/billingclient/api/Purchase;)V .locals 3 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->eventSubject:Lrx/subjects/PublishSubject; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQuerySuccess; invoke-virtual {p1}, Lcom/android/billingclient/api/Purchase;->b()Ljava/lang/String; move-result-object p1 const-string v2, "purchase.sku" invoke-static {p1, v2}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-direct {v1, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$Event$PurchaseQuerySuccess;->(Ljava/lang/String;)V iget-object p1, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b; invoke-virtual {p1, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V iget-object p1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; sget-object v0, Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress;->INSTANCE:Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$NotInProgress; invoke-virtual {p1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V return-void .end method .method private final shouldRetryDowngrade(Ljava/lang/Throwable;)Z .locals 3 instance-of v0, p1, Ljava/util/concurrent/TimeoutException; const/4 v1, 0x0 if-eqz v0, :cond_0 goto :goto_0 :cond_0 instance-of v0, p1, Lretrofit2/HttpException; if-eqz v0, :cond_2 const/16 v0, 0x257 const/16 v2, 0x1f4 check-cast p1, Lretrofit2/HttpException; iget p1, p1, Lretrofit2/HttpException;->code:I if-le v2, p1, :cond_1 goto :goto_0 :cond_1 if-lt v0, p1, :cond_3 const/4 v1, 0x1 goto :goto_0 :cond_2 instance-of v1, p1, Ljava/io/IOException; :cond_3 :goto_0 return v1 .end method .method private final verifyPurchase(Lcom/android/billingclient/api/Purchase;)V .locals 13 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion; invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser; move-result-object v0 invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->getMe()Lcom/discord/models/domain/ModelUser$Me; move-result-object v0 if-eqz v0, :cond_0 invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J move-result-wide v4 new-instance v0, Lcom/discord/restapi/RestAPIParams$VerifyPurchaseTokenBody; invoke-virtual {p1}, Lcom/android/billingclient/api/Purchase;->a()Ljava/lang/String; move-result-object v2 const-string v1, "purchase.purchaseToken" invoke-static {v2, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {p1}, Lcom/android/billingclient/api/Purchase;->b()Ljava/lang/String; move-result-object v3 const-string v1, "purchase.sku" invoke-static {v3, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V iget-object v1, p1, Lcom/android/billingclient/api/Purchase;->c:Lorg/json/JSONObject; const-string v6, "packageName" invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; move-result-object v6 const-string v1, "purchase.packageName" invoke-static {v6, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V move-object v1, v0 invoke-direct/range {v1 .. v6}, Lcom/discord/restapi/RestAPIParams$VerifyPurchaseTokenBody;->(Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;)V iget-object v1, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; sget-object v2, Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$InProgress;->INSTANCE:Lcom/discord/stores/StoreGooglePlayPurchases$QueryState$InProgress; invoke-virtual {v1, v2}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion; invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI; move-result-object v1 invoke-virtual {v1, v0}, Lcom/discord/utilities/rest/RestAPI;->verifyPurchaseToken(Lcom/discord/restapi/RestAPIParams$VerifyPurchaseTokenBody;)Lrx/Observable; move-result-object v0 const/4 v1, 0x0 const/4 v2, 0x1 const/4 v3, 0x0 invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable; move-result-object v4 const-class v5, Lcom/discord/stores/StoreGooglePlayPurchases; const/4 v6, 0x0 const/4 v7, 0x0 new-instance v10, Lcom/discord/stores/StoreGooglePlayPurchases$verifyPurchase$1; invoke-direct {v10, p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$verifyPurchase$1;->(Lcom/discord/stores/StoreGooglePlayPurchases;Lcom/android/billingclient/api/Purchase;)V const/4 v9, 0x0 new-instance v8, Lcom/discord/stores/StoreGooglePlayPurchases$verifyPurchase$2; invoke-direct {v8, p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$verifyPurchase$2;->(Lcom/discord/stores/StoreGooglePlayPurchases;Lcom/android/billingclient/api/Purchase;)V const/16 v11, 0x16 const/4 v12, 0x0 invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V :cond_0 return-void .end method .method private final verifyPurchases(Ljava/util/List;)V .locals 4 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Lcom/android/billingclient/api/Purchase;", ">;)V" } .end annotation if-eqz p1, :cond_2 invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object p1 :cond_0 :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/android/billingclient/api/Purchase; iget-object v1, v0, Lcom/android/billingclient/api/Purchase;->c:Lorg/json/JSONObject; const-string v2, "purchaseState" const/4 v3, 0x1 invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I move-result v1 const/4 v2, 0x4 if-eq v1, v2, :cond_1 const/4 v1, 0x1 goto :goto_1 :cond_1 const/4 v1, 0x2 :goto_1 if-ne v1, v3, :cond_0 invoke-virtual {v0}, Lcom/android/billingclient/api/Purchase;->c()Z move-result v1 if-nez v1, :cond_0 invoke-direct {p0, v0}, Lcom/discord/stores/StoreGooglePlayPurchases;->verifyPurchase(Lcom/android/billingclient/api/Purchase;)V goto :goto_0 :cond_2 return-void .end method # virtual methods .method public final downgradePurchase()V .locals 2 iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->dispatcher:Lcom/discord/stores/Dispatcher; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$downgradePurchase$1; invoke-direct {v1, p0}, Lcom/discord/stores/StoreGooglePlayPurchases$downgradePurchase$1;->(Lcom/discord/stores/StoreGooglePlayPurchases;)V invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V return-void .end method .method public final getQueryState()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lcom/discord/stores/StoreGooglePlayPurchases$QueryState;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->queryStateSubject:Lrx/subjects/BehaviorSubject; const-string v1, "queryStateSubject" invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getState()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lcom/discord/stores/StoreGooglePlayPurchases$State;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->stateSubject:Lrx/subjects/BehaviorSubject; const-string v1, "stateSubject" invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final observeEvents()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lcom/discord/stores/StoreGooglePlayPurchases$Event;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->eventSubject:Lrx/subjects/PublishSubject; const-string v1, "eventSubject" invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public onDispatchEnded()V .locals 4 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-boolean v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->isDirty:Z if-eqz v0, :cond_0 iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->stateSubject:Lrx/subjects/BehaviorSubject; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$State$Loaded; new-instance v2, Ljava/util/ArrayList; iget-object v3, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->purchases:Ljava/util/List; invoke-direct {v2, v3}, Ljava/util/ArrayList;->(Ljava/util/Collection;)V iget-object v3, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->pendingDowngrade:Lcom/discord/stores/PendingDowngrade; invoke-direct {v1, v2, v3}, Lcom/discord/stores/StoreGooglePlayPurchases$State$Loaded;->(Ljava/util/List;Lcom/discord/stores/PendingDowngrade;)V invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V const/4 v0, 0x0 iput-boolean v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->isDirty:Z :cond_0 return-void .end method .method public final processPurchases(Ljava/util/List;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Lcom/android/billingclient/api/Purchase;", ">;)V" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->dispatcher:Lcom/discord/stores/Dispatcher; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$processPurchases$1; invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$processPurchases$1;->(Lcom/discord/stores/StoreGooglePlayPurchases;Ljava/util/List;)V invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V return-void .end method .method public final updatePendingDowngrade(Lcom/discord/stores/PendingDowngrade;)V .locals 2 iget-object v0, p0, Lcom/discord/stores/StoreGooglePlayPurchases;->dispatcher:Lcom/discord/stores/Dispatcher; new-instance v1, Lcom/discord/stores/StoreGooglePlayPurchases$updatePendingDowngrade$1; invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreGooglePlayPurchases$updatePendingDowngrade$1;->(Lcom/discord/stores/StoreGooglePlayPurchases;Lcom/discord/stores/PendingDowngrade;)V invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V return-void .end method