il.java 30.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Build.VERSION;
import com.google.android.gms.common.internal.zzac;
import com.google.android.gms.common.util.zze;
import com.google.android.gms.internal.zzry;
import com.google.android.gms.internal.zzsa;
import com.google.android.gms.internal.zzsb;
import com.google.android.gms.internal.zzsc;
import com.google.android.gms.internal.zzsj;
import com.google.android.gms.internal.zzsm;
import com.google.android.gms.internal.zzsp;
import com.google.android.gms.internal.zzsz;
import com.google.android.gms.internal.zztd;
import com.google.android.gms.internal.zztm;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public final class il
  extends zzsa
{
  private static final byte[] c = "\n".getBytes();
  private final String a = String.format("%s/%s (Linux; U; Android %s; %s; %s Build/%s)", new Object[] { "GoogleAnalytics", zzsb.VERSION, Build.VERSION.RELEASE, zztm.zza(Locale.getDefault()), Build.MODEL, Build.ID });
  private final im b;
  
  public il(zzsc paramzzsc)
  {
    super(paramzzsc);
    this.b = new im(paramzzsc.zznR());
  }
  
  private int a(URL paramURL)
  {
    zzac.zzw(paramURL);
    zzb("GET request", paramURL);
    Object localObject = null;
    URL localURL = null;
    try
    {
      paramURL = b(paramURL);
      localURL = paramURL;
      localObject = paramURL;
      paramURL.connect();
      localURL = paramURL;
      localObject = paramURL;
      a(paramURL);
      localURL = paramURL;
      localObject = paramURL;
      int i = paramURL.getResponseCode();
      if (i == 200)
      {
        localURL = paramURL;
        localObject = paramURL;
        zzmA().b();
      }
      localURL = paramURL;
      localObject = paramURL;
      zzb("GET status", Integer.valueOf(i));
      if (paramURL != null) {
        paramURL.disconnect();
      }
      return i;
    }
    catch (IOException paramURL)
    {
      localObject = localURL;
      zzd("Network GET connection error", paramURL);
      if (localURL != null) {
        localURL.disconnect();
      }
      return 0;
    }
    finally
    {
      if (localObject != null) {
        ((HttpURLConnection)localObject).disconnect();
      }
    }
  }
  
  /* Error */
  private int a(URL paramURL, byte[] paramArrayOfByte)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore 5
    //   3: aconst_null
    //   4: astore 7
    //   6: aconst_null
    //   7: astore 8
    //   9: aconst_null
    //   10: astore 6
    //   12: aload_1
    //   13: invokestatic 93	com/google/android/gms/common/internal/zzac:zzw	(Ljava/lang/Object;)Ljava/lang/Object;
    //   16: pop
    //   17: aload_2
    //   18: invokestatic 93	com/google/android/gms/common/internal/zzac:zzw	(Ljava/lang/Object;)Ljava/lang/Object;
    //   21: pop
    //   22: aload_0
    //   23: ldc -115
    //   25: aload_2
    //   26: arraylength
    //   27: invokestatic 130	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   30: aload_1
    //   31: invokevirtual 144	il:zzb	(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
    //   34: aload_0
    //   35: invokevirtual 148	il:zzkI	()Z
    //   38: ifeq +17 -> 55
    //   41: aload_0
    //   42: ldc -106
    //   44: new 18	java/lang/String
    //   47: dup
    //   48: aload_2
    //   49: invokespecial 153	java/lang/String:<init>	([B)V
    //   52: invokevirtual 155	il:zza	(Ljava/lang/String;Ljava/lang/Object;)V
    //   55: aload_0
    //   56: invokevirtual 159	il:getContext	()Landroid/content/Context;
    //   59: invokevirtual 165	android/content/Context:getPackageName	()Ljava/lang/String;
    //   62: pop
    //   63: aload_0
    //   64: aload_1
    //   65: invokespecial 102	il:b	(Ljava/net/URL;)Ljava/net/HttpURLConnection;
    //   68: astore_1
    //   69: aload_1
    //   70: astore 5
    //   72: aload 7
    //   74: astore_1
    //   75: aload 5
    //   77: astore 4
    //   79: aload 8
    //   81: astore 6
    //   83: aload 5
    //   85: iconst_1
    //   86: invokevirtual 169	java/net/HttpURLConnection:setDoOutput	(Z)V
    //   89: aload 7
    //   91: astore_1
    //   92: aload 5
    //   94: astore 4
    //   96: aload 8
    //   98: astore 6
    //   100: aload 5
    //   102: aload_2
    //   103: arraylength
    //   104: invokevirtual 173	java/net/HttpURLConnection:setFixedLengthStreamingMode	(I)V
    //   107: aload 7
    //   109: astore_1
    //   110: aload 5
    //   112: astore 4
    //   114: aload 8
    //   116: astore 6
    //   118: aload 5
    //   120: invokevirtual 107	java/net/HttpURLConnection:connect	()V
    //   123: aload 7
    //   125: astore_1
    //   126: aload 5
    //   128: astore 4
    //   130: aload 8
    //   132: astore 6
    //   134: aload 5
    //   136: invokevirtual 177	java/net/HttpURLConnection:getOutputStream	()Ljava/io/OutputStream;
    //   139: astore 7
    //   141: aload 7
    //   143: astore_1
    //   144: aload 5
    //   146: astore 4
    //   148: aload 7
    //   150: astore 6
    //   152: aload 7
    //   154: aload_2
    //   155: invokevirtual 182	java/io/OutputStream:write	([B)V
    //   158: aload 7
    //   160: astore_1
    //   161: aload 5
    //   163: astore 4
    //   165: aload 7
    //   167: astore 6
    //   169: aload_0
    //   170: aload 5
    //   172: invokespecial 110	il:a	(Ljava/net/HttpURLConnection;)V
    //   175: aload 7
    //   177: astore_1
    //   178: aload 5
    //   180: astore 4
    //   182: aload 7
    //   184: astore 6
    //   186: aload 5
    //   188: invokevirtual 114	java/net/HttpURLConnection:getResponseCode	()I
    //   191: istore_3
    //   192: iload_3
    //   193: sipush 200
    //   196: if_icmpne +21 -> 217
    //   199: aload 7
    //   201: astore_1
    //   202: aload 5
    //   204: astore 4
    //   206: aload 7
    //   208: astore 6
    //   210: aload_0
    //   211: invokevirtual 118	il:zzmA	()Lcom/google/android/gms/internal/zzry;
    //   214: invokevirtual 122	com/google/android/gms/internal/zzry:b	()V
    //   217: aload 7
    //   219: astore_1
    //   220: aload 5
    //   222: astore 4
    //   224: aload 7
    //   226: astore 6
    //   228: aload_0
    //   229: ldc -72
    //   231: iload_3
    //   232: invokestatic 130	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   235: invokevirtual 99	il:zzb	(Ljava/lang/String;Ljava/lang/Object;)V
    //   238: aload 7
    //   240: ifnull +8 -> 248
    //   243: aload 7
    //   245: invokevirtual 187	java/io/OutputStream:close	()V
    //   248: aload 5
    //   250: ifnull +8 -> 258
    //   253: aload 5
    //   255: invokevirtual 133	java/net/HttpURLConnection:disconnect	()V
    //   258: iload_3
    //   259: ireturn
    //   260: astore_1
    //   261: aload_0
    //   262: ldc -67
    //   264: aload_1
    //   265: invokevirtual 192	il:zze	(Ljava/lang/String;Ljava/lang/Object;)V
    //   268: goto -20 -> 248
    //   271: astore_2
    //   272: aconst_null
    //   273: astore 5
    //   275: aload 6
    //   277: astore_1
    //   278: aload 5
    //   280: astore 4
    //   282: aload_0
    //   283: ldc -62
    //   285: aload_2
    //   286: invokevirtual 138	il:zzd	(Ljava/lang/String;Ljava/lang/Object;)V
    //   289: aload 6
    //   291: ifnull +8 -> 299
    //   294: aload 6
    //   296: invokevirtual 187	java/io/OutputStream:close	()V
    //   299: aload 5
    //   301: ifnull +8 -> 309
    //   304: aload 5
    //   306: invokevirtual 133	java/net/HttpURLConnection:disconnect	()V
    //   309: iconst_0
    //   310: ireturn
    //   311: astore_1
    //   312: aload_0
    //   313: ldc -67
    //   315: aload_1
    //   316: invokevirtual 192	il:zze	(Ljava/lang/String;Ljava/lang/Object;)V
    //   319: goto -20 -> 299
    //   322: astore_2
    //   323: aconst_null
    //   324: astore 4
    //   326: aload 5
    //   328: astore_1
    //   329: aload_1
    //   330: ifnull +7 -> 337
    //   333: aload_1
    //   334: invokevirtual 187	java/io/OutputStream:close	()V
    //   337: aload 4
    //   339: ifnull +8 -> 347
    //   342: aload 4
    //   344: invokevirtual 133	java/net/HttpURLConnection:disconnect	()V
    //   347: aload_2
    //   348: athrow
    //   349: astore_1
    //   350: aload_0
    //   351: ldc -67
    //   353: aload_1
    //   354: invokevirtual 192	il:zze	(Ljava/lang/String;Ljava/lang/Object;)V
    //   357: goto -20 -> 337
    //   360: astore_2
    //   361: goto -32 -> 329
    //   364: astore_2
    //   365: goto -90 -> 275
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	368	0	this	il
    //   0	368	1	paramURL	URL
    //   0	368	2	paramArrayOfByte	byte[]
    //   191	68	3	i	int
    //   77	266	4	localURL1	URL
    //   1	326	5	localURL2	URL
    //   10	285	6	localObject1	Object
    //   4	240	7	localOutputStream	java.io.OutputStream
    //   7	124	8	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   243	248	260	java/io/IOException
    //   55	69	271	java/io/IOException
    //   294	299	311	java/io/IOException
    //   55	69	322	finally
    //   333	337	349	java/io/IOException
    //   83	89	360	finally
    //   100	107	360	finally
    //   118	123	360	finally
    //   134	141	360	finally
    //   152	158	360	finally
    //   169	175	360	finally
    //   186	192	360	finally
    //   210	217	360	finally
    //   228	238	360	finally
    //   282	289	360	finally
    //   83	89	364	java/io/IOException
    //   100	107	364	java/io/IOException
    //   118	123	364	java/io/IOException
    //   134	141	364	java/io/IOException
    //   152	158	364	java/io/IOException
    //   169	175	364	java/io/IOException
    //   186	192	364	java/io/IOException
    //   210	217	364	java/io/IOException
    //   228	238	364	java/io/IOException
  }
  
  private URL a(zzsz paramzzsz)
  {
    String str;
    if (paramzzsz.zzpS())
    {
      paramzzsz = String.valueOf(zznT().zzpj());
      str = String.valueOf(zznT().zzpl());
      if (str.length() != 0) {}
      for (paramzzsz = paramzzsz.concat(str);; paramzzsz = new String(paramzzsz)) {
        try
        {
          paramzzsz = new URL(paramzzsz);
          return paramzzsz;
        }
        catch (MalformedURLException paramzzsz)
        {
          zze("Error trying to parse the hardcoded host url", paramzzsz);
        }
      }
    }
    else
    {
      paramzzsz = String.valueOf(zznT().zzpk());
      str = String.valueOf(zznT().zzpl());
      if (str.length() != 0) {}
      for (paramzzsz = paramzzsz.concat(str);; paramzzsz = new String(paramzzsz)) {
        break;
      }
    }
    return null;
  }
  
  private URL a(zzsz paramzzsz, String paramString)
  {
    String str;
    if (paramzzsz.zzpS())
    {
      paramzzsz = String.valueOf(zznT().zzpj());
      str = String.valueOf(zznT().zzpl());
    }
    for (paramzzsz = String.valueOf(paramzzsz).length() + 1 + String.valueOf(str).length() + String.valueOf(paramString).length() + paramzzsz + str + "?" + paramString;; paramzzsz = String.valueOf(paramzzsz).length() + 1 + String.valueOf(str).length() + String.valueOf(paramString).length() + paramzzsz + str + "?" + paramString)
    {
      try
      {
        paramzzsz = new URL(paramzzsz);
        return paramzzsz;
      }
      catch (MalformedURLException paramzzsz)
      {
        zze("Error trying to parse the hardcoded host url", paramzzsz);
      }
      paramzzsz = String.valueOf(zznT().zzpk());
      str = String.valueOf(zznT().zzpl());
    }
    return null;
  }
  
  private static void a(StringBuilder paramStringBuilder, String paramString1, String paramString2)
    throws UnsupportedEncodingException
  {
    if (paramStringBuilder.length() != 0) {
      paramStringBuilder.append('&');
    }
    paramStringBuilder.append(URLEncoder.encode(paramString1, "UTF-8"));
    paramStringBuilder.append('=');
    paramStringBuilder.append(URLEncoder.encode(paramString2, "UTF-8"));
  }
  
  private void a(HttpURLConnection paramHttpURLConnection)
    throws IOException
  {
    localHttpURLConnection = null;
    try
    {
      paramHttpURLConnection = paramHttpURLConnection.getInputStream();
      localHttpURLConnection = paramHttpURLConnection;
      byte[] arrayOfByte = new byte['Ѐ'];
      int i;
      do
      {
        localHttpURLConnection = paramHttpURLConnection;
        i = paramHttpURLConnection.read(arrayOfByte);
      } while (i > 0);
      if (paramHttpURLConnection != null) {}
      try
      {
        paramHttpURLConnection.close();
        return;
      }
      catch (IOException paramHttpURLConnection)
      {
        zze("Error closing http connection input stream", paramHttpURLConnection);
        return;
      }
      try
      {
        localHttpURLConnection.close();
        throw paramHttpURLConnection;
      }
      catch (IOException localIOException)
      {
        for (;;)
        {
          zze("Error closing http connection input stream", localIOException);
        }
      }
    }
    finally
    {
      if (localHttpURLConnection == null) {}
    }
  }
  
  /* Error */
  private int b(URL paramURL, byte[] paramArrayOfByte)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore 5
    //   3: aconst_null
    //   4: astore 4
    //   6: aload_1
    //   7: invokestatic 93	com/google/android/gms/common/internal/zzac:zzw	(Ljava/lang/Object;)Ljava/lang/Object;
    //   10: pop
    //   11: aload_2
    //   12: invokestatic 93	com/google/android/gms/common/internal/zzac:zzw	(Ljava/lang/Object;)Ljava/lang/Object;
    //   15: pop
    //   16: aload_0
    //   17: invokevirtual 159	il:getContext	()Landroid/content/Context;
    //   20: invokevirtual 165	android/content/Context:getPackageName	()Ljava/lang/String;
    //   23: pop
    //   24: new 280	java/io/ByteArrayOutputStream
    //   27: dup
    //   28: invokespecial 282	java/io/ByteArrayOutputStream:<init>	()V
    //   31: astore 6
    //   33: new 284	java/util/zip/GZIPOutputStream
    //   36: dup
    //   37: aload 6
    //   39: invokespecial 287	java/util/zip/GZIPOutputStream:<init>	(Ljava/io/OutputStream;)V
    //   42: astore 7
    //   44: aload 7
    //   46: aload_2
    //   47: invokevirtual 288	java/util/zip/GZIPOutputStream:write	([B)V
    //   50: aload 7
    //   52: invokevirtual 289	java/util/zip/GZIPOutputStream:close	()V
    //   55: aload 6
    //   57: invokevirtual 290	java/io/ByteArrayOutputStream:close	()V
    //   60: aload 6
    //   62: invokevirtual 293	java/io/ByteArrayOutputStream:toByteArray	()[B
    //   65: astore 6
    //   67: aload_0
    //   68: ldc_w 295
    //   71: aload 6
    //   73: arraylength
    //   74: invokestatic 130	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   77: ldc2_w 296
    //   80: aload 6
    //   82: arraylength
    //   83: i2l
    //   84: lmul
    //   85: aload_2
    //   86: arraylength
    //   87: i2l
    //   88: ldiv
    //   89: invokestatic 302	java/lang/Long:valueOf	(J)Ljava/lang/Long;
    //   92: aload_1
    //   93: invokevirtual 305	il:zza	(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
    //   96: aload 6
    //   98: arraylength
    //   99: aload_2
    //   100: arraylength
    //   101: if_icmple +21 -> 122
    //   104: aload_0
    //   105: ldc_w 307
    //   108: aload 6
    //   110: arraylength
    //   111: invokestatic 130	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   114: aload_2
    //   115: arraylength
    //   116: invokestatic 130	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   119: invokevirtual 310	il:zzc	(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
    //   122: aload_0
    //   123: invokevirtual 148	il:zzkI	()Z
    //   126: ifeq +37 -> 163
    //   129: new 18	java/lang/String
    //   132: dup
    //   133: aload_2
    //   134: invokespecial 153	java/lang/String:<init>	([B)V
    //   137: invokestatic 214	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   140: astore_2
    //   141: aload_2
    //   142: invokevirtual 220	java/lang/String:length	()I
    //   145: ifeq +109 -> 254
    //   148: ldc 16
    //   150: aload_2
    //   151: invokevirtual 224	java/lang/String:concat	(Ljava/lang/String;)Ljava/lang/String;
    //   154: astore_2
    //   155: aload_0
    //   156: ldc_w 312
    //   159: aload_2
    //   160: invokevirtual 155	il:zza	(Ljava/lang/String;Ljava/lang/Object;)V
    //   163: aload_0
    //   164: aload_1
    //   165: invokespecial 102	il:b	(Ljava/net/URL;)Ljava/net/HttpURLConnection;
    //   168: astore_1
    //   169: aload_1
    //   170: iconst_1
    //   171: invokevirtual 169	java/net/HttpURLConnection:setDoOutput	(Z)V
    //   174: aload_1
    //   175: ldc_w 314
    //   178: ldc_w 316
    //   181: invokevirtual 320	java/net/HttpURLConnection:addRequestProperty	(Ljava/lang/String;Ljava/lang/String;)V
    //   184: aload_1
    //   185: aload 6
    //   187: arraylength
    //   188: invokevirtual 173	java/net/HttpURLConnection:setFixedLengthStreamingMode	(I)V
    //   191: aload_1
    //   192: invokevirtual 107	java/net/HttpURLConnection:connect	()V
    //   195: aload_1
    //   196: invokevirtual 177	java/net/HttpURLConnection:getOutputStream	()Ljava/io/OutputStream;
    //   199: astore_2
    //   200: aload_2
    //   201: aload 6
    //   203: invokevirtual 182	java/io/OutputStream:write	([B)V
    //   206: aload_2
    //   207: invokevirtual 187	java/io/OutputStream:close	()V
    //   210: aload_0
    //   211: aload_1
    //   212: invokespecial 110	il:a	(Ljava/net/HttpURLConnection;)V
    //   215: aload_1
    //   216: invokevirtual 114	java/net/HttpURLConnection:getResponseCode	()I
    //   219: istore_3
    //   220: iload_3
    //   221: sipush 200
    //   224: if_icmpne +10 -> 234
    //   227: aload_0
    //   228: invokevirtual 118	il:zzmA	()Lcom/google/android/gms/internal/zzry;
    //   231: invokevirtual 122	com/google/android/gms/internal/zzry:b	()V
    //   234: aload_0
    //   235: ldc -72
    //   237: iload_3
    //   238: invokestatic 130	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   241: invokevirtual 99	il:zzb	(Ljava/lang/String;Ljava/lang/Object;)V
    //   244: aload_1
    //   245: ifnull +7 -> 252
    //   248: aload_1
    //   249: invokevirtual 133	java/net/HttpURLConnection:disconnect	()V
    //   252: iload_3
    //   253: ireturn
    //   254: new 18	java/lang/String
    //   257: dup
    //   258: ldc 16
    //   260: invokespecial 230	java/lang/String:<init>	(Ljava/lang/String;)V
    //   263: astore_2
    //   264: goto -109 -> 155
    //   267: astore_2
    //   268: aconst_null
    //   269: astore_1
    //   270: aload_0
    //   271: ldc_w 322
    //   274: aload_2
    //   275: invokevirtual 138	il:zzd	(Ljava/lang/String;Ljava/lang/Object;)V
    //   278: aload 4
    //   280: ifnull +8 -> 288
    //   283: aload 4
    //   285: invokevirtual 187	java/io/OutputStream:close	()V
    //   288: aload_1
    //   289: ifnull +7 -> 296
    //   292: aload_1
    //   293: invokevirtual 133	java/net/HttpURLConnection:disconnect	()V
    //   296: iconst_0
    //   297: ireturn
    //   298: astore_2
    //   299: aload_0
    //   300: ldc_w 324
    //   303: aload_2
    //   304: invokevirtual 192	il:zze	(Ljava/lang/String;Ljava/lang/Object;)V
    //   307: goto -19 -> 288
    //   310: astore_2
    //   311: aconst_null
    //   312: astore_1
    //   313: aload 5
    //   315: astore 4
    //   317: aload 4
    //   319: ifnull +8 -> 327
    //   322: aload 4
    //   324: invokevirtual 187	java/io/OutputStream:close	()V
    //   327: aload_1
    //   328: ifnull +7 -> 335
    //   331: aload_1
    //   332: invokevirtual 133	java/net/HttpURLConnection:disconnect	()V
    //   335: aload_2
    //   336: athrow
    //   337: astore 4
    //   339: aload_0
    //   340: ldc_w 324
    //   343: aload 4
    //   345: invokevirtual 192	il:zze	(Ljava/lang/String;Ljava/lang/Object;)V
    //   348: goto -21 -> 327
    //   351: astore_2
    //   352: aload 5
    //   354: astore 4
    //   356: goto -39 -> 317
    //   359: astore 5
    //   361: aload_2
    //   362: astore 4
    //   364: aload 5
    //   366: astore_2
    //   367: goto -50 -> 317
    //   370: astore_2
    //   371: goto -54 -> 317
    //   374: astore_2
    //   375: goto -105 -> 270
    //   378: astore 5
    //   380: aload_2
    //   381: astore 4
    //   383: aload 5
    //   385: astore_2
    //   386: goto -116 -> 270
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	389	0	this	il
    //   0	389	1	paramURL	URL
    //   0	389	2	paramArrayOfByte	byte[]
    //   219	34	3	i	int
    //   4	319	4	localObject1	Object
    //   337	7	4	localIOException1	IOException
    //   354	28	4	localObject2	Object
    //   1	352	5	localObject3	Object
    //   359	6	5	localObject4	Object
    //   378	6	5	localIOException2	IOException
    //   31	171	6	localObject5	Object
    //   42	9	7	localGZIPOutputStream	java.util.zip.GZIPOutputStream
    // Exception table:
    //   from	to	target	type
    //   16	122	267	java/io/IOException
    //   122	155	267	java/io/IOException
    //   155	163	267	java/io/IOException
    //   163	169	267	java/io/IOException
    //   254	264	267	java/io/IOException
    //   283	288	298	java/io/IOException
    //   16	122	310	finally
    //   122	155	310	finally
    //   155	163	310	finally
    //   163	169	310	finally
    //   254	264	310	finally
    //   322	327	337	java/io/IOException
    //   169	200	351	finally
    //   210	220	351	finally
    //   227	234	351	finally
    //   234	244	351	finally
    //   200	210	359	finally
    //   270	278	370	finally
    //   169	200	374	java/io/IOException
    //   210	220	374	java/io/IOException
    //   227	234	374	java/io/IOException
    //   234	244	374	java/io/IOException
    //   200	210	378	java/io/IOException
  }
  
  private HttpURLConnection b(URL paramURL)
    throws IOException
  {
    paramURL = paramURL.openConnection();
    if (!(paramURL instanceof HttpURLConnection)) {
      throw new IOException("Failed to obtain http connection");
    }
    paramURL = (HttpURLConnection)paramURL;
    paramURL.setDefaultUseCaches(false);
    paramURL.setConnectTimeout(zznT().zzpw());
    paramURL.setReadTimeout(zznT().zzpx());
    paramURL.setInstanceFollowRedirects(false);
    paramURL.setRequestProperty("User-Agent", this.a);
    paramURL.setDoInput(true);
    return paramURL;
  }
  
  private List<Long> b(List<zzsz> paramList)
  {
    ArrayList localArrayList = new ArrayList(paramList.size());
    paramList = paramList.iterator();
    zzsz localzzsz;
    boolean bool;
    label58:
    Object localObject;
    int i;
    if (paramList.hasNext())
    {
      localzzsz = (zzsz)paramList.next();
      zzac.zzw(localzzsz);
      if (localzzsz.zzpS()) {
        break label126;
      }
      bool = true;
      localObject = a(localzzsz, bool);
      if (localObject != null) {
        break label131;
      }
      zznS().zza(localzzsz, "Error formatting hit for upload");
      i = 1;
    }
    for (;;)
    {
      if (i != 0)
      {
        localArrayList.add(Long.valueOf(localzzsz.zzpP()));
        if (localArrayList.size() < zznT().zzpg()) {
          break;
        }
      }
      return localArrayList;
      label126:
      bool = false;
      break label58;
      label131:
      if (((String)localObject).length() <= zznT().zzoY())
      {
        localObject = a(localzzsz, (String)localObject);
        if (localObject == null) {
          zzbT("Failed to build collect GET endpoint url");
        }
      }
      URL localURL;
      label286:
      do
      {
        for (;;)
        {
          i = 0;
          break;
          if (a((URL)localObject) == 200)
          {
            i = 1;
            break;
          }
          i = 0;
          break;
          localObject = a(localzzsz, false);
          if (localObject == null)
          {
            zznS().zza(localzzsz, "Error formatting hit for POST upload");
            i = 1;
            break;
          }
          localObject = ((String)localObject).getBytes();
          if (localObject.length > zznT().zzpa())
          {
            zznS().zza(localzzsz, "Hit payload exceeds size limit");
            i = 1;
            break;
          }
          localURL = a(localzzsz);
          if (localURL != null) {
            break label286;
          }
          zzbT("Failed to build collect POST endpoint url");
        }
      } while (a(localURL, (byte[])localObject) != 200);
      i = 1;
    }
  }
  
  private URL c()
  {
    Object localObject = String.valueOf(zznT().zzpj());
    String str = String.valueOf(zznT().zzpm());
    if (str.length() != 0) {}
    for (localObject = ((String)localObject).concat(str);; localObject = new String((String)localObject)) {
      try
      {
        localObject = new URL((String)localObject);
        return (URL)localObject;
      }
      catch (MalformedURLException localMalformedURLException)
      {
        zze("Error trying to parse the hardcoded host url", localMalformedURLException);
      }
    }
    return null;
  }
  
  final String a(zzsz paramzzsz, boolean paramBoolean)
  {
    zzac.zzw(paramzzsz);
    StringBuilder localStringBuilder = new StringBuilder();
    try
    {
      Iterator localIterator = paramzzsz.zzfE().entrySet().iterator();
      while (localIterator.hasNext())
      {
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        String str = (String)localEntry.getKey();
        if ((!"ht".equals(str)) && (!"qt".equals(str)) && (!"AppUID".equals(str)) && (!"z".equals(str)) && (!"_gmsv".equals(str))) {
          a(localStringBuilder, str, (String)localEntry.getValue());
        }
      }
      a(localStringBuilder, "ht", String.valueOf(paramzzsz.zzpQ()));
    }
    catch (UnsupportedEncodingException paramzzsz)
    {
      zze("Failed to encode name or value", paramzzsz);
      return null;
    }
    a(localStringBuilder, "qt", String.valueOf(zznR().currentTimeMillis() - paramzzsz.zzpQ()));
    long l;
    if (paramBoolean)
    {
      l = paramzzsz.zzpT();
      if (l == 0L) {
        break label225;
      }
    }
    for (paramzzsz = String.valueOf(l);; paramzzsz = String.valueOf(l))
    {
      a(localStringBuilder, "z", paramzzsz);
      return localStringBuilder.toString();
      label225:
      l = paramzzsz.zzpP();
    }
  }
  
  public final List<Long> a(List<zzsz> paramList)
  {
    boolean bool2 = true;
    zzmR();
    zzob();
    zzac.zzw(paramList);
    int j;
    boolean bool1;
    int i;
    if ((zznT().zzpp().isEmpty()) || (!this.b.a(zznT().zzpi() * 1000L)))
    {
      j = 0;
      bool1 = false;
      i = j;
      label59:
      if (i == 0) {
        break label359;
      }
      if (paramList.isEmpty()) {
        break label214;
      }
    }
    il.a locala;
    ArrayList localArrayList;
    for (;;)
    {
      zzac.zzax(bool2);
      zza("Uploading batched hits. compression, count", Boolean.valueOf(bool1), Integer.valueOf(paramList.size()));
      locala = new il.a();
      localArrayList = new ArrayList();
      paramList = paramList.iterator();
      while (paramList.hasNext())
      {
        zzsz localzzsz = (zzsz)paramList.next();
        if (!locala.a(localzzsz)) {
          break;
        }
        localArrayList.add(Long.valueOf(localzzsz.zzpP()));
      }
      if (zznT().zzpn() != zzsj.zzaeL) {}
      for (i = 1;; i = 0)
      {
        j = i;
        if (zznT().zzpo() != zzsm.zzaeW) {
          break;
        }
        bool1 = true;
        break label59;
      }
      label214:
      bool2 = false;
    }
    if (locala.a == 0) {
      return localArrayList;
    }
    paramList = c();
    if (paramList == null) {
      zzbT("Failed to build batching endpoint url");
    }
    for (;;)
    {
      return Collections.emptyList();
      if (bool1) {}
      for (i = b(paramList, locala.b.toByteArray()); 200 == i; i = a(paramList, locala.b.toByteArray()))
      {
        zza("Batched upload completed. Hits batched", Integer.valueOf(locala.a));
        return localArrayList;
      }
      zza("Network error uploading hits. status code", Integer.valueOf(i));
      if (zznT().zzpp().contains(Integer.valueOf(i)))
      {
        zzbS("Server instructed the client to stop batching");
        this.b.a();
      }
    }
    label359:
    return b(paramList);
  }
  
  public final boolean a()
  {
    zzmR();
    zzob();
    Object localObject1 = (ConnectivityManager)getContext().getSystemService("connectivity");
    try
    {
      localObject1 = ((ConnectivityManager)localObject1).getActiveNetworkInfo();
      if ((localObject1 == null) || (!((NetworkInfo)localObject1).isConnected()))
      {
        zzbP("No network connectivity");
        return false;
      }
    }
    catch (SecurityException localSecurityException)
    {
      for (;;)
      {
        Object localObject2 = null;
      }
    }
    return true;
  }
  
  protected final void zzmS()
  {
    zza("Network initialized. User agent", this.a);
  }
  
  final class a
  {
    int a;
    ByteArrayOutputStream b = new ByteArrayOutputStream();
    
    public a() {}
    
    public final boolean a(zzsz paramzzsz)
    {
      zzac.zzw(paramzzsz);
      if (this.a + 1 > il.this.zznT().zzph()) {
        return false;
      }
      Object localObject = il.this.a(paramzzsz, false);
      if (localObject == null)
      {
        il.this.zznS().zza(paramzzsz, "Error formatting hit");
        return true;
      }
      localObject = ((String)localObject).getBytes();
      int j = localObject.length;
      if (j > il.this.zznT().zzoZ())
      {
        il.this.zznS().zza(paramzzsz, "Hit size exceeds the maximum size limit");
        return true;
      }
      int i = j;
      if (this.b.size() > 0) {
        i = j + 1;
      }
      if (i + this.b.size() > il.this.zznT().zzpb()) {
        return false;
      }
      try
      {
        if (this.b.size() > 0) {
          this.b.write(il.b());
        }
        this.b.write((byte[])localObject);
        this.a += 1;
        return true;
      }
      catch (IOException paramzzsz)
      {
        il.this.zze("Failed to write payload when batching hits", paramzzsz);
      }
      return true;
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/il.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */