2021-12-17 21:59:34 +00:00
package b.i.a.f.i.b ;
2021-08-03 07:33:18 +00:00
import android.app.job.JobInfo ;
import android.app.job.JobScheduler ;
import android.content.ComponentName ;
import android.content.ContentValues ;
import android.content.Context ;
import android.content.IntentFilter ;
import android.content.pm.ApplicationInfo ;
import android.content.pm.PackageInfo ;
import android.content.pm.PackageManager ;
import android.database.Cursor ;
import android.database.sqlite.SQLiteDatabase ;
import android.database.sqlite.SQLiteException ;
import android.net.Uri ;
import android.os.Build ;
import android.os.Bundle ;
import android.os.PersistableBundle ;
import android.os.SystemClock ;
import android.provider.Settings ;
import android.text.TextUtils ;
import android.util.Log ;
import android.util.Pair ;
import androidx.annotation.NonNull ;
import androidx.annotation.WorkerThread ;
import androidx.collection.ArrayMap ;
2021-12-17 21:59:34 +00:00
import b.c.a.a0.d ;
import b.i.a.f.e.o.c ;
import b.i.a.f.e.p.b ;
import b.i.a.f.h.l.a1 ;
import b.i.a.f.h.l.a4 ;
import b.i.a.f.h.l.c1 ;
import b.i.a.f.h.l.d1 ;
import b.i.a.f.h.l.da ;
import b.i.a.f.h.l.e1 ;
import b.i.a.f.h.l.ea ;
import b.i.a.f.h.l.hb ;
import b.i.a.f.h.l.i1 ;
import b.i.a.f.h.l.m9 ;
import b.i.a.f.h.l.o8 ;
import b.i.a.f.h.l.p9 ;
import b.i.a.f.h.l.t8 ;
import b.i.a.f.h.l.u0 ;
import b.i.a.f.h.l.u4 ;
import b.i.a.f.h.l.x7 ;
2021-08-03 07:33:18 +00:00
import com.google.android.gms.measurement.internal.zzap ;
import com.google.android.gms.measurement.internal.zzaq ;
import com.google.android.gms.measurement.internal.zzku ;
import com.google.android.gms.measurement.internal.zzn ;
import com.google.android.gms.measurement.internal.zzz ;
2021-08-09 22:51:56 +00:00
import com.google.android.material.shadow.ShadowDrawableWrapper ;
2021-08-03 07:33:18 +00:00
import java.io.File ;
import java.io.FileNotFoundException ;
import java.io.IOException ;
import java.io.RandomAccessFile ;
import java.lang.reflect.InvocationTargetException ;
import java.lang.reflect.Method ;
import java.math.BigInteger ;
import java.net.MalformedURLException ;
import java.net.URL ;
import java.nio.ByteBuffer ;
import java.nio.channels.FileChannel ;
import java.nio.channels.FileLock ;
import java.nio.channels.OverlappingFileLockException ;
import java.util.ArrayList ;
import java.util.Collections ;
import java.util.HashMap ;
import java.util.Iterator ;
import java.util.List ;
import java.util.Locale ;
import java.util.Map ;
import java.util.Objects ;
/* compiled from: com.google.android.gms:play-services-measurement@@18.0.0 */
2022-03-07 09:34:54 +00:00
/* loaded from: classes3.dex */
2021-08-03 07:33:18 +00:00
public class k9 implements t5 {
public static volatile k9 a ;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public p4 f1539b ;
2021-12-17 21:59:34 +00:00
public x3 c ;
2021-08-03 07:33:18 +00:00
public g d ;
public b4 e ;
public h9 f ;
public ba g ;
public final q9 h ;
public g7 i ;
public q8 j ;
public final u4 k ;
public boolean m ;
public long n ;
public List < Runnable > o ;
public int p ;
public int q ;
2021-11-02 06:38:17 +00:00
public boolean r ;
2021-08-03 07:33:18 +00:00
2021-11-02 06:38:17 +00:00
/* renamed from: s reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public boolean f1540s ;
2021-08-03 07:33:18 +00:00
public boolean t ;
public FileLock u ;
public FileChannel v ;
2021-11-02 06:38:17 +00:00
public List < Long > w ;
2021-08-03 07:33:18 +00:00
/* renamed from: x reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public List < Long > f1541x ;
2022-03-07 09:34:54 +00:00
public boolean l = false ;
public final v9 A = new n9 ( this ) ;
2021-08-03 07:33:18 +00:00
/* renamed from: y reason: collision with root package name */
2022-03-07 09:34:54 +00:00
public long f1542y = - 1 ;
2021-08-03 07:33:18 +00:00
/* renamed from: z reason: collision with root package name */
2022-03-07 09:34:54 +00:00
public final Map < String , d > f1543z = new HashMap ( ) ;
2021-08-03 07:33:18 +00:00
/* compiled from: com.google.android.gms:play-services-measurement@@18.0.0 */
2022-03-07 09:34:54 +00:00
/* loaded from: classes3.dex */
2021-08-03 07:33:18 +00:00
public class a {
public e1 a ;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public List < Long > f1544b ;
2021-12-17 21:59:34 +00:00
public List < a1 > c ;
2021-08-03 07:33:18 +00:00
public long d ;
public a ( k9 k9Var , j9 j9Var ) {
}
public final void a ( e1 e1Var ) {
this . a = e1Var ;
}
public final boolean b ( long j , a1 a1Var ) {
2021-12-17 21:59:34 +00:00
if ( this . c = = null ) {
this . c = new ArrayList ( ) ;
2021-08-03 07:33:18 +00:00
}
2022-01-27 07:52:47 +00:00
if ( this . f1544b = = null ) {
this . f1544b = new ArrayList ( ) ;
2021-08-03 07:33:18 +00:00
}
2021-12-17 21:59:34 +00:00
if ( this . c . size ( ) > 0 & & ( ( this . c . get ( 0 ) . H ( ) / 1000 ) / 60 ) / 60 ! = ( ( a1Var . H ( ) / 1000 ) / 60 ) / 60 ) {
2021-08-03 07:33:18 +00:00
return false ;
}
2022-03-07 09:34:54 +00:00
long g = this . d + a1Var . g ( ) ;
if ( g > = Math . max ( 0 , p . i . a ( null ) . intValue ( ) ) ) {
2021-08-03 07:33:18 +00:00
return false ;
}
this . d = g ;
2021-12-17 21:59:34 +00:00
this . c . add ( a1Var ) ;
2022-01-27 07:52:47 +00:00
this . f1544b . add ( Long . valueOf ( j ) ) ;
2021-12-17 21:59:34 +00:00
return this . c . size ( ) < Math . max ( 1 , p . j . a ( null ) . intValue ( ) ) ;
2021-08-03 07:33:18 +00:00
}
}
public k9 ( r9 r9Var ) {
2021-12-17 21:59:34 +00:00
u4 b2 = u4 . b ( r9Var . a , null , null ) ;
this . k = b2 ;
2021-08-03 07:33:18 +00:00
q9 q9Var = new q9 ( this ) ;
q9Var . o ( ) ;
this . h = q9Var ;
x3 x3Var = new x3 ( this ) ;
x3Var . o ( ) ;
2021-12-17 21:59:34 +00:00
this . c = x3Var ;
2021-08-03 07:33:18 +00:00
p4 p4Var = new p4 ( this ) ;
p4Var . o ( ) ;
2022-01-27 07:52:47 +00:00
this . f1539b = p4Var ;
2021-12-17 21:59:34 +00:00
b2 . f ( ) . v ( new j9 ( this , r9Var ) ) ;
2021-08-03 07:33:18 +00:00
}
public static void C ( i9 i9Var ) {
if ( i9Var = = null ) {
throw new IllegalStateException ( " Upload Component not created " ) ;
2021-12-17 21:59:34 +00:00
} else if ( ! i9Var . c ) {
2021-08-03 07:33:18 +00:00
String valueOf = String . valueOf ( i9Var . getClass ( ) ) ;
2021-12-17 21:59:34 +00:00
throw new IllegalStateException ( b . d . b . a . a . i ( valueOf . length ( ) + 27 , " Component not initialized: " , valueOf ) ) ;
2021-08-03 07:33:18 +00:00
}
}
public static k9 b ( Context context ) {
Objects . requireNonNull ( context , " null reference " ) ;
Objects . requireNonNull ( context . getApplicationContext ( ) , " null reference " ) ;
if ( a = = null ) {
synchronized ( k9 . class ) {
if ( a = = null ) {
a = new k9 ( new r9 ( context ) ) ;
}
}
}
return a ;
}
public static void d ( a1 . a aVar , int i , String str ) {
List < c1 > v = aVar . v ( ) ;
for ( int i2 = 0 ; i2 < v . size ( ) ; i2 + + ) {
if ( " _err " . equals ( v . get ( i2 ) . B ( ) ) ) {
return ;
}
}
c1 . a Q = c1 . Q ( ) ;
Q . s ( " _err " ) ;
2022-03-07 09:34:54 +00:00
Q . r ( Long . valueOf ( i ) . longValue ( ) ) ;
2021-08-03 07:33:18 +00:00
c1 c1Var = ( c1 ) ( ( u4 ) Q . p ( ) ) ;
c1 . a Q2 = c1 . Q ( ) ;
Q2 . s ( " _ev " ) ;
Q2 . t ( str ) ;
c1 c1Var2 = ( c1 ) ( ( u4 ) Q2 . p ( ) ) ;
2021-12-02 18:53:44 +00:00
if ( aVar . l ) {
2021-08-03 07:33:18 +00:00
aVar . n ( ) ;
2021-12-02 18:53:44 +00:00
aVar . l = false ;
2021-08-03 07:33:18 +00:00
}
2021-12-02 18:53:44 +00:00
a1 . A ( ( a1 ) aVar . k , c1Var ) ;
if ( aVar . l ) {
2021-08-03 07:33:18 +00:00
aVar . n ( ) ;
2021-12-02 18:53:44 +00:00
aVar . l = false ;
2021-08-03 07:33:18 +00:00
}
2021-12-02 18:53:44 +00:00
a1 . A ( ( a1 ) aVar . k , c1Var2 ) ;
2021-08-03 07:33:18 +00:00
}
public static void e ( a1 . a aVar , @NonNull String str ) {
List < c1 > v = aVar . v ( ) ;
for ( int i = 0 ; i < v . size ( ) ; i + + ) {
if ( str . equals ( v . get ( i ) . B ( ) ) ) {
aVar . x ( i ) ;
return ;
}
}
}
public final void A ( a1 . a aVar , a1 . a aVar2 ) {
2021-11-05 06:48:17 +00:00
d . l ( " _e " . equals ( aVar . y ( ) ) ) ;
2021-08-03 07:33:18 +00:00
N ( ) ;
2021-11-02 06:38:17 +00:00
c1 w = q9 . w ( ( a1 ) ( ( u4 ) aVar . p ( ) ) , " _et " ) ;
if ( w . I ( ) & & w . J ( ) > 0 ) {
long J = w . J ( ) ;
2021-08-03 07:33:18 +00:00
N ( ) ;
2021-11-02 06:38:17 +00:00
c1 w2 = q9 . w ( ( a1 ) ( ( u4 ) aVar2 . p ( ) ) , " _et " ) ;
if ( w2 ! = null & & w2 . J ( ) > 0 ) {
J + = w2 . J ( ) ;
2021-08-03 07:33:18 +00:00
}
N ( ) ;
q9 . E ( aVar2 , " _et " , Long . valueOf ( J ) ) ;
N ( ) ;
q9 . E ( aVar , " _fr " , 1L ) ;
}
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void B ( zzaq zzaqVar , zzn zznVar ) {
2021-08-03 07:33:18 +00:00
if ( ea . b ( ) & & this . k . h . o ( p . A0 ) ) {
2022-03-07 09:34:54 +00:00
u3 b2 = u3 . b ( zzaqVar ) ;
this . k . t ( ) . H ( b2 . d , K ( ) . h0 ( zznVar . j ) ) ;
this . k . t ( ) . Q ( b2 , this . k . h . m ( zznVar . j ) ) ;
zzaqVar = b2 . a ( ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( this . k . h . o ( p . f1553e0 ) & & " _cmp " . equals ( zzaqVar . j ) & & " referrer API v2 " . equals ( zzaqVar . k . j . getString ( " _cis " ) ) ) {
String string = zzaqVar . k . j . getString ( " gclid " ) ;
2021-08-03 07:33:18 +00:00
if ( ! TextUtils . isEmpty ( string ) ) {
2022-03-07 09:34:54 +00:00
o ( new zzku ( " _lgclid " , zzaqVar . m , string , " auto " ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
l ( zzaqVar , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void D ( zzku zzkuVar , zzn zznVar ) {
2021-08-03 07:33:18 +00:00
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
if ( L ( zznVar ) ) {
if ( ! zznVar . q ) {
G ( zznVar ) ;
} else if ( ! " _npa " . equals ( zzkuVar . k ) | | zznVar . B = = null ) {
this . k . g ( ) . m . b ( " Removing user property " , this . k . u ( ) . y ( zzkuVar . k ) ) ;
2021-08-03 07:33:18 +00:00
K ( ) . b0 ( ) ;
try {
2022-03-07 09:34:54 +00:00
G ( zznVar ) ;
K ( ) . V ( zznVar . j , zzkuVar . k ) ;
2021-08-03 07:33:18 +00:00
K ( ) . s ( ) ;
2022-03-07 09:34:54 +00:00
this . k . g ( ) . m . b ( " User property removed " , this . k . u ( ) . y ( zzkuVar . k ) ) ;
2021-08-03 07:33:18 +00:00
} finally {
K ( ) . e0 ( ) ;
}
} else {
this . k . g ( ) . m . a ( " Falling back to manifest metadata value for ad personalization " ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2022-03-07 09:34:54 +00:00
o ( new zzku ( " _npa " , System . currentTimeMillis ( ) , Long . valueOf ( zznVar . B . booleanValue ( ) ? 1L : 0L ) , " auto " ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
}
}
2022-03-07 09:34:54 +00:00
/* JADX WARN: Can't wrap try/catch for region: R(7:158|97|(2:101|(8:103|(3:105|(2:107|(1:109))(1:110)|111)(1:112)|113|(1:115)(1:116)|117|164|119|(4:123|(1:125)|126|(1:128))))|118|164|119|(0)) */
/ * JADX WARN : Code restructure failed : missing block : B : 120 : 0x039d , code lost :
r0 = move - exception ;
* /
/ * JADX WARN : Code restructure failed : missing block : B : 121 : 0x039e , code lost :
r22 . k . g ( ) . f . c ( " Application info is null, first open report might be inaccurate. appId " , b . i . a . f . i . b . q3 . s ( r23 . j ) , r0 ) ;
r14 = r18 ;
* /
2021-08-03 07:33:18 +00:00
/* JADX WARN: Multi-variable type inference failed */
2022-03-07 09:34:54 +00:00
/* JADX WARN: Removed duplicated region for block: B:123:0x03b5 A[Catch: all -> 0x04b4, TryCatch #2 {all -> 0x04b4, blocks: (B:24:0x00ad, B:26:0x00bb, B:30:0x00c9, B:32:0x00cd, B:36:0x00dc, B:38:0x00f6, B:40:0x0100, B:43:0x0109, B:44:0x0119, B:46:0x0125, B:48:0x013c, B:49:0x0162, B:51:0x01b4, B:53:0x01c5, B:56:0x01d8, B:58:0x01e3, B:62:0x01f0, B:64:0x01fb, B:66:0x0201, B:70:0x0210, B:72:0x0213, B:74:0x0238, B:76:0x023d, B:79:0x024d, B:82:0x025e, B:85:0x0273, B:87:0x02cb, B:89:0x02d7, B:91:0x02db, B:92:0x02de, B:94:0x02fd, B:97:0x0317, B:99:0x0328, B:101:0x033f, B:103:0x0347, B:105:0x034f, B:109:0x0361, B:110:0x0367, B:113:0x036f, B:117:0x037a, B:119:0x038d, B:121:0x039e, B:123:0x03b5, B:125:0x03bb, B:126:0x03c0, B:128:0x03c6, B:131:0x03d1, B:132:0x03d4, B:135:0x03f0, B:137:0x0423, B:139:0x042b, B:141:0x042f, B:142:0x0432, B:143:0x0446, B:145:0x0454, B:147:0x046c, B:148:0x0473, B:149:0x0488, B:151:0x048c, B:152:0x04a5), top: B:162:0x00ad, inners: #0, #1, #3 }] */
/* JADX WARN: Removed duplicated region for block: B:149:0x0488 A[Catch: all -> 0x04b4, TryCatch #2 {all -> 0x04b4, blocks: (B:24:0x00ad, B:26:0x00bb, B:30:0x00c9, B:32:0x00cd, B:36:0x00dc, B:38:0x00f6, B:40:0x0100, B:43:0x0109, B:44:0x0119, B:46:0x0125, B:48:0x013c, B:49:0x0162, B:51:0x01b4, B:53:0x01c5, B:56:0x01d8, B:58:0x01e3, B:62:0x01f0, B:64:0x01fb, B:66:0x0201, B:70:0x0210, B:72:0x0213, B:74:0x0238, B:76:0x023d, B:79:0x024d, B:82:0x025e, B:85:0x0273, B:87:0x02cb, B:89:0x02d7, B:91:0x02db, B:92:0x02de, B:94:0x02fd, B:97:0x0317, B:99:0x0328, B:101:0x033f, B:103:0x0347, B:105:0x034f, B:109:0x0361, B:110:0x0367, B:113:0x036f, B:117:0x037a, B:119:0x038d, B:121:0x039e, B:123:0x03b5, B:125:0x03bb, B:126:0x03c0, B:128:0x03c6, B:131:0x03d1, B:132:0x03d4, B:135:0x03f0, B:137:0x0423, B:139:0x042b, B:141:0x042f, B:142:0x0432, B:143:0x0446, B:145:0x0454, B:147:0x046c, B:148:0x0473, B:149:0x0488, B:151:0x048c, B:152:0x04a5), top: B:162:0x00ad, inners: #0, #1, #3 }] */
/* JADX WARN: Removed duplicated region for block: B:46:0x0125 A[Catch: all -> 0x04b4, TryCatch #2 {all -> 0x04b4, blocks: (B:24:0x00ad, B:26:0x00bb, B:30:0x00c9, B:32:0x00cd, B:36:0x00dc, B:38:0x00f6, B:40:0x0100, B:43:0x0109, B:44:0x0119, B:46:0x0125, B:48:0x013c, B:49:0x0162, B:51:0x01b4, B:53:0x01c5, B:56:0x01d8, B:58:0x01e3, B:62:0x01f0, B:64:0x01fb, B:66:0x0201, B:70:0x0210, B:72:0x0213, B:74:0x0238, B:76:0x023d, B:79:0x024d, B:82:0x025e, B:85:0x0273, B:87:0x02cb, B:89:0x02d7, B:91:0x02db, B:92:0x02de, B:94:0x02fd, B:97:0x0317, B:99:0x0328, B:101:0x033f, B:103:0x0347, B:105:0x034f, B:109:0x0361, B:110:0x0367, B:113:0x036f, B:117:0x037a, B:119:0x038d, B:121:0x039e, B:123:0x03b5, B:125:0x03bb, B:126:0x03c0, B:128:0x03c6, B:131:0x03d1, B:132:0x03d4, B:135:0x03f0, B:137:0x0423, B:139:0x042b, B:141:0x042f, B:142:0x0432, B:143:0x0446, B:145:0x0454, B:147:0x046c, B:148:0x0473, B:149:0x0488, B:151:0x048c, B:152:0x04a5), top: B:162:0x00ad, inners: #0, #1, #3 }] */
/* JADX WARN: Removed duplicated region for block: B:56:0x01d8 A[Catch: all -> 0x04b4, TryCatch #2 {all -> 0x04b4, blocks: (B:24:0x00ad, B:26:0x00bb, B:30:0x00c9, B:32:0x00cd, B:36:0x00dc, B:38:0x00f6, B:40:0x0100, B:43:0x0109, B:44:0x0119, B:46:0x0125, B:48:0x013c, B:49:0x0162, B:51:0x01b4, B:53:0x01c5, B:56:0x01d8, B:58:0x01e3, B:62:0x01f0, B:64:0x01fb, B:66:0x0201, B:70:0x0210, B:72:0x0213, B:74:0x0238, B:76:0x023d, B:79:0x024d, B:82:0x025e, B:85:0x0273, B:87:0x02cb, B:89:0x02d7, B:91:0x02db, B:92:0x02de, B:94:0x02fd, B:97:0x0317, B:99:0x0328, B:101:0x033f, B:103:0x0347, B:105:0x034f, B:109:0x0361, B:110:0x0367, B:113:0x036f, B:117:0x037a, B:119:0x038d, B:121:0x039e, B:123:0x03b5, B:125:0x03bb, B:126:0x03c0, B:128:0x03c6, B:131:0x03d1, B:132:0x03d4, B:135:0x03f0, B:137:0x0423, B:139:0x042b, B:141:0x042f, B:142:0x0432, B:143:0x0446, B:145:0x0454, B:147:0x046c, B:148:0x0473, B:149:0x0488, B:151:0x048c, B:152:0x04a5), top: B:162:0x00ad, inners: #0, #1, #3 }] */
/* JADX WARN: Removed duplicated region for block: B:76:0x023d A[Catch: all -> 0x04b4, TryCatch #2 {all -> 0x04b4, blocks: (B:24:0x00ad, B:26:0x00bb, B:30:0x00c9, B:32:0x00cd, B:36:0x00dc, B:38:0x00f6, B:40:0x0100, B:43:0x0109, B:44:0x0119, B:46:0x0125, B:48:0x013c, B:49:0x0162, B:51:0x01b4, B:53:0x01c5, B:56:0x01d8, B:58:0x01e3, B:62:0x01f0, B:64:0x01fb, B:66:0x0201, B:70:0x0210, B:72:0x0213, B:74:0x0238, B:76:0x023d, B:79:0x024d, B:82:0x025e, B:85:0x0273, B:87:0x02cb, B:89:0x02d7, B:91:0x02db, B:92:0x02de, B:94:0x02fd, B:97:0x0317, B:99:0x0328, B:101:0x033f, B:103:0x0347, B:105:0x034f, B:109:0x0361, B:110:0x0367, B:113:0x036f, B:117:0x037a, B:119:0x038d, B:121:0x039e, B:123:0x03b5, B:125:0x03bb, B:126:0x03c0, B:128:0x03c6, B:131:0x03d1, B:132:0x03d4, B:135:0x03f0, B:137:0x0423, B:139:0x042b, B:141:0x042f, B:142:0x0432, B:143:0x0446, B:145:0x0454, B:147:0x046c, B:148:0x0473, B:149:0x0488, B:151:0x048c, B:152:0x04a5), top: B:162:0x00ad, inners: #0, #1, #3 }] */
/* JADX WARN: Removed duplicated region for block: B:77:0x024a */
/* JADX WARN: Removed duplicated region for block: B:82:0x025e A[Catch: all -> 0x04b4, TRY_LEAVE, TryCatch #2 {all -> 0x04b4, blocks: (B:24:0x00ad, B:26:0x00bb, B:30:0x00c9, B:32:0x00cd, B:36:0x00dc, B:38:0x00f6, B:40:0x0100, B:43:0x0109, B:44:0x0119, B:46:0x0125, B:48:0x013c, B:49:0x0162, B:51:0x01b4, B:53:0x01c5, B:56:0x01d8, B:58:0x01e3, B:62:0x01f0, B:64:0x01fb, B:66:0x0201, B:70:0x0210, B:72:0x0213, B:74:0x0238, B:76:0x023d, B:79:0x024d, B:82:0x025e, B:85:0x0273, B:87:0x02cb, B:89:0x02d7, B:91:0x02db, B:92:0x02de, B:94:0x02fd, B:97:0x0317, B:99:0x0328, B:101:0x033f, B:103:0x0347, B:105:0x034f, B:109:0x0361, B:110:0x0367, B:113:0x036f, B:117:0x037a, B:119:0x038d, B:121:0x039e, B:123:0x03b5, B:125:0x03bb, B:126:0x03c0, B:128:0x03c6, B:131:0x03d1, B:132:0x03d4, B:135:0x03f0, B:137:0x0423, B:139:0x042b, B:141:0x042f, B:142:0x0432, B:143:0x0446, B:145:0x0454, B:147:0x046c, B:148:0x0473, B:149:0x0488, B:151:0x048c, B:152:0x04a5), top: B:162:0x00ad, inners: #0, #1, #3 }] */
2021-08-03 07:33:18 +00:00
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
public final void E ( zzn zznVar ) {
2021-08-03 07:33:18 +00:00
a4 a4Var ;
a4 T ;
String str ;
long j ;
long j2 ;
String str2 ;
PackageInfo packageInfo ;
long j3 ;
ApplicationInfo applicationInfo ;
boolean z2 ;
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
Objects . requireNonNull ( zznVar , " null reference " ) ;
d . w ( zznVar . j ) ;
if ( L ( zznVar ) ) {
a4 T2 = K ( ) . T ( zznVar . j ) ;
if ( T2 ! = null & & TextUtils . isEmpty ( T2 . v ( ) ) & & ! TextUtils . isEmpty ( zznVar . k ) ) {
T2 . F ( 0L ) ;
2021-08-03 07:33:18 +00:00
K ( ) . I ( T2 ) ;
p4 H = H ( ) ;
2022-03-07 09:34:54 +00:00
String str3 = zznVar . j ;
2021-08-03 07:33:18 +00:00
H . b ( ) ;
2022-03-07 09:34:54 +00:00
H . g . remove ( str3 ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! zznVar . q ) {
G ( zznVar ) ;
2021-08-03 07:33:18 +00:00
return ;
}
2022-03-07 09:34:54 +00:00
long j4 = zznVar . v ;
2021-08-03 07:33:18 +00:00
if ( j4 = = 0 ) {
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
j4 = System . currentTimeMillis ( ) ;
}
j y2 = this . k . y ( ) ;
y2 . b ( ) ;
y2 . g = null ;
2022-03-07 09:34:54 +00:00
y2 . h = 0L ;
int i = zznVar . w ;
2021-08-03 07:33:18 +00:00
if ( ! ( i = = 0 | | i = = 1 ) ) {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . i . c ( " Incorrect app type, assuming installed app. appId, appType " , q3 . s ( zznVar . j ) , Integer . valueOf ( i ) ) ;
2021-08-03 07:33:18 +00:00
i = 0 ;
}
K ( ) . b0 ( ) ;
try {
2022-03-07 09:34:54 +00:00
u9 Y = K ( ) . Y ( zznVar . j , " _npa " ) ;
if ( Y ! = null & & ! " auto " . equals ( Y . f1573b ) ) {
a4Var = null ;
T = K ( ) . T ( zznVar . j ) ;
if ( T ! = null ) {
this . k . t ( ) ;
if ( t9 . d0 ( zznVar . k , T . v ( ) , zznVar . A , T . y ( ) ) ) {
this . k . g ( ) . i . b ( " New GMP App Id passed in. Removing cached database data. appId " , q3 . s ( T . o ( ) ) ) ;
g K = K ( ) ;
String o = T . o ( ) ;
K . n ( ) ;
K . b ( ) ;
d . w ( o ) ;
try {
SQLiteDatabase t = K . t ( ) ;
String [ ] strArr = { o } ;
int delete = t . delete ( " events " , " app_id=? " , strArr ) + 0 + t . delete ( " user_attributes " , " app_id=? " , strArr ) + t . delete ( " conditional_properties " , " app_id=? " , strArr ) + t . delete ( " apps " , " app_id=? " , strArr ) + t . delete ( " raw_events " , " app_id=? " , strArr ) + t . delete ( " raw_events_metadata " , " app_id=? " , strArr ) + t . delete ( " event_filters " , " app_id=? " , strArr ) + t . delete ( " property_filters " , " app_id=? " , strArr ) + t . delete ( " audience_filter_values " , " app_id=? " , strArr ) + t . delete ( " consent_settings " , " app_id=? " , strArr ) ;
if ( delete > 0 ) {
K . g ( ) . n . c ( " Deleted application data. app, records " , o , Integer . valueOf ( delete ) ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
} catch ( SQLiteException e ) {
K . g ( ) . f . c ( " Error deleting application data. appId, error " , q3 . s ( o ) , e ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
T = a4Var ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
}
if ( T ! = null ) {
2022-03-11 01:19:06 +00:00
if ( ( ( T . N ( ) = = - 2147483648L | | T . N ( ) = = zznVar . f2985s ) ? false : true ) | | ( T . N ( ) = = - 2147483648L & & T . M ( ) ! = null & & ! T . M ( ) . equals ( zznVar . l ) ) ) {
2022-03-07 09:34:54 +00:00
Bundle bundle = new Bundle ( ) ;
bundle . putString ( " _pv " , T . M ( ) ) ;
l ( new zzaq ( " _au " , new zzap ( bundle ) , " auto " , j4 ) , zznVar ) ;
G ( zznVar ) ;
if ( ( i = = 0 ? K ( ) . z ( zznVar . j , " _f " ) : i = = 1 ? K ( ) . z ( zznVar . j , " _v " ) : a4Var ) = = null ) {
long j5 = ( ( j4 / 3600000 ) + 1 ) * 3600000 ;
if ( i = = 0 ) {
o ( new zzku ( " _fot " , j4 , Long . valueOf ( j5 ) , " auto " ) , zznVar ) ;
U ( ) ;
this . k . f1569x . a ( zznVar . j ) ;
U ( ) ;
P ( ) ;
Bundle bundle2 = new Bundle ( ) ;
bundle2 . putLong ( " _c " , 1L ) ;
bundle2 . putLong ( " _r " , 1L ) ;
bundle2 . putLong ( " _uwa " , 0L ) ;
bundle2 . putLong ( " _pfo " , 0L ) ;
bundle2 . putLong ( " _sys " , 0L ) ;
bundle2 . putLong ( " _sysu " , 0L ) ;
if ( this . k . h . u ( zznVar . j , p . T ) ) {
str2 = " _et " ;
j2 = 1 ;
bundle2 . putLong ( str2 , 1L ) ;
} else {
str2 = " _et " ;
j2 = 1 ;
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2988z ) {
2022-03-07 09:34:54 +00:00
bundle2 . putLong ( " _dac " , j2 ) ;
}
g K2 = K ( ) ;
String str4 = zznVar . j ;
d . w ( str4 ) ;
K2 . b ( ) ;
K2 . n ( ) ;
long g02 = K2 . g0 ( str4 , " first_open_count " ) ;
if ( this . k . f1567b . getPackageManager ( ) = = null ) {
this . k . g ( ) . f . b ( " PackageManager is null, first open report might be inaccurate. appId " , q3 . s ( zznVar . j ) ) ;
str = str2 ;
j3 = g02 ;
} else {
try {
packageInfo = b . a ( this . k . f1567b ) . b ( zznVar . j , 0 ) ;
} catch ( PackageManager . NameNotFoundException e2 ) {
this . k . g ( ) . f . c ( " Package info is null, first open report might be inaccurate. appId " , q3 . s ( zznVar . j ) , e2 ) ;
packageInfo = a4Var ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( packageInfo ! = 0 ) {
long j6 = packageInfo . firstInstallTime ;
if ( j6 ! = 0 ) {
str = str2 ;
if ( j6 ! = packageInfo . lastUpdateTime ) {
if ( ! this . k . h . o ( p . n0 ) ) {
bundle2 . putLong ( " _uwa " , 1L ) ;
} else if ( g02 = = 0 ) {
bundle2 . putLong ( " _uwa " , 1L ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
z2 = false ;
} else {
z2 = true ;
}
j3 = g02 ;
o ( new zzku ( " _fi " , j4 , Long . valueOf ( z2 ? 1L : 0L ) , " auto " ) , zznVar ) ;
applicationInfo = b . a ( this . k . f1567b ) . a ( zznVar . j , 0 ) ;
if ( applicationInfo ! = null ) {
if ( ( applicationInfo . flags & 1 ) ! = 0 ) {
bundle2 . putLong ( " _sys " , 1L ) ;
}
if ( ( applicationInfo . flags & 128 ) ! = 0 ) {
bundle2 . putLong ( " _sysu " , 1L ) ;
2021-08-03 07:33:18 +00:00
}
}
}
}
2022-03-07 09:34:54 +00:00
str = str2 ;
j3 = g02 ;
applicationInfo = b . a ( this . k . f1567b ) . a ( zznVar . j , 0 ) ;
if ( applicationInfo ! = null ) {
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
if ( j3 > = 0 ) {
bundle2 . putLong ( " _pfo " , j3 ) ;
}
B ( new zzaq ( " _f " , new zzap ( bundle2 ) , " auto " , j4 ) , zznVar ) ;
} else {
str = " _et " ;
if ( i = = 1 ) {
o ( new zzku ( " _fvt " , j4 , Long . valueOf ( j5 ) , " auto " ) , zznVar ) ;
U ( ) ;
P ( ) ;
Bundle bundle3 = new Bundle ( ) ;
bundle3 . putLong ( " _c " , 1L ) ;
bundle3 . putLong ( " _r " , 1L ) ;
if ( this . k . h . u ( zznVar . j , p . T ) ) {
j = 1 ;
bundle3 . putLong ( str , 1L ) ;
} else {
j = 1 ;
2021-08-03 07:33:18 +00:00
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2988z ) {
2022-03-07 09:34:54 +00:00
bundle3 . putLong ( " _dac " , j ) ;
}
B ( new zzaq ( " _v " , new zzap ( bundle3 ) , " auto " , j4 ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
if ( ! this . k . h . u ( zznVar . j , p . U ) ) {
Bundle bundle4 = new Bundle ( ) ;
bundle4 . putLong ( str , 1L ) ;
if ( this . k . h . u ( zznVar . j , p . T ) ) {
bundle4 . putLong ( " _fr " , 1L ) ;
}
B ( new zzaq ( " _e " , new zzap ( bundle4 ) , " auto " , j4 ) , zznVar ) ;
}
} else if ( zznVar . r ) {
B ( new zzaq ( " _cd " , new zzap ( new Bundle ( ) ) , " auto " , j4 ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
K ( ) . s ( ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
G ( zznVar ) ;
if ( ( i = = 0 ? K ( ) . z ( zznVar . j , " _f " ) : i = = 1 ? K ( ) . z ( zznVar . j , " _v " ) : a4Var ) = = null ) {
}
K ( ) . s ( ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
Boolean bool = zznVar . B ;
2021-08-03 07:33:18 +00:00
if ( bool ! = null ) {
a4Var = null ;
2022-03-07 09:34:54 +00:00
zzku zzkuVar = new zzku ( " _npa " , j4 , Long . valueOf ( bool . booleanValue ( ) ? 1L : 0L ) , " auto " ) ;
if ( Y = = null | | ! Y . e . equals ( zzkuVar . m ) ) {
o ( zzkuVar , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
} else {
a4Var = null ;
if ( Y ! = null ) {
2022-03-07 09:34:54 +00:00
D ( new zzku ( " _npa " , j4 , null , " auto " ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
T = K ( ) . T ( zznVar . j ) ;
2021-08-03 07:33:18 +00:00
if ( T ! = null ) {
}
if ( T ! = null ) {
}
2022-03-07 09:34:54 +00:00
G ( zznVar ) ;
if ( ( i = = 0 ? K ( ) . z ( zznVar . j , " _f " ) : i = = 1 ? K ( ) . z ( zznVar . j , " _v " ) : a4Var ) = = null ) {
2021-08-03 07:33:18 +00:00
}
K ( ) . s ( ) ;
} finally {
K ( ) . e0 ( ) ;
}
}
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void F ( zzz zzzVar , zzn zznVar ) {
Objects . requireNonNull ( zzzVar , " null reference " ) ;
d . w ( zzzVar . j ) ;
Objects . requireNonNull ( zzzVar . l , " null reference " ) ;
d . w ( zzzVar . l . k ) ;
2021-08-03 07:33:18 +00:00
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
if ( L ( zznVar ) ) {
if ( ! zznVar . q ) {
G ( zznVar ) ;
2021-08-03 07:33:18 +00:00
return ;
}
K ( ) . b0 ( ) ;
try {
2022-03-07 09:34:54 +00:00
G ( zznVar ) ;
zzz Z = K ( ) . Z ( zzzVar . j , zzzVar . l . k ) ;
2021-08-03 07:33:18 +00:00
if ( Z ! = null ) {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . m . c ( " Removing conditional user property " , zzzVar . j , this . k . u ( ) . y ( zzzVar . l . k ) ) ;
K ( ) . a0 ( zzzVar . j , zzzVar . l . k ) ;
2021-12-02 18:53:44 +00:00
if ( Z . n ) {
2022-03-07 09:34:54 +00:00
K ( ) . V ( zzzVar . j , zzzVar . l . k ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
zzaq zzaqVar = zzzVar . t ;
if ( zzaqVar ! = null ) {
2021-08-03 07:33:18 +00:00
Bundle bundle = null ;
2022-03-07 09:34:54 +00:00
zzap zzapVar = zzaqVar . k ;
if ( zzapVar ! = null ) {
bundle = zzapVar . x0 ( ) ;
2021-08-03 07:33:18 +00:00
}
t9 t = this . k . t ( ) ;
2022-03-07 09:34:54 +00:00
String str = zzzVar . j ;
zzaq zzaqVar2 = zzzVar . t ;
I ( t . B ( str , zzaqVar2 . j , bundle , Z . k , zzaqVar2 . m , true , x7 . b ( ) & & this . k . h . o ( p . M0 ) ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
} else {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . i . c ( " Conditional user property doesn't exist " , q3 . s ( zzzVar . j ) , this . k . u ( ) . y ( zzzVar . l . k ) ) ;
2021-08-03 07:33:18 +00:00
}
K ( ) . s ( ) ;
} finally {
K ( ) . e0 ( ) ;
}
}
}
2022-03-07 09:34:54 +00:00
/* JADX WARN: Removed duplicated region for block: B:129:0x02bf */
/* JADX WARN: Removed duplicated region for block: B:132:0x02d1 */
/* JADX WARN: Removed duplicated region for block: B:157:0x0351 */
/* JADX WARN: Removed duplicated region for block: B:165:0x0375 */
/* JADX WARN: Removed duplicated region for block: B:168:0x0383 */
/* JADX WARN: Removed duplicated region for block: B:171:0x0391 */
/* JADX WARN: Removed duplicated region for block: B:181:0x03ce */
/* JADX WARN: Removed duplicated region for block: B:184:0x03dc */
/* JADX WARN: Removed duplicated region for block: B:187:0x03ea */
/* JADX WARN: Removed duplicated region for block: B:195:0x0407 */
2021-08-03 07:33:18 +00:00
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
public final a4 G ( zzn zznVar ) {
2021-08-03 07:33:18 +00:00
long j ;
2022-03-07 09:34:54 +00:00
String str ;
long j2 ;
2021-08-03 07:33:18 +00:00
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
Objects . requireNonNull ( zznVar , " null reference " ) ;
d . w ( zznVar . j ) ;
a4 T = K ( ) . T ( zznVar . j ) ;
2021-08-03 07:33:18 +00:00
d dVar = d . a ;
2022-03-07 09:34:54 +00:00
d h = ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) ? dVar : a ( zznVar . j ) . h ( d . b ( zznVar . F ) ) ;
String t = ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) | | h . j ( ) ) ? this . j . t ( zznVar . j ) : " " ;
2021-12-02 18:53:44 +00:00
if ( ! ( ( p9 ) m9 . j . a ( ) ) . a ( ) | | ! this . k . h . o ( p . o0 ) ) {
2021-08-03 07:33:18 +00:00
if ( t8 . b ( ) & & this . k . h . o ( p . J0 ) ) {
2022-03-07 09:34:54 +00:00
dVar = a ( zznVar . j ) . h ( d . b ( zznVar . F ) ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
boolean z2 = true ;
2021-08-03 07:33:18 +00:00
if ( T = = null ) {
2022-03-07 09:34:54 +00:00
T = new a4 ( this . k , zznVar . j ) ;
2021-08-03 07:33:18 +00:00
if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) {
T . c ( W ( ) ) ;
T . x ( t ) ;
} else {
if ( dVar . k ( ) ) {
T . c ( c ( dVar ) ) ;
}
if ( dVar . j ( ) ) {
T . x ( t ) ;
}
}
} else if ( ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) | | dVar . j ( ) ) & & ! t . equals ( T . E ( ) ) ) {
T . x ( t ) ;
if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) {
T . c ( W ( ) ) ;
} else if ( dVar . k ( ) ) {
T . c ( c ( dVar ) ) ;
}
} else if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) | | ! TextUtils . isEmpty ( T . s ( ) ) | | ! dVar . k ( ) ) {
z2 = false ;
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . equals ( zznVar . k , T . v ( ) ) ) {
T . m ( zznVar . k ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . equals ( zznVar . A , T . y ( ) ) ) {
T . q ( zznVar . A ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( da . b ( ) & & this . k . h . u ( T . o ( ) , p . f1558j0 ) & & ! TextUtils . equals ( zznVar . E , T . B ( ) ) ) {
T . u ( zznVar . E ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . t ) & & ! zznVar . t . equals ( T . H ( ) ) ) {
T . A ( zznVar . t ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
j = zznVar . n ;
if ( ! ( j = = 0 | | j = = T . P ( ) ) ) {
T . t ( zznVar . n ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . l ) & & ! zznVar . l . equals ( T . M ( ) ) ) {
T . D ( zznVar . l ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2985s ! = T . N ( ) ) {
T . p ( zznVar . f2985s ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
str = zznVar . m ;
2021-08-03 07:33:18 +00:00
if ( str ! = null & & ! str . equals ( T . O ( ) ) ) {
2022-03-07 09:34:54 +00:00
T . G ( zznVar . m ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( zznVar . o ! = T . Q ( ) ) {
T . w ( zznVar . o ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( zznVar . q ! = T . T ( ) ) {
T . e ( zznVar . q ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . p ) ) {
String str2 = zznVar . p ;
2021-08-03 07:33:18 +00:00
T . a . f ( ) . b ( ) ;
if ( ! str2 . equals ( T . D ) ) {
2022-03-07 09:34:54 +00:00
T . J ( zznVar . p ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
}
2022-03-07 09:34:54 +00:00
if ( ! this . k . h . o ( p . y0 ) & & zznVar . u ! = T . g ( ) ) {
T . R ( zznVar . u ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2986x ! = T . h ( ) ) {
T . n ( zznVar . f2986x ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2987y ! = T . i ( ) ) {
T . r ( zznVar . f2987y ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
if ( zznVar . B ! = T . j ( ) ) {
T . b ( zznVar . B ) ;
2021-08-03 07:33:18 +00:00
z2 = true ;
}
2022-03-07 09:34:54 +00:00
j2 = zznVar . C ;
if ( j2 = = 0 & & j2 ! = T . S ( ) ) {
T . z ( zznVar . C ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( z2 ) {
2021-08-03 07:33:18 +00:00
K ( ) . I ( T ) ;
}
return T ;
} else {
T . c ( c ( dVar ) ) ;
}
z2 = true ;
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . equals ( zznVar . k , T . v ( ) ) ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . equals ( zznVar . A , T . y ( ) ) ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( da . b ( ) ) {
T . u ( zznVar . E ) ;
z2 = true ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . t ) ) {
T . A ( zznVar . t ) ;
z2 = true ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
j = zznVar . n ;
if ( j = = 0 ) {
T . t ( zznVar . n ) ;
z2 = true ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . l ) ) {
T . D ( zznVar . l ) ;
z2 = true ;
2021-08-03 07:33:18 +00:00
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2985s ! = T . N ( ) ) {
2022-03-07 09:34:54 +00:00
}
str = zznVar . m ;
if ( str ! = null ) {
T . G ( zznVar . m ) ;
z2 = true ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( zznVar . o ! = T . Q ( ) ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( zznVar . q ! = T . T ( ) ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . p ) ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! this . k . h . o ( p . y0 ) ) {
T . R ( zznVar . u ) ;
z2 = true ;
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2986x ! = T . h ( ) ) {
2022-03-07 09:34:54 +00:00
}
2022-03-11 01:19:06 +00:00
if ( zznVar . f2987y ! = T . i ( ) ) {
2022-03-07 09:34:54 +00:00
}
if ( zznVar . B ! = T . j ( ) ) {
}
j2 = zznVar . C ;
if ( j2 = = 0 ) {
}
if ( z2 ) {
2021-08-03 07:33:18 +00:00
}
return T ;
}
if ( T = = null ) {
2022-03-07 09:34:54 +00:00
T = new a4 ( this . k , zznVar . j ) ;
2021-08-03 07:33:18 +00:00
if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) {
T . c ( W ( ) ) ;
T . x ( t ) ;
} else {
if ( h . k ( ) ) {
T . c ( c ( h ) ) ;
}
if ( h . j ( ) ) {
T . x ( t ) ;
}
}
} else if ( ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) | | h . j ( ) ) & & ! t . equals ( T . E ( ) ) ) {
T . x ( t ) ;
if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) {
T . c ( W ( ) ) ;
} else {
T . c ( c ( h ) ) ;
}
} else if ( t8 . b ( ) & & this . k . h . o ( p . J0 ) & & TextUtils . isEmpty ( T . s ( ) ) & & h . k ( ) ) {
T . c ( c ( h ) ) ;
}
2022-03-07 09:34:54 +00:00
T . m ( zznVar . k ) ;
T . q ( zznVar . A ) ;
2022-01-27 07:52:47 +00:00
if ( da . b ( ) & & this . k . h . u ( T . o ( ) , p . f1558j0 ) ) {
2022-03-07 09:34:54 +00:00
T . u ( zznVar . E ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . t ) ) {
T . A ( zznVar . t ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
long j3 = zznVar . n ;
2021-08-03 07:33:18 +00:00
if ( j3 ! = 0 ) {
T . t ( j3 ) ;
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( zznVar . l ) ) {
T . D ( zznVar . l ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-11 01:19:06 +00:00
T . p ( zznVar . f2985s ) ;
2022-03-07 09:34:54 +00:00
String str3 = zznVar . m ;
2021-08-03 07:33:18 +00:00
if ( str3 ! = null ) {
T . G ( str3 ) ;
}
2022-03-07 09:34:54 +00:00
T . w ( zznVar . o ) ;
T . e ( zznVar . q ) ;
if ( ! TextUtils . isEmpty ( zznVar . p ) ) {
T . J ( zznVar . p ) ;
2021-08-03 07:33:18 +00:00
}
if ( ! this . k . h . o ( p . y0 ) ) {
2022-03-07 09:34:54 +00:00
T . R ( zznVar . u ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-11 01:19:06 +00:00
T . n ( zznVar . f2986x ) ;
T . r ( zznVar . f2987y ) ;
2022-03-07 09:34:54 +00:00
T . b ( zznVar . B ) ;
T . z ( zznVar . C ) ;
2021-08-03 07:33:18 +00:00
T . a . f ( ) . b ( ) ;
if ( T . E ) {
K ( ) . I ( T ) ;
}
return T ;
}
public final p4 H ( ) {
2022-01-27 07:52:47 +00:00
C ( this . f1539b ) ;
return this . f1539b ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
/* JADX WARN: Can't wrap try/catch for region: R(13:73|(1:75)(1:76)|77|(2:79|(1:81)(6:82|83|90|(1:92)|94|(0)))|84|303|85|89|83|90|(0)|94|(0)) */
/ * JADX WARN : Code restructure failed : missing block : B : 289 : 0x0942 , code lost :
if ( r7 . e < r26 . k . a ( ) . s ( r4 . a ) ) goto L_0x0944 ;
* /
/ * JADX WARN : Code restructure failed : missing block : B : 290 : 0x0944 , code lost :
2021-08-03 07:33:18 +00:00
r5 = true ;
* /
2022-03-07 09:34:54 +00:00
/ * JADX WARN : Code restructure failed : missing block : B : 86 : 0x0280 , code lost :
r0 = move - exception ;
* /
/ * JADX WARN : Code restructure failed : missing block : B : 88 : 0x0282 , code lost :
r7 . g ( ) . z ( ) . c ( " Error pruning currencies. appId " , b . i . a . f . i . b . q3 . s ( r15 ) , r0 ) ;
* /
/* JADX WARN: Removed duplicated region for block: B:102:0x0352 A[Catch: all -> 0x099c, TryCatch #2 {all -> 0x099c, blocks: (B:37:0x013e, B:40:0x014d, B:42:0x0157, B:47:0x0163, B:54:0x0175, B:57:0x0181, B:59:0x0198, B:64:0x01b1, B:67:0x01bf, B:68:0x01dc, B:69:0x01e6, B:71:0x01ec, B:73:0x01fa, B:75:0x0202, B:76:0x0207, B:77:0x020c, B:79:0x0217, B:82:0x021e, B:84:0x0248, B:85:0x0267, B:88:0x0282, B:89:0x0293, B:90:0x02b0, B:92:0x02ba, B:96:0x02f3, B:100:0x0305, B:102:0x0352, B:104:0x0357, B:105:0x0370, B:109:0x0381, B:111:0x0396, B:113:0x039b, B:114:0x03b4, B:118:0x03d9, B:122:0x03fe, B:123:0x0417, B:126:0x0426, B:129:0x0449, B:130:0x0465, B:132:0x046f, B:134:0x047b, B:136:0x0481, B:137:0x048c, B:139:0x0498, B:140:0x04af, B:142:0x04d7, B:145:0x04f0, B:148:0x0536, B:149:0x0540, B:150:0x054e, B:152:0x0585, B:153:0x058a, B:155:0x0592, B:156:0x0597, B:158:0x059f, B:159:0x05a4, B:161:0x05ad, B:162:0x05b1, B:164:0x05be, B:165:0x05c3, B:167:0x05c9, B:169:0x05d7, B:170:0x05ee, B:172:0x05f4, B:174:0x0604, B:176:0x060e, B:178:0x0616, B:179:0x061b, B:181:0x0625, B:183:0x062f, B:185:0x0637, B:186:0x063d, B:188:0x0647, B:190:0x064f, B:191:0x0654, B:193:0x065c, B:194:0x065f, B:196:0x066e, B:197:0x0671, B:199:0x0687, B:201:0x0695, B:203:0x069b, B:205:0x06ad, B:207:0x06b1, B:209:0x06bc, B:210:0x06c7, B:212:0x06d9, B:214:0x06dd, B:216:0x06e3, B:218:0x06f3, B:220:0x0705, B:221:0x071f, B:223:0x0725, B:224:0x073c, B:225:0x073f, B:227:0x0784, B:228:0x0789, B:230:0x0791, B:232:0x0797, B:234:0x07a5, B:235:0x07a9, B:236:0x07ac, B:239:0x07b4, B:240:0x07b7, B:241:0x07b8, B:243:0x07c4, B:245:0x07d3, B:247:0x07e1, B:248:0x07e9, B:249:0x07f0, B:251:0x0800, B:253:0x080e, B:255:0x0814, B:256:0x081f, B:258:0x0854, B:259:0x0859, B:260:0x0865, B:262:0x086b, B:264:0x0879, B:266:0x087f, B:268:0x0889, B:269:0x0890, B:271:0x089a, B:272:0x08a1, B:273:0x08ac, B:275:0x08b2, B:277:0x08e1, B:278:0x08f1, B:280:0x08f9, B:281:0x08fd, B:283:0x0906, B:286:0x0913, B:288:0x0931, B:292:0x0947, B:294:0x094d, B:296:0x0951, B:297:0x0969), top: B:307:0x013e, inners: #0, #1 }] */
/* JADX WARN: Removed duplicated region for block: B:108:0x037f */
/* JADX WARN: Removed duplicated region for block: B:54:0x0175 A[Catch: all -> 0x099c, TRY_LEAVE, TryCatch #2 {all -> 0x099c, blocks: (B:37:0x013e, B:40:0x014d, B:42:0x0157, B:47:0x0163, B:54:0x0175, B:57:0x0181, B:59:0x0198, B:64:0x01b1, B:67:0x01bf, B:68:0x01dc, B:69:0x01e6, B:71:0x01ec, B:73:0x01fa, B:75:0x0202, B:76:0x0207, B:77:0x020c, B:79:0x0217, B:82:0x021e, B:84:0x0248, B:85:0x0267, B:88:0x0282, B:89:0x0293, B:90:0x02b0, B:92:0x02ba, B:96:0x02f3, B:100:0x0305, B:102:0x0352, B:104:0x0357, B:105:0x0370, B:109:0x0381, B:111:0x0396, B:113:0x039b, B:114:0x03b4, B:118:0x03d9, B:122:0x03fe, B:123:0x0417, B:126:0x0426, B:129:0x0449, B:130:0x0465, B:132:0x046f, B:134:0x047b, B:136:0x0481, B:137:0x048c, B:139:0x0498, B:140:0x04af, B:142:0x04d7, B:145:0x04f0, B:148:0x0536, B:149:0x0540, B:150:0x054e, B:152:0x0585, B:153:0x058a, B:155:0x0592, B:156:0x0597, B:158:0x059f, B:159:0x05a4, B:161:0x05ad, B:162:0x05b1, B:164:0x05be, B:165:0x05c3, B:167:0x05c9, B:169:0x05d7, B:170:0x05ee, B:172:0x05f4, B:174:0x0604, B:176:0x060e, B:178:0x0616, B:179:0x061b, B:181:0x0625, B:183:0x062f, B:185:0x0637, B:186:0x063d, B:188:0x0647, B:190:0x064f, B:191:0x0654, B:193:0x065c, B:194:0x065f, B:196:0x066e, B:197:0x0671, B:199:0x0687, B:201:0x0695, B:203:0x069b, B:205:0x06ad, B:207:0x06b1, B:209:0x06bc, B:210:0x06c7, B:212:0x06d9, B:214:0x06dd, B:216:0x06e3, B:218:0x06f3, B:220:0x0705, B:221:0x071f, B:223:0x0725, B:224:0x073c, B:225:0x073f, B:227:0x0784, B:228:0x0789, B:230:0x0791, B:232:0x0797, B:234:0x07a5, B:235:0x07a9, B:236:0x07ac, B:239:0x07b4, B:240:0x07b7, B:241:0x07b8, B:243:0x07c4, B:245:0x07d3, B:247:0x07e1, B:248:0x07e9, B:249:0x07f0, B:251:0x0800, B:253:0x080e, B:255:0x0814, B:256:0x081f, B:258:0x0854, B:259:0x0859, B:260:0x0865, B:262:0x086b, B:264:0x0879, B:266:0x087f, B:268:0x0889, B:269:0x0890, B:271:0x089a, B:272:0x08a1, B:273:0x08ac, B:275:0x08b2, B:277:0x08e1, B:278:0x08f1, B:280:0x08f9, B:281:0x08fd, B:283:0x0906, B:286:0x0913, B:288:0x0931, B:292:0x0947, B:294:0x094d, B:296:0x0951, B:297:0x0969), top: B:307:0x013e, inners: #0, #1 }] */
/* JADX WARN: Removed duplicated region for block: B:92:0x02ba A[Catch: all -> 0x099c, TryCatch #2 {all -> 0x099c, blocks: (B:37:0x013e, B:40:0x014d, B:42:0x0157, B:47:0x0163, B:54:0x0175, B:57:0x0181, B:59:0x0198, B:64:0x01b1, B:67:0x01bf, B:68:0x01dc, B:69:0x01e6, B:71:0x01ec, B:73:0x01fa, B:75:0x0202, B:76:0x0207, B:77:0x020c, B:79:0x0217, B:82:0x021e, B:84:0x0248, B:85:0x0267, B:88:0x0282, B:89:0x0293, B:90:0x02b0, B:92:0x02ba, B:96:0x02f3, B:100:0x0305, B:102:0x0352, B:104:0x0357, B:105:0x0370, B:109:0x0381, B:111:0x0396, B:113:0x039b, B:114:0x03b4, B:118:0x03d9, B:122:0x03fe, B:123:0x0417, B:126:0x0426, B:129:0x0449, B:130:0x0465, B:132:0x046f, B:134:0x047b, B:136:0x0481, B:137:0x048c, B:139:0x0498, B:140:0x04af, B:142:0x04d7, B:145:0x04f0, B:148:0x0536, B:149:0x0540, B:150:0x054e, B:152:0x0585, B:153:0x058a, B:155:0x0592, B:156:0x0597, B:158:0x059f, B:159:0x05a4, B:161:0x05ad, B:162:0x05b1, B:164:0x05be, B:165:0x05c3, B:167:0x05c9, B:169:0x05d7, B:170:0x05ee, B:172:0x05f4, B:174:0x0604, B:176:0x060e, B:178:0x0616, B:179:0x061b, B:181:0x0625, B:183:0x062f, B:185:0x0637, B:186:0x063d, B:188:0x0647, B:190:0x064f, B:191:0x0654, B:193:0x065c, B:194:0x065f, B:196:0x066e, B:197:0x0671, B:199:0x0687, B:201:0x0695, B:203:0x069b, B:205:0x06ad, B:207:0x06b1, B:209:0x06bc, B:210:0x06c7, B:212:0x06d9, B:214:0x06dd, B:216:0x06e3, B:218:0x06f3, B:220:0x0705, B:221:0x071f, B:223:0x0725, B:224:0x073c, B:225:0x073f, B:227:0x0784, B:228:0x0789, B:230:0x0791, B:232:0x0797, B:234:0x07a5, B:235:0x07a9, B:236:0x07ac, B:239:0x07b4, B:240:0x07b7, B:241:0x07b8, B:243:0x07c4, B:245:0x07d3, B:247:0x07e1, B:248:0x07e9, B:249:0x07f0, B:251:0x0800, B:253:0x080e, B:255:0x0814, B:256:0x081f, B:258:0x0854, B:259:0x0859, B:260:0x0865, B:262:0x086b, B:264:0x0879, B:266:0x087f, B:268:0x0889, B:269:0x0890, B:271:0x089a, B:272:0x08a1, B:273:0x08ac, B:275:0x08b2, B:277:0x08e1, B:278:0x08f1, B:280:0x08f9, B:281:0x08fd, B:283:0x0906, B:286:0x0913, B:288:0x0931, B:292:0x0947, B:294:0x094d, B:296:0x0951, B:297:0x0969), top: B:307:0x013e, inners: #0, #1 }] */
/* JADX WARN: Removed duplicated region for block: B:96:0x02f3 A[Catch: all -> 0x099c, TRY_LEAVE, TryCatch #2 {all -> 0x099c, blocks: (B:37:0x013e, B:40:0x014d, B:42:0x0157, B:47:0x0163, B:54:0x0175, B:57:0x0181, B:59:0x0198, B:64:0x01b1, B:67:0x01bf, B:68:0x01dc, B:69:0x01e6, B:71:0x01ec, B:73:0x01fa, B:75:0x0202, B:76:0x0207, B:77:0x020c, B:79:0x0217, B:82:0x021e, B:84:0x0248, B:85:0x0267, B:88:0x0282, B:89:0x0293, B:90:0x02b0, B:92:0x02ba, B:96:0x02f3, B:100:0x0305, B:102:0x0352, B:104:0x0357, B:105:0x0370, B:109:0x0381, B:111:0x0396, B:113:0x039b, B:114:0x03b4, B:118:0x03d9, B:122:0x03fe, B:123:0x0417, B:126:0x0426, B:129:0x0449, B:130:0x0465, B:132:0x046f, B:134:0x047b, B:136:0x0481, B:137:0x048c, B:139:0x0498, B:140:0x04af, B:142:0x04d7, B:145:0x04f0, B:148:0x0536, B:149:0x0540, B:150:0x054e, B:152:0x0585, B:153:0x058a, B:155:0x0592, B:156:0x0597, B:158:0x059f, B:159:0x05a4, B:161:0x05ad, B:162:0x05b1, B:164:0x05be, B:165:0x05c3, B:167:0x05c9, B:169:0x05d7, B:170:0x05ee, B:172:0x05f4, B:174:0x0604, B:176:0x060e, B:178:0x0616, B:179:0x061b, B:181:0x0625, B:183:0x062f, B:185:0x0637, B:186:0x063d, B:188:0x0647, B:190:0x064f, B:191:0x0654, B:193:0x065c, B:194:0x065f, B:196:0x066e, B:197:0x0671, B:199:0x0687, B:201:0x0695, B:203:0x069b, B:205:0x06ad, B:207:0x06b1, B:209:0x06bc, B:210:0x06c7, B:212:0x06d9, B:214:0x06dd, B:216:0x06e3, B:218:0x06f3, B:220:0x0705, B:221:0x071f, B:223:0x0725, B:224:0x073c, B:225:0x073f, B:227:0x0784, B:228:0x0789, B:230:0x0791, B:232:0x0797, B:234:0x07a5, B:235:0x07a9, B:236:0x07ac, B:239:0x07b4, B:240:0x07b7, B:241:0x07b8, B:243:0x07c4, B:245:0x07d3, B:247:0x07e1, B:248:0x07e9, B:249:0x07f0, B:251:0x0800, B:253:0x080e, B:255:0x0814, B:256:0x081f, B:258:0x0854, B:259:0x0859, B:260:0x0865, B:262:0x086b, B:264:0x0879, B:266:0x087f, B:268:0x0889, B:269:0x0890, B:271:0x089a, B:272:0x08a1, B:273:0x08ac, B:275:0x08b2, B:277:0x08e1, B:278:0x08f1, B:280:0x08f9, B:281:0x08fd, B:283:0x0906, B:286:0x0913, B:288:0x0931, B:292:0x0947, B:294:0x094d, B:296:0x0951, B:297:0x0969), top: B:307:0x013e, inners: #0, #1 }] */
/* JADX WARN: Removed duplicated region for block: B:99:0x0302 */
2021-08-03 07:33:18 +00:00
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
public final void I ( zzaq zzaqVar , zzn zznVar ) {
boolean z2 ;
boolean z3 ;
2021-08-03 07:33:18 +00:00
long j ;
int i ;
long intValue ;
l lVar ;
u9 Y ;
2022-03-07 09:34:54 +00:00
boolean z4 ;
2021-08-03 07:33:18 +00:00
long j2 ;
u9 u9Var ;
Long l ;
a4 T ;
2022-03-07 09:34:54 +00:00
zzaq zzaqVar2 = zzaqVar ;
d . A ( zznVar ) ;
d . w ( zznVar . j ) ;
2021-08-03 07:33:18 +00:00
long nanoTime = System . nanoTime ( ) ;
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
String str = zznVar . j ;
2021-08-03 07:33:18 +00:00
N ( ) ;
2022-03-07 09:34:54 +00:00
if ( q9 . O ( zzaqVar , zznVar ) ) {
if ( ! zznVar . q ) {
G ( zznVar ) ;
2021-08-03 07:33:18 +00:00
return ;
}
2022-03-07 09:34:54 +00:00
boolean z5 = true ;
if ( H ( ) . x ( str , zzaqVar2 . j ) ) {
this . k . g ( ) . A ( ) . c ( " Dropping blacklisted event. appId " , q3 . s ( str ) , this . k . u ( ) . u ( zzaqVar2 . j ) ) ;
2021-08-03 07:33:18 +00:00
if ( ! H ( ) . C ( str ) & & ! H ( ) . D ( str ) ) {
2022-03-07 09:34:54 +00:00
z5 = false ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( z5 | | " _err " . equals ( zzaqVar2 . j ) ) {
2021-08-03 07:33:18 +00:00
l = null ;
} else {
l = null ;
2022-03-07 09:34:54 +00:00
this . k . t ( ) . S ( this . A , str , 11 , " _ev " , zzaqVar2 . j , 0 ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( z5 & & ( T = K ( ) . T ( str ) ) ! = null & & Math . abs ( ( ( c ) this . k . i ( ) ) . a ( ) - Math . max ( T . W ( ) , T . V ( ) ) ) > p . f1562z . a ( l ) . longValue ( ) ) {
2021-08-03 07:33:18 +00:00
this . k . g ( ) . C ( ) . a ( " Fetching config for blacklisted app " ) ;
n ( T ) ;
return ;
}
return ;
}
if ( o8 . b ( ) & & this . k . a ( ) . o ( p . w0 ) ) {
2022-03-07 09:34:54 +00:00
u3 b2 = u3 . b ( zzaqVar ) ;
2021-12-17 21:59:34 +00:00
this . k . t ( ) . Q ( b2 , this . k . a ( ) . m ( str ) ) ;
2022-03-07 09:34:54 +00:00
zzaqVar2 = b2 . a ( ) ;
2021-08-03 07:33:18 +00:00
}
if ( this . k . g ( ) . x ( 2 ) ) {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . D ( ) . b ( " Logging event " , this . k . u ( ) . t ( zzaqVar2 ) ) ;
2021-08-03 07:33:18 +00:00
}
K ( ) . b0 ( ) ;
try {
2022-03-07 09:34:54 +00:00
G ( zznVar ) ;
if ( ! " ecommerce_purchase " . equals ( zzaqVar2 . j ) & & ! " purchase " . equals ( zzaqVar2 . j ) & & ! " refund " . equals ( zzaqVar2 . j ) ) {
z2 = false ;
if ( ! " _iap " . equals ( zzaqVar2 . j ) & & ! z2 ) {
z3 = false ;
if ( ! z3 ) {
String A0 = zzaqVar2 . k . A0 ( " currency " ) ;
if ( z2 ) {
double doubleValue = zzaqVar2 . k . z0 ( " value " ) . doubleValue ( ) * 1000000 . 0d ;
if ( doubleValue = = ShadowDrawableWrapper . COS_45 ) {
doubleValue = zzaqVar2 . k . y0 ( " value " ) . longValue ( ) * 1000000 . 0d ;
}
if ( doubleValue > 9 . 223372036854776E18d | | doubleValue < - 9 . 223372036854776E18d ) {
this . k . g ( ) . A ( ) . c ( " Data lost. Currency value is too big. appId " , q3 . s ( str ) , Double . valueOf ( doubleValue ) ) ;
j = nanoTime ;
i = 0 ;
z4 = false ;
if ( ! z4 ) {
K ( ) . s ( ) ;
return ;
}
} else {
j2 = Math . round ( doubleValue ) ;
if ( " refund " . equals ( zzaqVar2 . j ) ) {
j2 = - j2 ;
}
}
} else {
j2 = zzaqVar2 . k . y0 ( " value " ) . longValue ( ) ;
}
if ( ! TextUtils . isEmpty ( A0 ) ) {
String upperCase = A0 . toUpperCase ( Locale . US ) ;
if ( upperCase . matches ( " [A-Z]{3} " ) ) {
String concat = upperCase . length ( ) ! = 0 ? " _ltv_ " . concat ( upperCase ) : new String ( " _ltv_ " ) ;
u9 Y2 = K ( ) . Y ( str , concat ) ;
if ( Y2 ! = null ) {
Object obj = Y2 . e ;
if ( obj instanceof Long ) {
j = nanoTime ;
i = 0 ;
u9Var = new u9 ( str , zzaqVar2 . l , concat , ( ( c ) this . k . i ( ) ) . a ( ) , Long . valueOf ( ( ( Long ) obj ) . longValue ( ) + j2 ) ) ;
if ( ! K ( ) . M ( u9Var ) ) {
this . k . g ( ) . z ( ) . d ( " Too many unique user properties are set. Ignoring user property. appId " , q3 . s ( str ) , this . k . u ( ) . y ( u9Var . c ) , u9Var . e ) ;
this . k . t ( ) . S ( this . A , str , 9 , null , null , 0 ) ;
}
z4 = true ;
if ( ! z4 ) {
}
}
}
j = nanoTime ;
i = 0 ;
g K = K ( ) ;
int q = this . k . a ( ) . q ( str , p . E ) - 1 ;
d . w ( str ) ;
K . b ( ) ;
K . n ( ) ;
K . t ( ) . execSQL ( " delete from user_attributes where app_id=? and name in (select name from user_attributes where app_id=? and name like '_ltv_%' order by set_timestamp desc limit ?,10); " , new String [ ] { str , str , String . valueOf ( q ) } ) ;
u9Var = new u9 ( str , zzaqVar2 . l , concat , ( ( c ) this . k . i ( ) ) . a ( ) , Long . valueOf ( j2 ) ) ;
if ( ! K ( ) . M ( u9Var ) ) {
}
z4 = true ;
if ( ! z4 ) {
}
}
}
j = nanoTime ;
i = 0 ;
z4 = true ;
if ( ! z4 ) {
}
} else {
2021-08-03 07:33:18 +00:00
j = nanoTime ;
i = 0 ;
2022-03-07 09:34:54 +00:00
}
boolean X = t9 . X ( zzaqVar2 . j ) ;
boolean equals = " _err " . equals ( zzaqVar2 . j ) ;
this . k . t ( ) ;
f x2 = K ( ) . x ( V ( ) , str , t9 . v ( zzaqVar2 . k ) + 1 , true , X , false , equals , false ) ;
intValue = x2 . f1529b - p . k . a ( null ) . intValue ( ) ;
if ( intValue < = 0 ) {
if ( intValue % 1000 = = 1 ) {
this . k . g ( ) . z ( ) . c ( " Data loss. Too many events logged. appId, count " , q3 . s ( str ) , Long . valueOf ( x2 . f1529b ) ) ;
}
K ( ) . s ( ) ;
return ;
}
if ( X ) {
long intValue2 = x2 . a - p . m . a ( null ) . intValue ( ) ;
if ( intValue2 > 0 ) {
if ( intValue2 % 1000 = = 1 ) {
this . k . g ( ) . z ( ) . c ( " Data loss. Too many public events logged. appId, count " , q3 . s ( str ) , Long . valueOf ( x2 . a ) ) ;
}
this . k . t ( ) . S ( this . A , str , 16 , " _ev " , zzaqVar2 . j , 0 ) ;
K ( ) . s ( ) ;
return ;
}
}
if ( equals ) {
long max = x2 . d - Math . max ( i , Math . min ( 1000000 , this . k . a ( ) . q ( zznVar . j , p . l ) ) ) ;
if ( max > 0 ) {
if ( max = = 1 ) {
this . k . g ( ) . z ( ) . c ( " Too many error events logged. appId, count " , q3 . s ( str ) , Long . valueOf ( x2 . d ) ) ;
}
2021-08-03 07:33:18 +00:00
K ( ) . s ( ) ;
return ;
}
2022-03-07 09:34:54 +00:00
}
Bundle x0 = zzaqVar2 . k . x0 ( ) ;
this . k . t ( ) . I ( x0 , " _o " , zzaqVar2 . l ) ;
if ( this . k . t ( ) . s0 ( str ) ) {
this . k . t ( ) . I ( x0 , " _dbg " , 1L ) ;
this . k . t ( ) . I ( x0 , " _r " , 1L ) ;
}
if ( " _s " . equals ( zzaqVar2 . j ) & & ( Y = K ( ) . Y ( zznVar . j , " _sno " ) ) ! = null & & ( Y . e instanceof Long ) ) {
this . k . t ( ) . I ( x0 , " _sno " , Y . e ) ;
}
long X2 = K ( ) . X ( str ) ;
if ( X2 > 0 ) {
this . k . g ( ) . A ( ) . c ( " Data lost. Too many events stored on disk, deleted. appId " , q3 . s ( str ) , Long . valueOf ( X2 ) ) ;
}
m mVar = new m ( this . k , zzaqVar2 . l , str , zzaqVar2 . j , zzaqVar2 . m , 0L , x0 ) ;
l z6 = K ( ) . z ( str , mVar . f1546b ) ;
if ( z6 ! = null ) {
mVar = mVar . a ( this . k , z6 . f ) ;
lVar = z6 . a ( mVar . d ) ;
} else if ( K ( ) . f0 ( str ) < this . k . a ( ) . p ( str ) | | ! X ) {
lVar = new l ( str , mVar . f1546b , mVar . d ) ;
2021-08-03 07:33:18 +00:00
} else {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . z ( ) . d ( " Too many event names used, ignoring event. appId, name, supported count " , q3 . s ( str ) , this . k . u ( ) . u ( mVar . f1546b ) , Integer . valueOf ( this . k . a ( ) . p ( str ) ) ) ;
this . k . t ( ) . S ( this . A , str , 8 , null , null , 0 ) ;
return ;
}
K ( ) . H ( lVar ) ;
U ( ) ;
P ( ) ;
d . A ( mVar ) ;
d . A ( zznVar ) ;
d . w ( mVar . a ) ;
d . l ( mVar . a . equals ( zznVar . j ) ) ;
e1 . a u0 = e1 . u0 ( ) ;
u0 . q ( ) ;
u0 . x ( " android " ) ;
if ( ! TextUtils . isEmpty ( zznVar . j ) ) {
u0 . X ( zznVar . j ) ;
}
if ( ! TextUtils . isEmpty ( zznVar . m ) ) {
u0 . T ( zznVar . m ) ;
}
if ( ! TextUtils . isEmpty ( zznVar . l ) ) {
u0 . a0 ( zznVar . l ) ;
}
2022-03-11 01:19:06 +00:00
long j3 = zznVar . f2985s ;
2022-03-07 09:34:54 +00:00
if ( j3 ! = - 2147483648L ) {
u0 . c0 ( ( int ) j3 ) ;
}
u0 . W ( zznVar . n ) ;
if ( ! TextUtils . isEmpty ( zznVar . k ) ) {
u0 . m0 ( zznVar . k ) ;
}
if ( t8 . b ( ) & & this . k . a ( ) . o ( p . J0 ) ) {
u0 . w0 ( a ( zznVar . j ) . h ( d . b ( zznVar . F ) ) . d ( ) ) ;
}
if ( da . b ( ) & & this . k . a ( ) . v ( zznVar . j , p . f1558j0 ) ) {
if ( TextUtils . isEmpty ( u0 . s0 ( ) ) & & ! TextUtils . isEmpty ( zznVar . E ) ) {
u0 . u0 ( zznVar . E ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( TextUtils . isEmpty ( u0 . s0 ( ) ) & & TextUtils . isEmpty ( u0 . x0 ( ) ) & & ! TextUtils . isEmpty ( zznVar . A ) ) {
u0 . r0 ( zznVar . A ) ;
}
} else if ( TextUtils . isEmpty ( u0 . s0 ( ) ) & & ! TextUtils . isEmpty ( zznVar . A ) ) {
u0 . r0 ( zznVar . A ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
long j4 = zznVar . o ;
if ( j4 ! = 0 ) {
u0 . d0 ( j4 ) ;
}
u0 . l0 ( zznVar . C ) ;
List < Integer > U = N ( ) . U ( ) ;
if ( U ! = null ) {
u0 . M ( U ) ;
}
d h = a ( zznVar . j ) . h ( d . b ( zznVar . F ) ) ;
if ( ! t8 . b ( ) | | ! this . k . a ( ) . o ( p . J0 ) | | h . j ( ) ) {
Pair < String , Boolean > s2 = this . j . s ( zznVar . j , h ) ;
if ( ! TextUtils . isEmpty ( ( CharSequence ) s2 . first ) ) {
2022-03-11 01:19:06 +00:00
if ( zznVar . f2986x ) {
2022-03-07 09:34:54 +00:00
u0 . e0 ( ( String ) s2 . first ) ;
Object obj2 = s2 . second ;
if ( obj2 ! = null ) {
u0 . y ( ( ( Boolean ) obj2 ) . booleanValue ( ) ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-11 01:19:06 +00:00
} else if ( ! this . k . y ( ) . s ( this . k . j ( ) ) & & zznVar . f2987y & & ( ! hb . b ( ) | | ! this . k . a ( ) . v ( zznVar . j , p . G0 ) ) ) {
2022-03-07 09:34:54 +00:00
String string = Settings . Secure . getString ( this . k . j ( ) . getContentResolver ( ) , " android_id " ) ;
if ( string = = null ) {
this . k . g ( ) . A ( ) . b ( " null secure ID. appId " , q3 . s ( u0 . k0 ( ) ) ) ;
string = " null " ;
} else if ( string . isEmpty ( ) ) {
this . k . g ( ) . A ( ) . b ( " empty secure ID. appId " , q3 . s ( u0 . k0 ( ) ) ) ;
}
u0 . o0 ( string ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
}
this . k . y ( ) . o ( ) ;
u0 . J ( Build . MODEL ) ;
this . k . y ( ) . o ( ) ;
u0 . E ( Build . VERSION . RELEASE ) ;
u0 . V ( ( int ) this . k . y ( ) . t ( ) ) ;
u0 . N ( this . k . y ( ) . u ( ) ) ;
if ( ! this . k . a ( ) . o ( p . y0 ) ) {
u0 . i0 ( zznVar . u ) ;
}
if ( this . k . d ( ) ) {
if ( ! t8 . b ( ) | | ! this . k . a ( ) . o ( p . J0 ) ) {
u0 . k0 ( ) ;
} else {
u0 . k0 ( ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ! TextUtils . isEmpty ( null ) ) {
u0 . q0 ( ) ;
throw null ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
}
a4 T2 = K ( ) . T ( zznVar . j ) ;
if ( T2 = = null ) {
T2 = new a4 ( this . k , zznVar . j ) ;
if ( ! t8 . b ( ) | | ! this . k . a ( ) . o ( p . J0 ) ) {
T2 . c ( W ( ) ) ;
} else {
T2 . c ( c ( h ) ) ;
}
T2 . A ( zznVar . t ) ;
T2 . m ( zznVar . k ) ;
if ( ! t8 . b ( ) | | ! this . k . a ( ) . o ( p . J0 ) | | h . j ( ) ) {
T2 . x ( this . j . t ( zznVar . j ) ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
T2 . C ( 0L ) ;
T2 . a ( 0L ) ;
T2 . l ( 0L ) ;
T2 . D ( zznVar . l ) ;
2022-03-11 01:19:06 +00:00
T2 . p ( zznVar . f2985s ) ;
2022-03-07 09:34:54 +00:00
T2 . G ( zznVar . m ) ;
T2 . t ( zznVar . n ) ;
T2 . w ( zznVar . o ) ;
T2 . e ( zznVar . q ) ;
if ( ! this . k . a ( ) . o ( p . y0 ) ) {
T2 . R ( zznVar . u ) ;
}
T2 . z ( zznVar . C ) ;
K ( ) . I ( T2 ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( ( ! t8 . b ( ) | | ! this . k . a ( ) . o ( p . J0 ) | | h . k ( ) ) & & ! TextUtils . isEmpty ( T2 . s ( ) ) ) {
u0 . h0 ( T2 . s ( ) ) ;
}
if ( ! TextUtils . isEmpty ( T2 . H ( ) ) ) {
u0 . n0 ( T2 . H ( ) ) ;
}
List < u9 > C = K ( ) . C ( zznVar . j ) ;
for ( int i2 = 0 ; i2 < C . size ( ) ; i2 + + ) {
i1 . a L = i1 . L ( ) ;
L . r ( C . get ( i2 ) . c ) ;
L . q ( C . get ( i2 ) . d ) ;
N ( ) . G ( L , C . get ( i2 ) . e ) ;
u0 . u ( L ) ;
}
try {
long v = K ( ) . v ( ( e1 ) ( ( u4 ) u0 . p ( ) ) ) ;
g K2 = K ( ) ;
zzap zzapVar = mVar . f ;
if ( zzapVar ! = null ) {
Iterator < String > it = zzapVar . iterator ( ) ;
while ( true ) {
n nVar = ( n ) it ;
if ( nVar . hasNext ( ) ) {
if ( " _r " . equals ( ( String ) nVar . next ( ) ) ) {
break ;
}
} else {
boolean y2 = H ( ) . y ( mVar . a , mVar . f1546b ) ;
f y3 = K ( ) . y ( V ( ) , mVar . a , false , false ) ;
if ( y2 ) {
}
}
}
}
boolean z7 = false ;
if ( K2 . L ( mVar , v , z7 ) ) {
this . n = 0L ;
}
} catch ( IOException e ) {
this . k . g ( ) . z ( ) . c ( " Data loss. Failed to insert raw event metadata. appId " , q3 . s ( u0 . k0 ( ) ) , e ) ;
}
K ( ) . s ( ) ;
K ( ) . e0 ( ) ;
w ( ) ;
this . k . g ( ) . D ( ) . b ( " Background event processing time, ms " , Long . valueOf ( ( ( System . nanoTime ( ) - j ) + 500000 ) / 1000000 ) ) ;
return ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
z3 = true ;
if ( ! z3 ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
boolean X3 = t9 . X ( zzaqVar2 . j ) ;
boolean equals2 = " _err " . equals ( zzaqVar2 . j ) ;
this . k . t ( ) ;
f x22 = K ( ) . x ( V ( ) , str , t9 . v ( zzaqVar2 . k ) + 1 , true , X3 , false , equals2 , false ) ;
intValue = x22 . f1529b - p . k . a ( null ) . intValue ( ) ;
if ( intValue < = 0 ) {
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
z2 = true ;
if ( ! " _iap " . equals ( zzaqVar2 . j ) ) {
z3 = false ;
if ( ! z3 ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
boolean X32 = t9 . X ( zzaqVar2 . j ) ;
boolean equals22 = " _err " . equals ( zzaqVar2 . j ) ;
this . k . t ( ) ;
f x222 = K ( ) . x ( V ( ) , str , t9 . v ( zzaqVar2 . k ) + 1 , true , X32 , false , equals22 , false ) ;
intValue = x222 . f1529b - p . k . a ( null ) . intValue ( ) ;
if ( intValue < = 0 ) {
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
z3 = true ;
if ( ! z3 ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
boolean X322 = t9 . X ( zzaqVar2 . j ) ;
boolean equals222 = " _err " . equals ( zzaqVar2 . j ) ;
this . k . t ( ) ;
f x2222 = K ( ) . x ( V ( ) , str , t9 . v ( zzaqVar2 . k ) + 1 , true , X322 , false , equals222 , false ) ;
intValue = x2222 . f1529b - p . k . a ( null ) . intValue ( ) ;
if ( intValue < = 0 ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
} finally {
K ( ) . e0 ( ) ;
2021-08-03 07:33:18 +00:00
}
}
}
public final x3 J ( ) {
2021-12-17 21:59:34 +00:00
C ( this . c ) ;
return this . c ;
2021-08-03 07:33:18 +00:00
}
public final g K ( ) {
C ( this . d ) ;
return this . d ;
}
2022-03-07 09:34:54 +00:00
public final boolean L ( zzn zznVar ) {
return ( ! da . b ( ) | | ! this . k . h . u ( zznVar . j , p . f1558j0 ) ) ? ! TextUtils . isEmpty ( zznVar . k ) | | ! TextUtils . isEmpty ( zznVar . A ) : ! TextUtils . isEmpty ( zznVar . k ) | | ! TextUtils . isEmpty ( zznVar . E ) | | ! TextUtils . isEmpty ( zznVar . A ) ;
2021-08-03 07:33:18 +00:00
}
public final ba M ( ) {
C ( this . g ) ;
return this . g ;
}
public final q9 N ( ) {
C ( this . h ) ;
return this . h ;
}
public final o3 O ( ) {
return this . k . u ( ) ;
}
public final void P ( ) {
if ( ! this . l ) {
throw new IllegalStateException ( " UploadController is not initialized " ) ;
}
}
2022-03-07 09:34:54 +00:00
/* JADX WARN: Removed duplicated region for block: B:140:0x031d A[Catch: all -> 0x0407, TryCatch #1 {all -> 0x0407, blocks: (B:3:0x000c, B:5:0x0016, B:8:0x0029, B:10:0x002f, B:13:0x0042, B:15:0x004a, B:18:0x0053, B:23:0x005f, B:26:0x0072, B:28:0x007c, B:31:0x0092, B:33:0x00bb, B:35:0x00c1, B:36:0x00c4, B:38:0x00d4, B:39:0x00eb, B:41:0x00fb, B:43:0x0101, B:44:0x010b, B:46:0x0131, B:48:0x0137, B:50:0x0143, B:52:0x014d, B:53:0x0151, B:55:0x0157, B:57:0x016b, B:61:0x0174, B:63:0x017a, B:65:0x018e, B:67:0x0198, B:68:0x019d, B:69:0x01a0, B:71:0x01c5, B:73:0x01cb, B:75:0x01d7, B:79:0x01e4, B:81:0x01ea, B:83:0x01f6, B:88:0x0204, B:90:0x020a, B:92:0x0216, B:99:0x0227, B:101:0x024f, B:102:0x0254, B:104:0x025f, B:105:0x0264, B:107:0x026f, B:108:0x0274, B:110:0x027d, B:112:0x0281, B:113:0x0286, B:114:0x028d, B:116:0x0293, B:119:0x02a1, B:121:0x02a5, B:122:0x02aa, B:124:0x02b5, B:125:0x02ba, B:127:0x02c3, B:129:0x02c7, B:130:0x02cc, B:131:0x02d3, B:133:0x02df, B:135:0x02f7, B:136:0x02fc, B:137:0x0303, B:138:0x030e, B:140:0x031d, B:142:0x032f, B:143:0x0347, B:147:0x0355, B:149:0x035c, B:150:0x036a, B:151:0x0373, B:153:0x0382, B:154:0x038e, B:155:0x03c4, B:156:0x03d6, B:158:0x03f4, B:160:0x03fe), top: B:168:0x000c, inners: #0 }] */
/* JADX WARN: Removed duplicated region for block: B:141:0x032e */
/* JADX WARN: Removed duplicated region for block: B:145:0x0352 */
/* JADX WARN: Removed duplicated region for block: B:146:0x0354 */
/* JADX WARN: Removed duplicated region for block: B:149:0x035c A[Catch: MalformedURLException -> 0x03c4, all -> 0x0407, TryCatch #0 {MalformedURLException -> 0x03c4, blocks: (B:143:0x0347, B:147:0x0355, B:149:0x035c, B:150:0x036a, B:151:0x0373, B:153:0x0382, B:154:0x038e), top: B:166:0x0347, outer: #1 }] */
/* JADX WARN: Removed duplicated region for block: B:150:0x036a A[Catch: MalformedURLException -> 0x03c4, all -> 0x0407, TryCatch #0 {MalformedURLException -> 0x03c4, blocks: (B:143:0x0347, B:147:0x0355, B:149:0x035c, B:150:0x036a, B:151:0x0373, B:153:0x0382, B:154:0x038e), top: B:166:0x0347, outer: #1 }] */
/* JADX WARN: Removed duplicated region for block: B:153:0x0382 A[Catch: MalformedURLException -> 0x03c4, all -> 0x0407, TryCatch #0 {MalformedURLException -> 0x03c4, blocks: (B:143:0x0347, B:147:0x0355, B:149:0x035c, B:150:0x036a, B:151:0x0373, B:153:0x0382, B:154:0x038e), top: B:166:0x0347, outer: #1 }] */
/* JADX WARN: Removed duplicated region for block: B:99:0x0227 A[Catch: all -> 0x0407, TryCatch #1 {all -> 0x0407, blocks: (B:3:0x000c, B:5:0x0016, B:8:0x0029, B:10:0x002f, B:13:0x0042, B:15:0x004a, B:18:0x0053, B:23:0x005f, B:26:0x0072, B:28:0x007c, B:31:0x0092, B:33:0x00bb, B:35:0x00c1, B:36:0x00c4, B:38:0x00d4, B:39:0x00eb, B:41:0x00fb, B:43:0x0101, B:44:0x010b, B:46:0x0131, B:48:0x0137, B:50:0x0143, B:52:0x014d, B:53:0x0151, B:55:0x0157, B:57:0x016b, B:61:0x0174, B:63:0x017a, B:65:0x018e, B:67:0x0198, B:68:0x019d, B:69:0x01a0, B:71:0x01c5, B:73:0x01cb, B:75:0x01d7, B:79:0x01e4, B:81:0x01ea, B:83:0x01f6, B:88:0x0204, B:90:0x020a, B:92:0x0216, B:99:0x0227, B:101:0x024f, B:102:0x0254, B:104:0x025f, B:105:0x0264, B:107:0x026f, B:108:0x0274, B:110:0x027d, B:112:0x0281, B:113:0x0286, B:114:0x028d, B:116:0x0293, B:119:0x02a1, B:121:0x02a5, B:122:0x02aa, B:124:0x02b5, B:125:0x02ba, B:127:0x02c3, B:129:0x02c7, B:130:0x02cc, B:131:0x02d3, B:133:0x02df, B:135:0x02f7, B:136:0x02fc, B:137:0x0303, B:138:0x030e, B:140:0x031d, B:142:0x032f, B:143:0x0347, B:147:0x0355, B:149:0x035c, B:150:0x036a, B:151:0x0373, B:153:0x0382, B:154:0x038e, B:155:0x03c4, B:156:0x03d6, B:158:0x03f4, B:160:0x03fe), top: B:168:0x000c, inners: #0 }] */
2021-08-03 07:33:18 +00:00
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
2021-08-03 07:33:18 +00:00
public final void Q ( ) {
a4 T ;
2022-03-07 09:34:54 +00:00
boolean z2 ;
boolean z3 ;
int i ;
String a2 ;
2021-08-03 07:33:18 +00:00
String str ;
U ( ) ;
P ( ) ;
this . t = true ;
try {
Boolean bool = this . k . x ( ) . e ;
if ( bool = = null ) {
this . k . g ( ) . i . a ( " Upload data called on the client side before use of service was decided " ) ;
} else if ( bool . booleanValue ( ) ) {
this . k . g ( ) . f . a ( " Upload called in the client side when service should be used " ) ;
} else if ( this . n > 0 ) {
w ( ) ;
} else {
U ( ) ;
2021-11-02 06:38:17 +00:00
if ( this . w ! = null ) {
2021-08-03 07:33:18 +00:00
this . k . g ( ) . n . a ( " Uploading requested multiple times " ) ;
} else if ( ! J ( ) . u ( ) ) {
this . k . g ( ) . n . a ( " Network not connected, ignoring upload request " ) ;
w ( ) ;
} else {
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
long currentTimeMillis = System . currentTimeMillis ( ) ;
int q = this . k . h . q ( null , p . Q ) ;
long longValue = currentTimeMillis - p . d . a ( null ) . longValue ( ) ;
2022-03-07 09:34:54 +00:00
for ( int i2 = 0 ; i2 < q & & t ( longValue ) ; i2 + + ) {
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
long a3 = this . k . o ( ) . f . a ( ) ;
if ( a3 ! = 0 ) {
this . k . g ( ) . m . b ( " Uploading events. Elapsed time since last upload attempt (ms) " , Long . valueOf ( Math . abs ( currentTimeMillis - a3 ) ) ) ;
2021-08-03 07:33:18 +00:00
}
String u = K ( ) . u ( ) ;
if ( ! TextUtils . isEmpty ( u ) ) {
2022-01-27 07:52:47 +00:00
if ( this . f1542y = = - 1 ) {
this . f1542y = K ( ) . j0 ( ) ;
2021-08-03 07:33:18 +00:00
}
List < Pair < e1 , Long > > D = K ( ) . D ( u , this . k . h . q ( u , p . g ) , Math . max ( 0 , this . k . h . q ( u , p . h ) ) ) ;
if ( ! D . isEmpty ( ) ) {
if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) | | a ( u ) . j ( ) ) {
Iterator < Pair < e1 , Long > > it = D . iterator ( ) ;
while ( true ) {
if ( ! it . hasNext ( ) ) {
str = null ;
break ;
}
e1 e1Var = ( e1 ) it . next ( ) . first ;
if ( ! TextUtils . isEmpty ( e1Var . J ( ) ) ) {
str = e1Var . J ( ) ;
break ;
}
}
if ( str ! = null ) {
2022-03-07 09:34:54 +00:00
int i3 = 0 ;
2021-08-03 07:33:18 +00:00
while ( true ) {
2022-03-07 09:34:54 +00:00
if ( i3 > = D . size ( ) ) {
2021-08-03 07:33:18 +00:00
break ;
}
2022-03-07 09:34:54 +00:00
e1 e1Var2 = ( e1 ) D . get ( i3 ) . first ;
2021-08-03 07:33:18 +00:00
if ( ! ( TextUtils . isEmpty ( e1Var2 . J ( ) ) | | e1Var2 . J ( ) . equals ( str ) ) ) {
2022-03-07 09:34:54 +00:00
D = D . subList ( 0 , i3 ) ;
2021-08-03 07:33:18 +00:00
break ;
}
2022-03-07 09:34:54 +00:00
i3 + + ;
2021-08-03 07:33:18 +00:00
}
}
}
d1 . a x2 = d1 . x ( ) ;
int size = D . size ( ) ;
ArrayList arrayList = new ArrayList ( D . size ( ) ) ;
2022-03-07 09:34:54 +00:00
boolean z4 = " 1 " . equals ( this . k . h . c . h ( u , " gaia_collection_enabled " ) ) & & ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) | | a ( u ) . j ( ) ) ;
2021-08-03 07:33:18 +00:00
try {
2022-03-07 09:34:54 +00:00
if ( t8 . b ( ) & & this . k . h . o ( p . J0 ) & & ! a ( u ) . j ( ) ) {
z2 = false ;
if ( t8 . b ( ) & & this . k . h . o ( p . J0 ) & & ! a ( u ) . k ( ) ) {
z3 = false ;
i = 0 ;
while ( i < size ) {
e1 . a t = ( ( e1 ) D . get ( i ) . first ) . t ( ) ;
arrayList . add ( ( Long ) D . get ( i ) . second ) ;
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . W0 ( ( e1 ) t . k , 33025L ) ;
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . y ( ( e1 ) t . k , currentTimeMillis ) ;
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . m0 ( ( e1 ) t . k , false ) ;
if ( ! z4 ) {
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . i1 ( ( e1 ) t . k ) ;
}
if ( t8 . b ( ) & & this . k . h . o ( p . J0 ) ) {
if ( ! z2 ) {
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . F0 ( ( e1 ) t . k ) ;
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . L0 ( ( e1 ) t . k ) ;
}
if ( ! z3 ) {
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . Q0 ( ( e1 ) t . k ) ;
}
}
if ( this . k . h . u ( u , p . X ) ) {
long t2 = N ( ) . t ( ( ( e1 ) ( ( u4 ) t . p ( ) ) ) . d ( ) ) ;
if ( t . l ) {
t . n ( ) ;
t . l = false ;
}
e1 . p1 ( ( e1 ) t . k , t2 ) ;
}
x2 . q ( t ) ;
i + + ;
arrayList = arrayList ;
}
String z5 = ! this . k . g ( ) . x ( 2 ) ? N ( ) . z ( ( d1 ) ( ( u4 ) x2 . p ( ) ) ) : null ;
N ( ) ;
byte [ ] d = ( ( d1 ) ( ( u4 ) x2 . p ( ) ) ) . d ( ) ;
a2 = p . q . a ( null ) ;
URL url = new URL ( a2 ) ;
d . l ( arrayList . isEmpty ( ) ) ;
if ( this . w = = null ) {
this . k . g ( ) . f . a ( " Set uploading progress before finishing the previous upload " ) ;
} else {
this . w = new ArrayList ( arrayList ) ;
}
this . k . o ( ) . g . b ( currentTimeMillis ) ;
String str2 = " ? " ;
if ( size > 0 ) {
str2 = ( ( d1 ) x2 . k ) . u ( ) . G1 ( ) ;
}
this . k . g ( ) . n . d ( " Uploading data. app, uncompressed size, data " , str2 , Integer . valueOf ( d . length ) , z5 ) ;
this . f1540s = true ;
x3 J = J ( ) ;
m9 m9Var = new m9 ( this , u ) ;
J . b ( ) ;
J . n ( ) ;
J . f ( ) . x ( new c4 ( J , u , url , d , null , m9Var ) ) ;
}
z3 = true ;
i = 0 ;
while ( i < size ) {
}
if ( ! this . k . g ( ) . x ( 2 ) ) {
}
N ( ) ;
byte [ ] d2 = ( ( d1 ) ( ( u4 ) x2 . p ( ) ) ) . d ( ) ;
a2 = p . q . a ( null ) ;
URL url2 = new URL ( a2 ) ;
d . l ( arrayList . isEmpty ( ) ) ;
if ( this . w = = null ) {
}
this . k . o ( ) . g . b ( currentTimeMillis ) ;
String str22 = " ? " ;
if ( size > 0 ) {
}
this . k . g ( ) . n . d ( " Uploading data. app, uncompressed size, data " , str22 , Integer . valueOf ( d2 . length ) , z5 ) ;
this . f1540s = true ;
x3 J2 = J ( ) ;
m9 m9Var2 = new m9 ( this , u ) ;
J2 . b ( ) ;
J2 . n ( ) ;
J2 . f ( ) . x ( new c4 ( J2 , u , url2 , d2 , null , m9Var2 ) ) ;
}
if ( t8 . b ( ) ) {
z3 = false ;
i = 0 ;
while ( i < size ) {
}
if ( ! this . k . g ( ) . x ( 2 ) ) {
}
N ( ) ;
byte [ ] d22 = ( ( d1 ) ( ( u4 ) x2 . p ( ) ) ) . d ( ) ;
a2 = p . q . a ( null ) ;
URL url22 = new URL ( a2 ) ;
d . l ( arrayList . isEmpty ( ) ) ;
if ( this . w = = null ) {
}
this . k . o ( ) . g . b ( currentTimeMillis ) ;
String str222 = " ? " ;
if ( size > 0 ) {
}
this . k . g ( ) . n . d ( " Uploading data. app, uncompressed size, data " , str222 , Integer . valueOf ( d22 . length ) , z5 ) ;
this . f1540s = true ;
x3 J22 = J ( ) ;
m9 m9Var22 = new m9 ( this , u ) ;
J22 . b ( ) ;
J22 . n ( ) ;
J22 . f ( ) . x ( new c4 ( J22 , u , url22 , d22 , null , m9Var22 ) ) ;
}
URL url222 = new URL ( a2 ) ;
d . l ( arrayList . isEmpty ( ) ) ;
if ( this . w = = null ) {
}
this . k . o ( ) . g . b ( currentTimeMillis ) ;
String str2222 = " ? " ;
if ( size > 0 ) {
}
this . k . g ( ) . n . d ( " Uploading data. app, uncompressed size, data " , str2222 , Integer . valueOf ( d22 . length ) , z5 ) ;
2022-01-27 07:52:47 +00:00
this . f1540s = true ;
2022-03-07 09:34:54 +00:00
x3 J222 = J ( ) ;
m9 m9Var222 = new m9 ( this , u ) ;
J222 . b ( ) ;
J222 . n ( ) ;
J222 . f ( ) . x ( new c4 ( J222 , u , url222 , d22 , null , m9Var222 ) ) ;
2021-08-03 07:33:18 +00:00
} catch ( MalformedURLException unused ) {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . f . c ( " Failed to parse upload URL. Not uploading. appId " , q3 . s ( u ) , a2 ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
z2 = true ;
z3 = true ;
i = 0 ;
while ( i < size ) {
}
if ( ! this . k . g ( ) . x ( 2 ) ) {
}
N ( ) ;
byte [ ] d222 = ( ( d1 ) ( ( u4 ) x2 . p ( ) ) ) . d ( ) ;
a2 = p . q . a ( null ) ;
2021-08-03 07:33:18 +00:00
}
} else {
2022-03-07 09:34:54 +00:00
this . f1542y = - 1L ;
2021-08-03 07:33:18 +00:00
String B = K ( ) . B ( currentTimeMillis - p . d . a ( null ) . longValue ( ) ) ;
if ( ! TextUtils . isEmpty ( B ) & & ( T = K ( ) . T ( B ) ) ! = null ) {
n ( T ) ;
}
}
}
}
} finally {
2022-03-07 09:34:54 +00:00
this . t = false ;
2021-08-03 07:33:18 +00:00
x ( ) ;
}
}
2022-03-07 09:34:54 +00:00
/* JADX WARN: Removed duplicated region for block: B:25:0x00a3 */
/* JADX WARN: Removed duplicated region for block: B:42:0x010b */
/* JADX WARN: Removed duplicated region for block: B:43:0x0122 */
/* JADX WARN: Removed duplicated region for block: B:57:0x018b */
/* JADX WARN: Removed duplicated region for block: B:58:0x01a1 */
/* JADX WARN: Removed duplicated region for block: B:65:? A[RETURN, SYNTHETIC] */
2021-08-03 07:33:18 +00:00
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
2021-08-03 07:33:18 +00:00
public final void R ( ) {
boolean z2 ;
int i ;
int i2 ;
2022-03-07 09:34:54 +00:00
int read ;
FileLock tryLock ;
2021-08-03 07:33:18 +00:00
FileLock fileLock ;
U ( ) ;
P ( ) ;
if ( ! this . m ) {
boolean z3 = true ;
this . m = true ;
U ( ) ;
2022-01-27 07:52:47 +00:00
if ( ! this . k . h . o ( p . f1557i0 ) | | ( fileLock = this . u ) = = null | | ! fileLock . isValid ( ) ) {
2021-08-03 07:33:18 +00:00
try {
2022-01-27 07:52:47 +00:00
FileChannel channel = new RandomAccessFile ( new File ( this . k . f1567b . getFilesDir ( ) , " google_app_measurement.db " ) , " rw " ) . getChannel ( ) ;
2021-08-03 07:33:18 +00:00
this . v = channel ;
2022-03-07 09:34:54 +00:00
tryLock = channel . tryLock ( ) ;
2021-08-03 07:33:18 +00:00
this . u = tryLock ;
2022-03-07 09:34:54 +00:00
} catch ( FileNotFoundException e ) {
this . k . g ( ) . f . b ( " Failed to acquire storage lock " , e ) ;
} catch ( IOException e2 ) {
this . k . g ( ) . f . b ( " Failed to access storage lock file " , e2 ) ;
} catch ( OverlappingFileLockException e3 ) {
this . k . g ( ) . i . b ( " Storage lock already acquired " , e3 ) ;
}
if ( tryLock ! = null ) {
this . k . g ( ) . n . a ( " Storage concurrent access okay " ) ;
} else {
this . k . g ( ) . f . a ( " Storage concurrent data access panic " ) ;
z2 = false ;
if ( ! z2 ) {
FileChannel fileChannel = this . v ;
U ( ) ;
if ( fileChannel = = null | | ! fileChannel . isOpen ( ) ) {
this . k . g ( ) . f . a ( " Bad channel to read from " ) ;
} else {
ByteBuffer allocate = ByteBuffer . allocate ( 4 ) ;
try {
fileChannel . position ( 0L ) ;
read = fileChannel . read ( allocate ) ;
} catch ( IOException e4 ) {
this . k . g ( ) . f . b ( " Failed to read from channel " , e4 ) ;
}
if ( read = = 4 ) {
allocate . flip ( ) ;
i = allocate . getInt ( ) ;
n3 z4 = this . k . z ( ) ;
z4 . t ( ) ;
i2 = z4 . e ;
U ( ) ;
if ( i < = i2 ) {
this . k . g ( ) . f . c ( " Panic: can't downgrade version. Previous, current version " , Integer . valueOf ( i ) , Integer . valueOf ( i2 ) ) ;
return ;
} else if ( i < i2 ) {
FileChannel fileChannel2 = this . v ;
U ( ) ;
if ( fileChannel2 = = null | | ! fileChannel2 . isOpen ( ) ) {
this . k . g ( ) . f . a ( " Bad channel to read from " ) ;
} else {
ByteBuffer allocate2 = ByteBuffer . allocate ( 4 ) ;
allocate2 . putInt ( i2 ) ;
allocate2 . flip ( ) ;
try {
fileChannel2 . truncate ( 0L ) ;
this . k . h . o ( p . s0 ) ;
fileChannel2 . write ( allocate2 ) ;
fileChannel2 . force ( true ) ;
if ( fileChannel2 . size ( ) ! = 4 ) {
this . k . g ( ) . f . b ( " Error writing to channel. Bytes written " , Long . valueOf ( fileChannel2 . size ( ) ) ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
} catch ( IOException e5 ) {
this . k . g ( ) . f . b ( " Failed to write to channel " , e5 ) ;
}
if ( ! z3 ) {
this . k . g ( ) . n . c ( " Storage version upgraded. Previous, current version " , Integer . valueOf ( i ) , Integer . valueOf ( i2 ) ) ;
return ;
2021-08-03 07:33:18 +00:00
} else {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . f . c ( " Storage version upgrade failed. Previous, current version " , Integer . valueOf ( i ) , Integer . valueOf ( i2 ) ) ;
2021-08-03 07:33:18 +00:00
return ;
}
}
2022-03-07 09:34:54 +00:00
z3 = false ;
if ( ! z3 ) {
}
} else {
return ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
} else if ( read ! = - 1 ) {
this . k . g ( ) . i . b ( " Unexpected data length. Bytes read " , Integer . valueOf ( read ) ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
i = 0 ;
n3 z42 = this . k . z ( ) ;
z42 . t ( ) ;
i2 = z42 . e ;
U ( ) ;
if ( i < = i2 ) {
}
} else {
return ;
2021-08-03 07:33:18 +00:00
}
}
} else {
this . k . g ( ) . n . a ( " Storage concurrent access okay " ) ;
}
z2 = true ;
if ( ! z2 ) {
}
}
}
public final b4 S ( ) {
b4 b4Var = this . e ;
if ( b4Var ! = null ) {
return b4Var ;
}
throw new IllegalStateException ( " Network broadcast receiver not created " ) ;
}
public final h9 T ( ) {
C ( this . f ) ;
return this . f ;
}
@WorkerThread
public final void U ( ) {
this . k . f ( ) . b ( ) ;
}
public final long V ( ) {
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
long currentTimeMillis = System . currentTimeMillis ( ) ;
d4 o = this . k . o ( ) ;
o . o ( ) ;
o . b ( ) ;
long a2 = o . j . a ( ) ;
if ( a2 = = 0 ) {
2022-03-07 09:34:54 +00:00
a2 = 1 + o . e ( ) . v0 ( ) . nextInt ( 86400000 ) ;
2021-08-03 07:33:18 +00:00
o . j . b ( a2 ) ;
}
return ( ( ( ( currentTimeMillis + a2 ) / 1000 ) / 60 ) / 60 ) / 24 ;
}
@WorkerThread
@Deprecated
public final String W ( ) {
byte [ ] bArr = new byte [ 16 ] ;
this . k . t ( ) . v0 ( ) . nextBytes ( bArr ) ;
return String . format ( Locale . US , " %032x " , new BigInteger ( 1 , bArr ) ) ;
}
@WorkerThread
public final d a ( String str ) {
String str2 ;
d dVar = d . a ;
if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) {
return dVar ;
}
U ( ) ;
P ( ) ;
2022-01-27 07:52:47 +00:00
d dVar2 = this . f1543z . get ( str ) ;
2021-08-03 07:33:18 +00:00
if ( dVar2 ! = null ) {
return dVar2 ;
}
g K = K ( ) ;
Objects . requireNonNull ( K ) ;
Objects . requireNonNull ( str , " null reference " ) ;
K . b ( ) ;
K . n ( ) ;
Cursor cursor = null ;
try {
2022-03-07 09:34:54 +00:00
try {
cursor = K . t ( ) . rawQuery ( " select consent_state from consent_settings where app_id=? limit 1; " , new String [ ] { str } ) ;
if ( cursor . moveToFirst ( ) ) {
str2 = cursor . getString ( 0 ) ;
cursor . close ( ) ;
} else {
cursor . close ( ) ;
str2 = " G1 " ;
}
d b2 = d . b ( str2 ) ;
s ( str , b2 ) ;
return b2 ;
} catch ( SQLiteException e ) {
K . g ( ) . f . c ( " Database error " , " select consent_state from consent_settings where app_id=? limit 1; " , e ) ;
throw e ;
2021-08-03 07:33:18 +00:00
}
} catch ( Throwable th ) {
2022-03-07 09:34:54 +00:00
if ( cursor ! = null ) {
2021-08-03 07:33:18 +00:00
cursor . close ( ) ;
}
throw th ;
}
}
@WorkerThread
public final String c ( d dVar ) {
if ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) | | dVar . k ( ) ) {
return W ( ) ;
}
return null ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.f.i.b.t5
2021-08-03 07:33:18 +00:00
public final r4 f ( ) {
return this . k . f ( ) ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.f.i.b.t5
2021-08-03 07:33:18 +00:00
public final q3 g ( ) {
return this . k . g ( ) ;
}
2022-01-13 08:07:50 +00:00
public final void h ( e1 . a aVar , long j , boolean z2 ) {
2021-08-03 07:33:18 +00:00
u9 u9Var ;
boolean z3 ;
String str = z2 ? " _se " : " _lte " ;
u9 Y = K ( ) . Y ( aVar . k0 ( ) , str ) ;
if ( Y = = null | | Y . e = = null ) {
String k0 = aVar . k0 ( ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
u9Var = new u9 ( k0 , " auto " , str , System . currentTimeMillis ( ) , Long . valueOf ( j ) ) ;
} else {
String k02 = aVar . k0 ( ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
u9Var = new u9 ( k02 , " auto " , str , System . currentTimeMillis ( ) , Long . valueOf ( ( ( Long ) Y . e ) . longValue ( ) + j ) ) ;
}
i1 . a L = i1 . L ( ) ;
L . r ( str ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
L . q ( System . currentTimeMillis ( ) ) ;
L . s ( ( ( Long ) u9Var . e ) . longValue ( ) ) ;
i1 i1Var = ( i1 ) ( ( u4 ) L . p ( ) ) ;
2021-11-02 06:38:17 +00:00
int s2 = q9 . s ( aVar , str ) ;
if ( s2 > = 0 ) {
2021-12-02 18:53:44 +00:00
if ( aVar . l ) {
2021-08-03 07:33:18 +00:00
aVar . n ( ) ;
2021-12-02 18:53:44 +00:00
aVar . l = false ;
2021-08-03 07:33:18 +00:00
}
2021-12-02 18:53:44 +00:00
e1 . x ( ( e1 ) aVar . k , s2 , i1Var ) ;
2021-08-03 07:33:18 +00:00
z3 = true ;
} else {
z3 = false ;
}
if ( ! z3 ) {
2021-12-02 18:53:44 +00:00
if ( aVar . l ) {
2021-08-03 07:33:18 +00:00
aVar . n ( ) ;
2021-12-02 18:53:44 +00:00
aVar . l = false ;
2021-08-03 07:33:18 +00:00
}
2021-12-02 18:53:44 +00:00
e1 . A ( ( e1 ) aVar . k , i1Var ) ;
2021-08-03 07:33:18 +00:00
}
if ( j > 0 ) {
K ( ) . M ( u9Var ) ;
this . k . g ( ) . n . c ( " Updated engagement user property. scope, value " , z2 ? " session-scoped " : " lifetime " , u9Var . e ) ;
}
}
2022-01-13 08:07:50 +00:00
@Override // b.i.a.f.i.b.t5
public final b . i . a . f . e . o . b i ( ) {
return this . k . o ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.f.i.b.t5
2021-08-03 07:33:18 +00:00
public final Context j ( ) {
2022-01-27 07:52:47 +00:00
return this . k . f1567b ;
2021-08-03 07:33:18 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.f.i.b.t5
2021-08-03 07:33:18 +00:00
public final ga k ( ) {
return this . k . g ;
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void l ( zzaq zzaqVar , zzn zznVar ) {
2021-08-03 07:33:18 +00:00
List < zzz > list ;
List < zzz > list2 ;
List < zzz > list3 ;
2022-03-07 09:34:54 +00:00
zzaq zzaqVar2 = zzaqVar ;
Objects . requireNonNull ( zznVar , " null reference " ) ;
d . w ( zznVar . j ) ;
2021-08-03 07:33:18 +00:00
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
String str = zznVar . j ;
long j = zzaqVar2 . m ;
2021-08-03 07:33:18 +00:00
N ( ) ;
2022-03-07 09:34:54 +00:00
if ( q9 . O ( zzaqVar , zznVar ) ) {
if ( ! zznVar . q ) {
G ( zznVar ) ;
2021-08-03 07:33:18 +00:00
return ;
}
2022-03-07 09:34:54 +00:00
List < String > list4 = zznVar . D ;
2021-08-03 07:33:18 +00:00
if ( list4 ! = null ) {
2022-03-07 09:34:54 +00:00
if ( list4 . contains ( zzaqVar2 . j ) ) {
Bundle x0 = zzaqVar2 . k . x0 ( ) ;
x0 . putLong ( " ga_safelisted " , 1L ) ;
zzaqVar2 = new zzaq ( zzaqVar2 . j , new zzap ( x0 ) , zzaqVar2 . l , zzaqVar2 . m ) ;
2021-08-03 07:33:18 +00:00
} else {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . m . d ( " Dropping non-safelisted event. appId, event name, origin " , str , zzaqVar2 . j , zzaqVar2 . l ) ;
2021-08-03 07:33:18 +00:00
return ;
}
}
K ( ) . b0 ( ) ;
try {
g K = K ( ) ;
2021-10-08 22:11:56 +00:00
d . w ( str ) ;
2021-08-03 07:33:18 +00:00
K . b ( ) ;
K . n ( ) ;
2022-03-07 09:34:54 +00:00
int i = ( j > 0L ? 1 : ( j = = 0L ? 0 : - 1 ) ) ;
2021-08-03 07:33:18 +00:00
if ( i < 0 ) {
K . g ( ) . i . c ( " Invalid time querying timed out conditional properties " , q3 . s ( str ) , Long . valueOf ( j ) ) ;
list = Collections . emptyList ( ) ;
} else {
list = K . F ( " active=0 and app_id=? and abs(? - creation_timestamp) > trigger_timeout " , new String [ ] { str , String . valueOf ( j ) } ) ;
}
2022-03-07 09:34:54 +00:00
for ( zzz zzzVar : list ) {
if ( zzzVar ! = null ) {
this . k . g ( ) . n . d ( " User property timed out " , zzzVar . j , this . k . u ( ) . y ( zzzVar . l . k ) , zzzVar . l . w0 ( ) ) ;
zzaq zzaqVar3 = zzzVar . p ;
if ( zzaqVar3 ! = null ) {
I ( new zzaq ( zzaqVar3 , j ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
K ( ) . a0 ( str , zzzVar . l . k ) ;
2021-08-03 07:33:18 +00:00
}
}
g K2 = K ( ) ;
2021-10-08 22:11:56 +00:00
d . w ( str ) ;
2021-08-03 07:33:18 +00:00
K2 . b ( ) ;
K2 . n ( ) ;
if ( i < 0 ) {
K2 . g ( ) . i . c ( " Invalid time querying expired conditional properties " , q3 . s ( str ) , Long . valueOf ( j ) ) ;
list2 = Collections . emptyList ( ) ;
} else {
list2 = K2 . F ( " active<>0 and app_id=? and abs(? - triggered_timestamp) > time_to_live " , new String [ ] { str , String . valueOf ( j ) } ) ;
}
ArrayList arrayList = new ArrayList ( list2 . size ( ) ) ;
2022-03-07 09:34:54 +00:00
for ( zzz zzzVar2 : list2 ) {
if ( zzzVar2 ! = null ) {
this . k . g ( ) . n . d ( " User property expired " , zzzVar2 . j , this . k . u ( ) . y ( zzzVar2 . l . k ) , zzzVar2 . l . w0 ( ) ) ;
K ( ) . V ( str , zzzVar2 . l . k ) ;
zzaq zzaqVar4 = zzzVar2 . t ;
if ( zzaqVar4 ! = null ) {
arrayList . add ( zzaqVar4 ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
K ( ) . a0 ( str , zzzVar2 . l . k ) ;
2021-08-03 07:33:18 +00:00
}
}
int size = arrayList . size ( ) ;
int i2 = 0 ;
while ( i2 < size ) {
Object obj = arrayList . get ( i2 ) ;
i2 + + ;
2022-03-07 09:34:54 +00:00
I ( new zzaq ( ( zzaq ) obj , j ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
g K3 = K ( ) ;
2022-03-07 09:34:54 +00:00
String str2 = zzaqVar2 . j ;
2021-10-08 22:11:56 +00:00
d . w ( str ) ;
d . w ( str2 ) ;
2021-08-03 07:33:18 +00:00
K3 . b ( ) ;
K3 . n ( ) ;
if ( i < 0 ) {
K3 . g ( ) . i . d ( " Invalid time querying triggered conditional properties " , q3 . s ( str ) , K3 . d ( ) . u ( str2 ) , Long . valueOf ( j ) ) ;
list3 = Collections . emptyList ( ) ;
} else {
list3 = K3 . F ( " active=0 and app_id=? and trigger_event_name=? and abs(? - creation_timestamp) <= trigger_timeout " , new String [ ] { str , str2 , String . valueOf ( j ) } ) ;
}
ArrayList arrayList2 = new ArrayList ( list3 . size ( ) ) ;
2022-03-07 09:34:54 +00:00
for ( zzz zzzVar3 : list3 ) {
if ( zzzVar3 ! = null ) {
zzku zzkuVar = zzzVar3 . l ;
u9 u9Var = new u9 ( zzzVar3 . j , zzzVar3 . k , zzkuVar . k , j , zzkuVar . w0 ( ) ) ;
2021-08-03 07:33:18 +00:00
if ( K ( ) . M ( u9Var ) ) {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . n . d ( " User property triggered " , zzzVar3 . j , this . k . u ( ) . y ( u9Var . c ) , u9Var . e ) ;
2021-08-03 07:33:18 +00:00
} else {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . f . d ( " Too many active user properties, ignoring " , q3 . s ( zzzVar3 . j ) , this . k . u ( ) . y ( u9Var . c ) , u9Var . e ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
zzaq zzaqVar5 = zzzVar3 . r ;
if ( zzaqVar5 ! = null ) {
arrayList2 . add ( zzaqVar5 ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
zzzVar3 . l = new zzku ( u9Var ) ;
zzzVar3 . n = true ;
K ( ) . N ( zzzVar3 ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
I ( zzaqVar2 , zznVar ) ;
2021-08-03 07:33:18 +00:00
int size2 = arrayList2 . size ( ) ;
int i3 = 0 ;
while ( i3 < size2 ) {
Object obj2 = arrayList2 . get ( i3 ) ;
i3 + + ;
2022-03-07 09:34:54 +00:00
I ( new zzaq ( ( zzaq ) obj2 , j ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
K ( ) . s ( ) ;
} finally {
K ( ) . e0 ( ) ;
}
}
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void m ( zzaq zzaqVar , String str ) {
2021-08-03 07:33:18 +00:00
boolean z2 ;
String str2 ;
a4 T = K ( ) . T ( str ) ;
if ( T = = null | | TextUtils . isEmpty ( T . M ( ) ) ) {
this . k . g ( ) . m . b ( " No app data available; dropping event " , str ) ;
return ;
}
Boolean z3 = z ( T ) ;
if ( z3 = = null ) {
2022-03-07 09:34:54 +00:00
if ( ! " _ui " . equals ( zzaqVar . j ) ) {
2021-08-03 07:33:18 +00:00
this . k . g ( ) . i . b ( " Could not find package. appId " , q3 . s ( str ) ) ;
}
} else if ( ! z3 . booleanValue ( ) ) {
this . k . g ( ) . f . b ( " App version does not match; dropping event. appId " , q3 . s ( str ) ) ;
return ;
}
String v = T . v ( ) ;
String M = T . M ( ) ;
long N = T . N ( ) ;
String O = T . O ( ) ;
long P = T . P ( ) ;
long Q = T . Q ( ) ;
boolean T2 = T . T ( ) ;
String H = T . H ( ) ;
long g = T . g ( ) ;
boolean h = T . h ( ) ;
boolean i = T . i ( ) ;
String y2 = T . y ( ) ;
Boolean j = T . j ( ) ;
long S = T . S ( ) ;
List < String > k = T . k ( ) ;
if ( da . b ( ) ) {
z2 = T2 ;
2022-01-27 07:52:47 +00:00
if ( this . k . h . u ( T . o ( ) , p . f1558j0 ) ) {
2021-08-03 07:33:18 +00:00
str2 = T . B ( ) ;
2022-03-07 09:34:54 +00:00
B ( zzaqVar , new zzn ( str , v , M , N , O , P , Q , ( String ) null , z2 , false , H , g , 0L , 0 , h , i , false , y2 , j , S , k , str2 , ( t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) ? " " : a ( str ) . d ( ) ) ) ;
2021-08-03 07:33:18 +00:00
}
} else {
z2 = T2 ;
}
str2 = null ;
2022-03-07 09:34:54 +00:00
B ( zzaqVar , new zzn ( str , v , M , N , O , P , Q , ( String ) null , z2 , false , H , g , 0L , 0 , h , i , false , y2 , j , S , k , str2 , ( t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) ? " " : a ( str ) . d ( ) ) ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
/ * JADX WARN : Code restructure failed : missing block : B : 27 : 0x009b , code lost :
2021-08-03 07:33:18 +00:00
if ( android . text . TextUtils . isEmpty ( r2 ) ! = false ) goto L_0x009d ;
* /
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
2021-08-03 07:33:18 +00:00
public final void n ( a4 a4Var ) {
U ( ) ;
2022-01-27 07:52:47 +00:00
if ( ! da . b ( ) | | ! this . k . h . u ( a4Var . o ( ) , p . f1558j0 ) ) {
2021-08-03 07:33:18 +00:00
if ( TextUtils . isEmpty ( a4Var . v ( ) ) & & TextUtils . isEmpty ( a4Var . y ( ) ) ) {
r ( a4Var . o ( ) , 204 , null , null , null ) ;
return ;
}
} else if ( TextUtils . isEmpty ( a4Var . v ( ) ) & & TextUtils . isEmpty ( a4Var . B ( ) ) & & TextUtils . isEmpty ( a4Var . y ( ) ) ) {
r ( a4Var . o ( ) , 204 , null , null , null ) ;
return ;
}
c cVar = this . k . h ;
Objects . requireNonNull ( cVar ) ;
Uri . Builder builder = new Uri . Builder ( ) ;
String v = a4Var . v ( ) ;
if ( TextUtils . isEmpty ( v ) ) {
2022-01-27 07:52:47 +00:00
if ( da . b ( ) & & cVar . a . h . u ( a4Var . o ( ) , p . f1558j0 ) ) {
2021-08-03 07:33:18 +00:00
v = a4Var . B ( ) ;
}
v = a4Var . y ( ) ;
}
ArrayMap arrayMap = null ;
Uri . Builder encodedAuthority = builder . scheme ( p . e . a ( null ) ) . encodedAuthority ( p . f . a ( null ) ) ;
String valueOf = String . valueOf ( v ) ;
encodedAuthority . path ( valueOf . length ( ) ! = 0 ? " config/app/ " . concat ( valueOf ) : new String ( " config/app/ " ) ) . appendQueryParameter ( " app_instance_id " , a4Var . s ( ) ) . appendQueryParameter ( " platform " , " android " ) . appendQueryParameter ( " gmp_version " , " 33025 " ) ;
String uri = builder . build ( ) . toString ( ) ;
try {
URL url = new URL ( uri ) ;
this . k . g ( ) . n . b ( " Fetching remote configuration " , a4Var . o ( ) ) ;
2021-11-02 06:38:17 +00:00
u0 s2 = H ( ) . s ( a4Var . o ( ) ) ;
2021-08-03 07:33:18 +00:00
p4 H = H ( ) ;
String o = a4Var . o ( ) ;
H . b ( ) ;
String str = H . i . get ( o ) ;
2021-11-02 06:38:17 +00:00
if ( s2 ! = null & & ! TextUtils . isEmpty ( str ) ) {
2021-08-03 07:33:18 +00:00
arrayMap = new ArrayMap ( ) ;
arrayMap . put ( " If-Modified-Since " , str ) ;
}
2021-11-02 06:38:17 +00:00
this . r = true ;
2021-08-03 07:33:18 +00:00
x3 J = J ( ) ;
String o2 = a4Var . o ( ) ;
l9 l9Var = new l9 ( this ) ;
J . b ( ) ;
J . n ( ) ;
J . f ( ) . x ( new c4 ( J , o2 , url , null , arrayMap , l9Var ) ) ;
} catch ( MalformedURLException unused ) {
this . k . g ( ) . f . c ( " Failed to parse config URL. Not fetching. appId " , q3 . s ( a4Var . o ( ) ) , uri ) ;
}
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void o ( zzku zzkuVar , zzn zznVar ) {
2021-08-03 07:33:18 +00:00
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
if ( L ( zznVar ) ) {
if ( ! zznVar . q ) {
G ( zznVar ) ;
2021-08-03 07:33:18 +00:00
return ;
}
2022-03-07 09:34:54 +00:00
int h02 = this . k . t ( ) . h0 ( zzkuVar . k ) ;
2021-08-03 07:33:18 +00:00
if ( h02 ! = 0 ) {
this . k . t ( ) ;
2022-03-07 09:34:54 +00:00
String E = t9 . E ( zzkuVar . k , 24 , true ) ;
String str = zzkuVar . k ;
this . k . t ( ) . S ( this . A , zznVar . j , h02 , " _ev " , E , str ! = null ? str . length ( ) : 0 ) ;
2021-08-03 07:33:18 +00:00
return ;
}
2022-03-07 09:34:54 +00:00
int i02 = this . k . t ( ) . i0 ( zzkuVar . k , zzkuVar . w0 ( ) ) ;
2021-08-03 07:33:18 +00:00
if ( i02 ! = 0 ) {
this . k . t ( ) ;
2022-03-07 09:34:54 +00:00
String E2 = t9 . E ( zzkuVar . k , 24 , true ) ;
Object w0 = zzkuVar . w0 ( ) ;
this . k . t ( ) . S ( this . A , zznVar . j , i02 , " _ev " , E2 , ( w0 = = null | | ( ! ( w0 instanceof String ) & & ! ( w0 instanceof CharSequence ) ) ) ? 0 : String . valueOf ( w0 ) . length ( ) ) ;
2021-08-03 07:33:18 +00:00
return ;
}
2022-03-07 09:34:54 +00:00
Object n0 = this . k . t ( ) . n0 ( zzkuVar . k , zzkuVar . w0 ( ) ) ;
2021-08-03 07:33:18 +00:00
if ( n0 ! = null ) {
2022-03-07 09:34:54 +00:00
if ( " _sid " . equals ( zzkuVar . k ) ) {
long j = zzkuVar . l ;
String str2 = zzkuVar . o ;
2021-08-03 07:33:18 +00:00
long j2 = 0 ;
2022-03-07 09:34:54 +00:00
u9 Y = K ( ) . Y ( zznVar . j , " _sno " ) ;
2021-08-03 07:33:18 +00:00
if ( Y ! = null ) {
Object obj = Y . e ;
if ( obj instanceof Long ) {
j2 = ( ( Long ) obj ) . longValue ( ) ;
2022-03-07 09:34:54 +00:00
o ( new zzku ( " _sno " , j , Long . valueOf ( j2 + 1 ) , str2 ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
}
if ( Y ! = null ) {
this . k . g ( ) . i . b ( " Retrieved last session number from database does not contain a valid (long) value " , Y . e ) ;
}
2022-03-07 09:34:54 +00:00
l z2 = K ( ) . z ( zznVar . j , " _s " ) ;
2021-08-03 07:33:18 +00:00
if ( z2 ! = null ) {
2021-12-17 21:59:34 +00:00
j2 = z2 . c ;
2021-08-03 07:33:18 +00:00
this . k . g ( ) . n . b ( " Backfill the session number. Last used session number " , Long . valueOf ( j2 ) ) ;
}
2022-03-07 09:34:54 +00:00
o ( new zzku ( " _sno " , j , Long . valueOf ( j2 + 1 ) , str2 ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
u9 u9Var = new u9 ( zznVar . j , zzkuVar . o , zzkuVar . k , zzkuVar . l , n0 ) ;
2021-12-17 21:59:34 +00:00
this . k . g ( ) . n . c ( " Setting user property " , this . k . u ( ) . y ( u9Var . c ) , n0 ) ;
2021-08-03 07:33:18 +00:00
K ( ) . b0 ( ) ;
try {
2022-03-07 09:34:54 +00:00
G ( zznVar ) ;
2021-08-03 07:33:18 +00:00
boolean M = K ( ) . M ( u9Var ) ;
K ( ) . s ( ) ;
if ( ! M ) {
2021-12-17 21:59:34 +00:00
this . k . g ( ) . f . c ( " Too many unique user properties are set. Ignoring user property " , this . k . u ( ) . y ( u9Var . c ) , u9Var . e ) ;
2022-03-07 09:34:54 +00:00
this . k . t ( ) . S ( this . A , zznVar . j , 9 , null , null , 0 ) ;
2021-08-03 07:33:18 +00:00
}
} finally {
K ( ) . e0 ( ) ;
}
}
}
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void p ( zzn zznVar ) {
2021-11-02 06:38:17 +00:00
if ( this . w ! = null ) {
2021-08-03 07:33:18 +00:00
ArrayList arrayList = new ArrayList ( ) ;
2022-01-27 07:52:47 +00:00
this . f1541x = arrayList ;
2021-11-02 06:38:17 +00:00
arrayList . addAll ( this . w ) ;
2021-08-03 07:33:18 +00:00
}
g K = K ( ) ;
2022-03-07 09:34:54 +00:00
String str = zznVar . j ;
2021-10-08 22:11:56 +00:00
d . w ( str ) ;
2021-08-03 07:33:18 +00:00
K . b ( ) ;
K . n ( ) ;
try {
SQLiteDatabase t = K . t ( ) ;
String [ ] strArr = { str } ;
int delete = t . delete ( " apps " , " app_id=? " , strArr ) + 0 + t . delete ( " events " , " app_id=? " , strArr ) + t . delete ( " user_attributes " , " app_id=? " , strArr ) + t . delete ( " conditional_properties " , " app_id=? " , strArr ) + t . delete ( " raw_events " , " app_id=? " , strArr ) + t . delete ( " raw_events_metadata " , " app_id=? " , strArr ) + t . delete ( " queue " , " app_id=? " , strArr ) + t . delete ( " audience_filter_values " , " app_id=? " , strArr ) + t . delete ( " main_event_params " , " app_id=? " , strArr ) + t . delete ( " default_event_params " , " app_id=? " , strArr ) ;
if ( delete > 0 ) {
K . g ( ) . n . c ( " Reset analytics data. app, records " , str , Integer . valueOf ( delete ) ) ;
}
} catch ( SQLiteException e ) {
K . g ( ) . f . c ( " Error resetting analytics data. appId, error " , q3 . s ( str ) , e ) ;
}
2022-03-07 09:34:54 +00:00
if ( zznVar . q ) {
E ( zznVar ) ;
2021-08-03 07:33:18 +00:00
}
}
@WorkerThread
2022-03-07 09:34:54 +00:00
public final void q ( zzz zzzVar , zzn zznVar ) {
zzaq zzaqVar ;
2021-08-03 07:33:18 +00:00
boolean z2 ;
2022-03-07 09:34:54 +00:00
Objects . requireNonNull ( zzzVar , " null reference " ) ;
d . w ( zzzVar . j ) ;
Objects . requireNonNull ( zzzVar . k , " null reference " ) ;
Objects . requireNonNull ( zzzVar . l , " null reference " ) ;
d . w ( zzzVar . l . k ) ;
2021-08-03 07:33:18 +00:00
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
if ( L ( zznVar ) ) {
if ( ! zznVar . q ) {
G ( zznVar ) ;
2021-08-03 07:33:18 +00:00
return ;
}
2022-03-07 09:34:54 +00:00
zzz zzzVar2 = new zzz ( zzzVar ) ;
2021-08-03 07:33:18 +00:00
boolean z3 = false ;
2022-03-07 09:34:54 +00:00
zzzVar2 . n = false ;
2021-08-03 07:33:18 +00:00
K ( ) . b0 ( ) ;
try {
2022-03-07 09:34:54 +00:00
zzz Z = K ( ) . Z ( zzzVar2 . j , zzzVar2 . l . k ) ;
if ( Z ! = null & & ! Z . k . equals ( zzzVar2 . k ) ) {
this . k . g ( ) . i . d ( " Updating a conditional user property with different origin. name, origin, origin (from DB) " , this . k . u ( ) . y ( zzzVar2 . l . k ) , zzzVar2 . k , Z . k ) ;
2021-12-02 18:53:44 +00:00
}
if ( Z ! = null & & ( z2 = Z . n ) ) {
2022-03-07 09:34:54 +00:00
zzzVar2 . k = Z . k ;
zzzVar2 . m = Z . m ;
zzzVar2 . q = Z . q ;
zzzVar2 . o = Z . o ;
zzzVar2 . r = Z . r ;
zzzVar2 . n = z2 ;
zzku zzkuVar = zzzVar2 . l ;
zzzVar2 . l = new zzku ( zzkuVar . k , Z . l . l , zzkuVar . w0 ( ) , Z . l . o ) ;
} else if ( TextUtils . isEmpty ( zzzVar2 . o ) ) {
zzku zzkuVar2 = zzzVar2 . l ;
zzzVar2 . l = new zzku ( zzkuVar2 . k , zzzVar2 . m , zzkuVar2 . w0 ( ) , zzzVar2 . l . o ) ;
zzzVar2 . n = true ;
2021-08-03 07:33:18 +00:00
z3 = true ;
}
2022-03-07 09:34:54 +00:00
if ( zzzVar2 . n ) {
zzku zzkuVar3 = zzzVar2 . l ;
u9 u9Var = new u9 ( zzzVar2 . j , zzzVar2 . k , zzkuVar3 . k , zzkuVar3 . l , zzkuVar3 . w0 ( ) ) ;
2021-08-03 07:33:18 +00:00
if ( K ( ) . M ( u9Var ) ) {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . m . d ( " User property updated immediately " , zzzVar2 . j , this . k . u ( ) . y ( u9Var . c ) , u9Var . e ) ;
2021-08-03 07:33:18 +00:00
} else {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . f . d ( " (2)Too many active user properties, ignoring " , q3 . s ( zzzVar2 . j ) , this . k . u ( ) . y ( u9Var . c ) , u9Var . e ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( z3 & & ( zzaqVar = zzzVar2 . r ) ! = null ) {
I ( new zzaq ( zzaqVar , zzzVar2 . m ) , zznVar ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
if ( K ( ) . N ( zzzVar2 ) ) {
this . k . g ( ) . m . d ( " Conditional property added " , zzzVar2 . j , this . k . u ( ) . y ( zzzVar2 . l . k ) , zzzVar2 . l . w0 ( ) ) ;
2021-08-03 07:33:18 +00:00
} else {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . f . d ( " Too many conditional properties, ignoring " , q3 . s ( zzzVar2 . j ) , this . k . u ( ) . y ( zzzVar2 . l . k ) , zzzVar2 . l . w0 ( ) ) ;
2021-08-03 07:33:18 +00:00
}
K ( ) . s ( ) ;
} finally {
K ( ) . e0 ( ) ;
}
}
}
2022-03-07 09:34:54 +00:00
/ * JADX WARN : Code restructure failed : missing block : B : 27 : 0x00b6 , code lost :
r8 = r7 . k . o ( ) . h ;
java . util . Objects . requireNonNull ( ( b . i . a . f . e . o . c ) r7 . k . o ) ;
r8 . b ( java . lang . System . currentTimeMillis ( ) ) ;
* /
/ * JADX WARN : Code restructure failed : missing block : B : 30 : 0x00d5 , code lost :
r10 = r12 . get ( " Last-Modified " ) ;
* /
/* JADX WARN: Removed duplicated region for block: B:46:0x0126 A[Catch: all -> 0x0175, TryCatch #1 {all -> 0x017e, blocks: (B:4:0x000c, B:5:0x000e, B:55:0x0168, B:6:0x0027, B:15:0x0043, B:20:0x005e, B:27:0x00b6, B:28:0x00ce, B:30:0x00d5, B:33:0x00e1, B:35:0x00e7, B:40:0x00f4, B:41:0x00fc, B:43:0x0106, B:44:0x010d, B:46:0x0126, B:47:0x0134, B:48:0x014a, B:50:0x0154, B:52:0x015a, B:53:0x015e, B:54:0x0161), top: B:61:0x000c }] */
/* JADX WARN: Removed duplicated region for block: B:47:0x0134 A[Catch: all -> 0x0175, TryCatch #1 {all -> 0x017e, blocks: (B:4:0x000c, B:5:0x000e, B:55:0x0168, B:6:0x0027, B:15:0x0043, B:20:0x005e, B:27:0x00b6, B:28:0x00ce, B:30:0x00d5, B:33:0x00e1, B:35:0x00e7, B:40:0x00f4, B:41:0x00fc, B:43:0x0106, B:44:0x010d, B:46:0x0126, B:47:0x0134, B:48:0x014a, B:50:0x0154, B:52:0x015a, B:53:0x015e, B:54:0x0161), top: B:61:0x000c }] */
2021-08-03 07:33:18 +00:00
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
2021-08-03 07:33:18 +00:00
public final void r ( String str , int i , Throwable th , byte [ ] bArr , Map < String , List < String > > map ) {
U ( ) ;
P ( ) ;
2021-10-08 22:11:56 +00:00
d . w ( str ) ;
2021-08-03 07:33:18 +00:00
if ( bArr = = null ) {
try {
bArr = new byte [ 0 ] ;
2022-03-07 09:34:54 +00:00
} finally {
2021-11-02 06:38:17 +00:00
this . r = false ;
2021-08-03 07:33:18 +00:00
x ( ) ;
}
}
this . k . g ( ) . n . b ( " onConfigFetched. Response size " , Integer . valueOf ( bArr . length ) ) ;
K ( ) . b0 ( ) ;
2022-03-07 09:34:54 +00:00
a4 T = K ( ) . T ( str ) ;
boolean z2 = true ;
boolean z3 = ( i = = 200 | | i = = 204 | | i = = 304 ) & & th = = null ;
if ( T = = null ) {
this . k . g ( ) . i . b ( " App does not exist in onConfigFetched. appId " , q3 . s ( str ) ) ;
} else {
if ( ! z3 & & i ! = 404 ) {
Objects . requireNonNull ( ( c ) this . k . o ) ;
T . I ( System . currentTimeMillis ( ) ) ;
K ( ) . I ( T ) ;
this . k . g ( ) . n . c ( " Fetching config failed. code, error " , Integer . valueOf ( i ) , th ) ;
p4 H = H ( ) ;
H . b ( ) ;
H . i . put ( str , null ) ;
h4 h4Var = this . k . o ( ) . g ;
Objects . requireNonNull ( ( c ) this . k . o ) ;
h4Var . b ( System . currentTimeMillis ( ) ) ;
if ( ! ( i = = 503 | | i = = 429 ) ) {
z2 = false ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
w ( ) ;
}
List < String > list = null ;
String str2 = ( list = = null | | list . size ( ) < = 0 ) ? null : list . get ( 0 ) ;
if ( ! ( i = = 404 | | i = = 304 ) ) {
H ( ) . w ( str , bArr , str2 ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
T . F ( System . currentTimeMillis ( ) ) ;
K ( ) . I ( T ) ;
if ( i ! = 404 ) {
2022-03-07 09:34:54 +00:00
this . k . g ( ) . k . b ( " Config not found. Using empty config. appId " , str ) ;
} else {
this . k . g ( ) . n . c ( " Successfully fetched config. Got network response. code, size " , Integer . valueOf ( i ) , Integer . valueOf ( bArr . length ) ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
if ( J ( ) . u ( ) | | ! v ( ) ) {
w ( ) ;
} else {
Q ( ) ;
2021-08-03 07:33:18 +00:00
}
}
2022-03-07 09:34:54 +00:00
if ( H ( ) . s ( str ) = = null ) {
H ( ) . w ( str , null , null ) ;
}
Objects . requireNonNull ( ( c ) this . k . o ) ;
T . F ( System . currentTimeMillis ( ) ) ;
K ( ) . I ( T ) ;
if ( i ! = 404 ) {
}
if ( J ( ) . u ( ) ) {
}
w ( ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
K ( ) . s ( ) ;
K ( ) . e0 ( ) ;
2021-08-03 07:33:18 +00:00
}
@WorkerThread
public final void s ( String str , d dVar ) {
if ( t8 . b ( ) & & this . k . h . o ( p . J0 ) ) {
U ( ) ;
P ( ) ;
2022-01-27 07:52:47 +00:00
this . f1543z . put ( str , dVar ) ;
2021-08-03 07:33:18 +00:00
g K = K ( ) ;
if ( t8 . b ( ) & & K . a . h . o ( p . J0 ) ) {
Objects . requireNonNull ( str , " null reference " ) ;
K . b ( ) ;
K . n ( ) ;
ContentValues contentValues = new ContentValues ( ) ;
contentValues . put ( " app_id " , str ) ;
contentValues . put ( " consent_state " , dVar . d ( ) ) ;
try {
if ( K . t ( ) . insertWithOnConflict ( " consent_settings " , null , contentValues , 5 ) = = - 1 ) {
K . g ( ) . f . b ( " Failed to insert/update consent setting (got -1). appId " , q3 . s ( str ) ) ;
}
} catch ( SQLiteException e ) {
K . g ( ) . f . c ( " Error storing consent setting. appId, error " , q3 . s ( str ) , e ) ;
}
}
}
}
2022-03-07 09:34:54 +00:00
/ * JADX ERROR : JadxRuntimeException in pass : BlockProcessor
jadx . core . utils . exceptions . JadxRuntimeException : Unreachable block : B : 72 : 0x018e
at jadx . core . dex . visitors . blocks . BlockProcessor . checkForUnreachableBlocks ( BlockProcessor . java : 90 )
at jadx . core . dex . visitors . blocks . BlockProcessor . processBlocksTree ( BlockProcessor . java : 52 )
at jadx . core . dex . visitors . blocks . BlockProcessor . visit ( BlockProcessor . java : 44 )
* /
@androidx.annotation.WorkerThread
public final boolean t ( long r44 ) {
/ *
Method dump skipped , instructions count : 4262
To view this dump add ' - - comments - level debug ' option
* /
throw new UnsupportedOperationException ( " Method not decompiled: b.i.a.f.i.b.k9.t(long):boolean " ) ;
2021-08-03 07:33:18 +00:00
}
public final boolean u ( a1 . a aVar , a1 . a aVar2 ) {
2021-11-05 06:48:17 +00:00
d . l ( " _e " . equals ( aVar . y ( ) ) ) ;
2021-08-03 07:33:18 +00:00
N ( ) ;
2021-11-02 06:38:17 +00:00
c1 w = q9 . w ( ( a1 ) ( ( u4 ) aVar . p ( ) ) , " _sc " ) ;
2021-08-03 07:33:18 +00:00
String str = null ;
2021-11-02 06:38:17 +00:00
String G = w = = null ? null : w . G ( ) ;
2021-08-03 07:33:18 +00:00
N ( ) ;
2021-11-02 06:38:17 +00:00
c1 w2 = q9 . w ( ( a1 ) ( ( u4 ) aVar2 . p ( ) ) , " _pc " ) ;
if ( w2 ! = null ) {
str = w2 . G ( ) ;
2021-08-03 07:33:18 +00:00
}
if ( str = = null | | ! str . equals ( G ) ) {
return false ;
}
A ( aVar , aVar2 ) ;
return true ;
}
public final boolean v ( ) {
U ( ) ;
P ( ) ;
2022-03-07 09:34:54 +00:00
return ( ( K ( ) . S ( " select count(1) > 0 from raw_events " , null ) > 0L ? 1 : ( K ( ) . S ( " select count(1) > 0 from raw_events " , null ) = = 0L ? 0 : - 1 ) ) ! = 0 ) | | ! TextUtils . isEmpty ( K ( ) . u ( ) ) ;
2021-08-03 07:33:18 +00:00
}
2022-03-07 09:34:54 +00:00
/* JADX WARN: Removed duplicated region for block: B:102:0x0399 */
/* JADX WARN: Removed duplicated region for block: B:26:0x00a8 */
/* JADX WARN: Removed duplicated region for block: B:32:0x00e4 */
/* JADX WARN: Removed duplicated region for block: B:35:0x012c */
/* JADX WARN: Removed duplicated region for block: B:56:0x01a4 */
/* JADX WARN: Removed duplicated region for block: B:58:0x01c2 */
2021-08-03 07:33:18 +00:00
@WorkerThread
2022-03-07 09:34:54 +00:00
/ *
Code decompiled incorrectly , please refer to instructions dump .
* /
2021-08-03 07:33:18 +00:00
public final void w ( ) {
boolean z2 ;
long j ;
long max ;
long j2 ;
int i ;
Method method ;
U ( ) ;
P ( ) ;
if ( this . n > 0 ) {
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
long abs = 3600000 - Math . abs ( SystemClock . elapsedRealtime ( ) - this . n ) ;
if ( abs > 0 ) {
this . k . g ( ) . n . b ( " Upload has been suspended. Will update scheduling later in approximately ms " , Long . valueOf ( abs ) ) ;
S ( ) . a ( ) ;
T ( ) . s ( ) ;
return ;
}
2022-03-07 09:34:54 +00:00
this . n = 0L ;
2021-08-03 07:33:18 +00:00
}
if ( ! this . k . m ( ) | | ! v ( ) ) {
this . k . g ( ) . n . a ( " Nothing to upload or uploading impossible " ) ;
S ( ) . a ( ) ;
T ( ) . s ( ) ;
return ;
}
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
long currentTimeMillis = System . currentTimeMillis ( ) ;
long max2 = Math . max ( 0L , p . A . a ( null ) . longValue ( ) ) ;
if ( ! ( K ( ) . S ( " select count(1) > 0 from raw_events where realtime = 1 " , null ) ! = 0 ) ) {
if ( ! ( K ( ) . S ( " select count(1) > 0 from queue where has_realtime = 1 " , null ) ! = 0 ) ) {
z2 = false ;
if ( ! z2 ) {
2022-01-13 08:07:50 +00:00
String h = this . k . h . h ( " debug.firebase.analytics.app " , " " ) ;
j = ( TextUtils . isEmpty ( h ) | | " .none. " . equals ( h ) ) ? Math . max ( 0L , p . u . a ( null ) . longValue ( ) ) : Math . max ( 0L , p . v . a ( null ) . longValue ( ) ) ;
2021-08-03 07:33:18 +00:00
} else {
j = Math . max ( 0L , p . t . a ( null ) . longValue ( ) ) ;
}
long a2 = this . k . o ( ) . f . a ( ) ;
long a3 = this . k . o ( ) . g . a ( ) ;
2022-03-07 09:34:54 +00:00
max = Math . max ( K ( ) . w ( " select max(bundle_end_timestamp) from queue " , null , 0L ) , K ( ) . w ( " select max(timestamp) from raw_events " , null , 0L ) ) ;
2021-08-03 07:33:18 +00:00
if ( max ! = 0 ) {
long abs2 = currentTimeMillis - Math . abs ( max - currentTimeMillis ) ;
long abs3 = currentTimeMillis - Math . abs ( a2 - currentTimeMillis ) ;
long abs4 = currentTimeMillis - Math . abs ( a3 - currentTimeMillis ) ;
long max3 = Math . max ( abs3 , abs4 ) ;
j2 = max2 + abs2 ;
if ( z2 & & max3 > 0 ) {
j2 = Math . min ( abs2 , max3 ) + j ;
}
if ( ! N ( ) . N ( max3 , j ) ) {
j2 = max3 + j ;
}
if ( abs4 ! = 0 & & abs4 > = abs2 ) {
2022-03-07 09:34:54 +00:00
for ( int i2 = 0 ; i2 < Math . min ( 20 , Math . max ( 0 , p . C . a ( null ) . intValue ( ) ) ) ; i2 + + ) {
2022-01-13 08:07:50 +00:00
j2 + = Math . max ( 0L , p . B . a ( null ) . longValue ( ) ) * ( 1 < < i2 ) ;
2021-08-03 07:33:18 +00:00
if ( j2 > abs4 ) {
break ;
}
}
}
if ( j2 = = 0 ) {
this . k . g ( ) . n . a ( " Next upload time is 0 " ) ;
S ( ) . a ( ) ;
T ( ) . s ( ) ;
return ;
} else if ( ! J ( ) . u ( ) ) {
this . k . g ( ) . n . a ( " No network " ) ;
b4 S = S ( ) ;
S . a . P ( ) ;
S . a . f ( ) . b ( ) ;
2022-01-27 07:52:47 +00:00
if ( ! S . f1517b ) {
S . a . k . f1567b . registerReceiver ( S , new IntentFilter ( " android.net.conn.CONNECTIVITY_CHANGE " ) ) ;
2021-12-17 21:59:34 +00:00
S . c = S . a . J ( ) . u ( ) ;
S . a . g ( ) . n . b ( " Registering connectivity change receiver. Network connected " , Boolean . valueOf ( S . c ) ) ;
2022-01-27 07:52:47 +00:00
S . f1517b = true ;
2021-08-03 07:33:18 +00:00
}
T ( ) . s ( ) ;
return ;
} else {
long a4 = this . k . o ( ) . h . a ( ) ;
2021-11-02 06:38:17 +00:00
long max4 = Math . max ( 0L , p . r . a ( null ) . longValue ( ) ) ;
2021-08-03 07:33:18 +00:00
if ( ! N ( ) . N ( a4 , max4 ) ) {
j2 = Math . max ( j2 , a4 + max4 ) ;
}
S ( ) . a ( ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
long currentTimeMillis2 = j2 - System . currentTimeMillis ( ) ;
if ( currentTimeMillis2 < = 0 ) {
2021-11-02 06:38:17 +00:00
currentTimeMillis2 = Math . max ( 0L , p . w . a ( null ) . longValue ( ) ) ;
2021-08-03 07:33:18 +00:00
h4 h4Var = this . k . o ( ) . f ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) this . k . o ) ;
2021-08-03 07:33:18 +00:00
h4Var . b ( System . currentTimeMillis ( ) ) ;
}
this . k . g ( ) . n . b ( " Upload scheduled in approximately ms " , Long . valueOf ( currentTimeMillis2 ) ) ;
h9 T = T ( ) ;
T . n ( ) ;
2022-01-27 07:52:47 +00:00
Context context = T . a . f1567b ;
2021-08-03 07:33:18 +00:00
if ( ! n4 . a ( context ) ) {
T . g ( ) . m . a ( " Receiver not registered/enabled " ) ;
}
if ( ! t9 . U ( context ) ) {
T . g ( ) . m . a ( " Service not registered/enabled " ) ;
}
T . s ( ) ;
T . g ( ) . n . b ( " Scheduling upload, millis " , Long . valueOf ( currentTimeMillis2 ) ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( ( c ) T . a . o ) ;
2021-08-03 07:33:18 +00:00
long elapsedRealtime = SystemClock . elapsedRealtime ( ) + currentTimeMillis2 ;
2022-01-27 07:52:47 +00:00
if ( currentTimeMillis2 < Math . max ( 0L , p . f1560x . a ( null ) . longValue ( ) ) ) {
2021-08-03 07:33:18 +00:00
if ( ! ( T . e . d ! = 0 ) ) {
T . e . b ( currentTimeMillis2 ) ;
}
}
if ( Build . VERSION . SDK_INT > = 24 ) {
2022-01-27 07:52:47 +00:00
Context context2 = T . a . f1567b ;
2021-08-03 07:33:18 +00:00
ComponentName componentName = new ComponentName ( context2 , " com.google.android.gms.measurement.AppMeasurementJobService " ) ;
int t = T . t ( ) ;
PersistableBundle persistableBundle = new PersistableBundle ( ) ;
persistableBundle . putString ( " action " , " com.google.android.gms.measurement.UPLOAD " ) ;
JobInfo build = new JobInfo . Builder ( t , componentName ) . setMinimumLatency ( currentTimeMillis2 ) . setOverrideDeadline ( currentTimeMillis2 < < 1 ) . setExtras ( persistableBundle ) . build ( ) ;
Method method2 = a4 . a ;
JobScheduler jobScheduler = ( JobScheduler ) context2 . getSystemService ( " jobscheduler " ) ;
if ( a4 . a = = null | | context2 . checkSelfPermission ( " android.permission.UPDATE_DEVICE_STATS " ) ! = 0 ) {
jobScheduler . schedule ( build ) ;
return ;
}
2022-01-27 07:52:47 +00:00
Method method3 = a4 . f1432b ;
2021-08-03 07:33:18 +00:00
if ( method3 ! = null ) {
try {
i = ( ( Integer ) method3 . invoke ( null , new Object [ 0 ] ) ) . intValue ( ) ;
} catch ( IllegalAccessException | InvocationTargetException e ) {
if ( Log . isLoggable ( " JobSchedulerCompat " , 6 ) ) {
Log . e ( " JobSchedulerCompat " , " myUserId invocation illegal " , e ) ;
}
}
method = a4 . a ;
if ( method ! = null ) {
try {
( ( Integer ) method . invoke ( jobScheduler , build , " com.google.android.gms " , Integer . valueOf ( i ) , " UploadAlarm " ) ) . intValue ( ) ;
return ;
} catch ( IllegalAccessException | InvocationTargetException e2 ) {
Log . e ( " UploadAlarm " , " error calling scheduleAsPackage " , e2 ) ;
}
}
jobScheduler . schedule ( build ) ;
return ;
}
i = 0 ;
method = a4 . a ;
if ( method ! = null ) {
}
jobScheduler . schedule ( build ) ;
return ;
}
2022-01-27 07:52:47 +00:00
T . d . setInexactRepeating ( 2 , elapsedRealtime , Math . max ( p . f1559s . a ( null ) . longValue ( ) , currentTimeMillis2 ) , T . u ( ) ) ;
2021-08-03 07:33:18 +00:00
return ;
}
}
j2 = 0 ;
if ( j2 = = 0 ) {
}
}
}
z2 = true ;
if ( ! z2 ) {
}
2022-03-07 09:34:54 +00:00
long a22 = this . k . o ( ) . f . a ( ) ;
long a32 = this . k . o ( ) . g . a ( ) ;
max = Math . max ( K ( ) . w ( " select max(bundle_end_timestamp) from queue " , null , 0L ) , K ( ) . w ( " select max(timestamp) from raw_events " , null , 0L ) ) ;
2021-08-03 07:33:18 +00:00
if ( max ! = 0 ) {
}
j2 = 0 ;
if ( j2 = = 0 ) {
}
}
@WorkerThread
public final void x ( ) {
U ( ) ;
2022-01-27 07:52:47 +00:00
if ( this . r | | this . f1540s | | this . t ) {
this . k . g ( ) . n . d ( " Not stopping services. fetch, network, upload " , Boolean . valueOf ( this . r ) , Boolean . valueOf ( this . f1540s ) , Boolean . valueOf ( this . t ) ) ;
2021-08-03 07:33:18 +00:00
return ;
}
this . k . g ( ) . n . a ( " Stopping uploading service(s) " ) ;
List < Runnable > list = this . o ;
if ( list ! = null ) {
for ( Runnable runnable : list ) {
runnable . run ( ) ;
}
this . o . clear ( ) ;
}
}
@WorkerThread
public final zzn y ( String str ) {
a4 T = K ( ) . T ( str ) ;
if ( T = = null | | TextUtils . isEmpty ( T . M ( ) ) ) {
this . k . g ( ) . m . b ( " No app data available; dropping " , str ) ;
return null ;
}
Boolean z2 = z ( T ) ;
if ( z2 = = null | | z2 . booleanValue ( ) ) {
2022-01-27 07:52:47 +00:00
return new zzn ( str , T . v ( ) , T . M ( ) , T . N ( ) , T . O ( ) , T . P ( ) , T . Q ( ) , ( String ) null , T . T ( ) , false , T . H ( ) , T . g ( ) , 0L , 0 , T . h ( ) , T . i ( ) , false , T . y ( ) , T . j ( ) , T . S ( ) , T . k ( ) , ( ! da . b ( ) | | ! this . k . h . u ( str , p . f1558j0 ) ) ? null : T . B ( ) , ( ! t8 . b ( ) | | ! this . k . h . o ( p . J0 ) ) ? " " : a ( str ) . d ( ) ) ;
2021-08-03 07:33:18 +00:00
}
this . k . g ( ) . f . b ( " App version does not match; dropping. appId " , q3 . s ( str ) ) ;
return null ;
}
@WorkerThread
public final Boolean z ( a4 a4Var ) {
try {
if ( a4Var . N ( ) ! = - 2147483648L ) {
2022-03-07 09:34:54 +00:00
if ( a4Var . N ( ) = = b . a ( this . k . f1567b ) . b ( a4Var . o ( ) , 0 ) . versionCode ) {
2021-08-03 07:33:18 +00:00
return Boolean . TRUE ;
}
} else {
2022-01-27 07:52:47 +00:00
String str = b . a ( this . k . f1567b ) . b ( a4Var . o ( ) , 0 ) . versionName ;
2021-08-03 07:33:18 +00:00
if ( a4Var . M ( ) ! = null & & a4Var . M ( ) . equals ( str ) ) {
return Boolean . TRUE ;
}
}
return Boolean . FALSE ;
} catch ( PackageManager . NameNotFoundException unused ) {
return null ;
}
}
}