.class Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer; .super Landroid/content/BroadcastReceiver; .source "SourceFile" # interfaces .implements Ljava/lang/Runnable; # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/ea/nimble/mtx/googleplay/GooglePlay; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x1 name = "ItemRestorer" .end annotation # instance fields .field private m_requestRetryDelay:D .field private m_retryCount:I .field private final m_timer:Lcom/ea/nimble/Timer; .field final synthetic this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; # direct methods .method private constructor (Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V .locals 2 iput-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 184 invoke-direct {p0}, Landroid/content/BroadcastReceiver;->()V .line 186 new-instance p1, Lcom/ea/nimble/Timer; invoke-direct {p1, p0}, Lcom/ea/nimble/Timer;->(Ljava/lang/Runnable;)V iput-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_timer:Lcom/ea/nimble/Timer; const-wide/high16 v0, 0x3ff0000000000000L # 1.0 iput-wide v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_requestRetryDelay:D const/4 p1, 0x0 iput p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_retryCount:I return-void .end method .method public synthetic constructor (Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V .locals 0 .line 184 invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V return-void .end method # virtual methods .method public cancel()V .locals 2 iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; const/4 v1, 0x0 .line 267 invoke-static {v0, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->access$202(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)Z iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_timer:Lcom/ea/nimble/Timer; .line 268 invoke-virtual {v0}, Lcom/ea/nimble/Timer;->cancel()V const-wide/high16 v0, 0x3ff0000000000000L # 1.0 iput-wide v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_requestRetryDelay:D .line 270 invoke-static {p0}, Lcom/ea/nimble/Utility;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V return-void .end method .method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V .locals 3 .line 217 invoke-virtual {p2}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle; move-result-object p1 const/4 p2, 0x0 if-eqz p1, :cond_3 const-string v0, "result" .line 218 invoke-virtual {p1, v0}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 const-string v1, "0" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_3 sget v0, Landroid/os/Build$VERSION;->SDK_INT:I const/16 v1, 0x21 const-string v2, "error" if-lt v0, v1, :cond_0 const-class v0, Lcom/ea/nimble/Error; .line 224 invoke-static {p1, v2, v0}, Lcom/ea/eadp/pushnotification/forwarding/PushBroadcastForwarder$$ExternalSyntheticApiModelOutline0;->m(Landroid/os/Bundle;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object; move-result-object p1 check-cast p1, Lcom/ea/nimble/Error; goto :goto_0 .line 229 :cond_0 invoke-virtual {p1, v2}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable; move-result-object p1 check-cast p1, Lcom/ea/nimble/Error; :goto_0 iget v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_retryCount:I add-int/lit8 v0, v0, 0x1 iput v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_retryCount:I .line 235 invoke-virtual {p1}, Lcom/ea/nimble/Error;->getDomain()Ljava/lang/String; move-result-object p1 const-string v0, "SynergyServerError" invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result p1 if-eqz p1, :cond_2 iget p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_retryCount:I const/4 v0, 0x5 if-ge p1, v0, :cond_2 iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 237 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const-string v1, "Catalog refresh failed with restore pending. Retrying in " invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; iget-wide v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_requestRetryDelay:D invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder; const-string v1, " seconds." 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 v0 new-array v1, p2, [Ljava/lang/Object; invoke-static {p1, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_timer:Lcom/ea/nimble/Timer; .line 238 invoke-virtual {p1}, Lcom/ea/nimble/Timer;->isRunning()Z move-result p1 if-nez p1, :cond_1 iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_timer:Lcom/ea/nimble/Timer; iget-wide v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_requestRetryDelay:D .line 240 invoke-virtual {p1, v0, v1, p2}, Lcom/ea/nimble/Timer;->schedule(DZ)V :cond_1 return-void :cond_2 iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; const-string v0, "Catalog refresh failed with restore pending. Skip." new-array v1, p2, [Ljava/lang/Object; .line 248 invoke-static {p1, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V :cond_3 iput p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_retryCount:I iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_timer:Lcom/ea/nimble/Timer; .line 252 invoke-virtual {p1}, Lcom/ea/nimble/Timer;->cancel()V .line 253 invoke-static {p0}, Lcom/ea/nimble/Utility;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 254 invoke-static {p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->access$202(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)Z iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 255 invoke-static {p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->access$300(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)V return-void .end method .method public restoreItems()V .locals 5 iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 192 invoke-static {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->access$200(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)Z move-result v0 if-eqz v0, :cond_0 return-void :cond_0 iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 196 monitor-enter v0 :try_start_0 iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 198 iget-object v1, v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap; const/4 v2, 0x0 if-eqz v1, :cond_2 invoke-virtual {v1}, Ljava/util/HashMap;->isEmpty()Z move-result v1 if-eqz v1, :cond_1 goto :goto_0 :cond_1 iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 209 invoke-static {v1, v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->access$300(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)V goto :goto_1 :catchall_0 move-exception v1 goto :goto_2 :cond_2 :goto_0 iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; const/4 v3, 0x1 .line 200 invoke-static {v1, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->access$202(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)Z iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; const-string v3, "Restore pending but catalog is unavailable. Initiating refresh now." new-array v4, v2, [Ljava/lang/Object; .line 201 invoke-static {v1, v3, v4}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V const-string v1, "nimble.notification.mtx.refreshcatalogfinished" .line 202 invoke-static {v1, p0}, Lcom/ea/nimble/Utility;->registerReceiver(Ljava/lang/String;Landroid/content/BroadcastReceiver;)V iput v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_retryCount:I iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 205 invoke-virtual {v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->refreshAvailableCatalogItems()V .line 211 :goto_1 monitor-exit v0 return-void :goto_2 monitor-exit v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw v1 .end method .method public run()V .locals 4 iget-wide v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_requestRetryDelay:D const-wide/high16 v2, 0x4000000000000000L # 2.0 mul-double/2addr v0, v2 const-wide v2, 0x4072c00000000000L # 300.0 .line 261 invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(DD)D move-result-wide v0 iput-wide v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->m_requestRetryDelay:D iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->this$0:Lcom/ea/nimble/mtx/googleplay/GooglePlay; .line 262 invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->refreshAvailableCatalogItems()V return-void .end method