.class public Lf/c/a/c1; .super Ljava/lang/Object; .source "InstallReferrerHuawei.java" # instance fields .field public a:Lf/c/a/w0; .field public b:Landroid/content/Context; .field public final c:Lf/c/a/d1; .field public final d:Ljava/util/concurrent/atomic/AtomicBoolean; # direct methods .method public constructor (Landroid/content/Context;Lf/c/a/d1;)V .locals 1 invoke-direct {p0}, Ljava/lang/Object;->()V invoke-static {}, Lf/c/a/a0;->a()Lf/c/a/w0; move-result-object v0 iput-object v0, p0, Lf/c/a/c1;->a:Lf/c/a/w0; iput-object p1, p0, Lf/c/a/c1;->b:Landroid/content/Context; iput-object p2, p0, Lf/c/a/c1;->c:Lf/c/a/d1; new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean; const/4 p2, 0x1 invoke-direct {p1, p2}, Ljava/util/concurrent/atomic/AtomicBoolean;->(Z)V iput-object p1, p0, Lf/c/a/c1;->d:Ljava/util/concurrent/atomic/AtomicBoolean; return-void .end method # virtual methods .method public a()V .locals 17 move-object/from16 v1, p0 iget-object v0, v1, Lf/c/a/c1;->d:Ljava/util/concurrent/atomic/AtomicBoolean; invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z move-result v0 const/4 v2, 0x0 if-nez v0, :cond_0 iget-object v0, v1, Lf/c/a/c1;->a:Lf/c/a/w0; new-array v2, v2, [Ljava/lang/Object; const-string v3, "Should not try to read Install referrer Huawei" invoke-interface {v0, v3, v2}, Lf/c/a/w0;->f(Ljava/lang/String;[Ljava/lang/Object;)V return-void :cond_0 iget-object v0, v1, Lf/c/a/c1;->b:Landroid/content/Context; const-string v3, "com.huawei.appmarket.commondata" invoke-static {v0, v3}, Lf/c/a/e2;->F(Landroid/content/Context;Ljava/lang/String;)Z move-result v0 if-nez v0, :cond_1 return-void :cond_1 const/4 v3, 0x0 const-string v0, "content://com.huawei.appmarket.commondata/item/5" invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri; move-result-object v0 iget-object v4, v1, Lf/c/a/c1;->b:Landroid/content/Context; invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver; move-result-object v4 const/4 v10, 0x1 new-array v8, v10, [Ljava/lang/String; iget-object v5, v1, Lf/c/a/c1;->b:Landroid/content/Context; invoke-virtual {v5}, Landroid/content/Context;->getPackageName()Ljava/lang/String; move-result-object v5 aput-object v5, v8, v2 const/4 v6, 0x0 const/4 v7, 0x0 const/4 v9, 0x0 move-object v5, v0 :try_start_0 invoke-virtual/range {v4 .. v9}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor; move-result-object v3 const/4 v4, 0x2 if-eqz v3, :cond_2 invoke-interface {v3}, Landroid/database/Cursor;->moveToFirst()Z move-result v5 if-eqz v5, :cond_2 invoke-interface {v3, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String; move-result-object v12 invoke-interface {v3, v10}, Landroid/database/Cursor;->getString(I)Ljava/lang/String; move-result-object v0 invoke-interface {v3, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String; move-result-object v5 iget-object v6, v1, Lf/c/a/c1;->a:Lf/c/a/w0; const-string v7, "InstallReferrerHuawei reads referrer[%s] clickTime[%s] installTime[%s]" const/4 v8, 0x3 new-array v8, v8, [Ljava/lang/Object; aput-object v12, v8, v2 aput-object v0, v8, v10 aput-object v5, v8, v4 invoke-interface {v6, v7, v8}, Lf/c/a/w0;->f(Ljava/lang/String;[Ljava/lang/Object;)V invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J move-result-wide v13 invoke-static {v5}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J move-result-wide v15 iget-object v11, v1, Lf/c/a/c1;->c:Lf/c/a/d1; invoke-interface/range {v11 .. v16}, Lf/c/a/d1;->a(Ljava/lang/String;JJ)V goto :goto_0 :cond_2 iget-object v5, v1, Lf/c/a/c1;->a:Lf/c/a/w0; const-string v6, "InstallReferrerHuawei fail to read referrer for package [%s] and content uri [%s]" new-array v4, v4, [Ljava/lang/Object; iget-object v7, v1, Lf/c/a/c1;->b:Landroid/content/Context; invoke-virtual {v7}, Landroid/content/Context;->getPackageName()Ljava/lang/String; move-result-object v7 aput-object v7, v4, v2 invoke-virtual {v0}, Landroid/net/Uri;->toString()Ljava/lang/String; move-result-object v0 aput-object v0, v4, v10 invoke-interface {v5, v6, v4}, Lf/c/a/w0;->f(Ljava/lang/String;[Ljava/lang/Object;)V :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :goto_0 if-eqz v3, :cond_3 goto :goto_1 :catchall_0 move-exception v0 goto :goto_2 :catch_0 move-exception v0 :try_start_1 iget-object v4, v1, Lf/c/a/c1;->a:Lf/c/a/w0; const-string v5, "InstallReferrerHuawei error [%s]" new-array v6, v10, [Ljava/lang/Object; invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String; move-result-object v0 aput-object v0, v6, v2 invoke-interface {v4, v5, v6}, Lf/c/a/w0;->f(Ljava/lang/String;[Ljava/lang/Object;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 if-eqz v3, :cond_3 :goto_1 invoke-interface {v3}, Landroid/database/Cursor;->close()V :cond_3 iget-object v0, v1, Lf/c/a/c1;->d:Ljava/util/concurrent/atomic/AtomicBoolean; invoke-virtual {v0, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V return-void :goto_2 if-eqz v3, :cond_4 invoke-interface {v3}, Landroid/database/Cursor;->close()V :cond_4 throw v0 .end method