示例#1
0
 public static void a(zq paramzq)
 {
   boolean bool1 = false;
   try
   {
     boolean bool2 = b;
     App.d(true);
     AccountManager localAccountManager = AccountManager.get(App.Mb.getApplicationContext());
     Account[] arrayOfAccount = localAccountManager.getAccountsByType(App.Mb.getString(2131296266));
     Account localAccount;
     if (arrayOfAccount.length <= 0)
     {
       localAccount = new Account(App.c(), App.Mb.getString(2131296266));
       localAccountManager.addAccountExplicitly(localAccount, null, null);
       if (!bool2);
     }
     else
     {
       localAccount = arrayOfAccount[0];
     }
     a(localAccount, paramzq.h, paramzq.b);
     App.d(false);
     if (App.wc != 0)
     {
       if (bool2)
         b = bool1;
     }
     else
       return;
     bool1 = true;
   }
   finally
   {
   }
 }
示例#2
0
 private static void a(Account paramAccount, String paramString1, String paramString2)
 {
   g5.b(z[3] + paramString1 + z[9] + paramString2);
   ArrayList localArrayList = new ArrayList();
   ContentProviderOperation.Builder localBuilder1 = ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI);
   localBuilder1.withValue(z[4], paramAccount.name);
   localBuilder1.withValue(z[10], paramAccount.type);
   localBuilder1.withValue(z[13], paramString2);
   localArrayList.add(localBuilder1.build());
   ContentProviderOperation.Builder localBuilder2 = ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI);
   localBuilder2.withValueBackReference(z[6], 0);
   localBuilder2.withValue(z[11], z[8]);
   localBuilder2.withValue(z[0], paramString1);
   localArrayList.add(localBuilder2.build());
   ContentProviderOperation.Builder localBuilder3 = ContentProviderOperation.newInsert(a(ContactsContract.Data.CONTENT_URI));
   localBuilder3.withValueBackReference(z[6], 0);
   localBuilder3.withValue(z[11], z[2]);
   localBuilder3.withValue(z[0], paramString2);
   localBuilder3.withValue(z[12], App.Mb.getString(2131296836));
   localBuilder3.withValue(z[1], "+" + paramString2.substring(0, paramString2.indexOf("@")));
   localArrayList.add(localBuilder3.build());
   try
   {
     App.ib.applyBatch(z[5], localArrayList);
     return;
   }
   catch (Exception localException)
   {
     while (true)
       g5.d(z[7] + paramString1 + z[9] + paramString2 + localException.toString());
   }
 }
示例#3
0
 public static void a()
 {
   Account localAccount = null;
   while (true)
   {
     AccountManager localAccountManager;
     try
     {
       tp.a = true;
       localAccountManager = AccountManager.get(App.Mb.getApplicationContext());
       Account[] arrayOfAccount = localAccountManager.getAccountsByType(App.Mb.getString(2131296266));
       int i = arrayOfAccount.length;
       if (i > 0)
         try
         {
           localAccount = arrayOfAccount[0];
           a(arrayOfAccount[0]);
           if (!ContentResolver.getSyncAutomatically(localAccount, z[5]))
             ContentResolver.setSyncAutomatically(localAccount, z[5], true);
           tp.a = false;
           return;
         }
         catch (OperationCanceledException localOperationCanceledException2)
         {
           g5.d(localOperationCanceledException2);
           continue;
         }
     }
     finally
     {
     }
     localAccount = new Account(App.c(), App.Mb.getString(2131296266));
     if (localAccountManager.addAccountExplicitly(localAccount, null, null))
     {
       g5.b(z[29]);
       ContentResolver.setIsSyncable(localAccount, z[5], 1);
       try
       {
         a(localAccount);
       }
       catch (OperationCanceledException localOperationCanceledException1)
       {
         g5.d(localOperationCanceledException1);
       }
     }
   }
 }
示例#4
0
 private static void a(Account paramAccount, ArrayList<zq> paramArrayList)
 {
   boolean bool = b;
   ArrayList localArrayList1 = new ArrayList();
   StringBuilder localStringBuilder = new StringBuilder();
   ArrayList localArrayList2 = new ArrayList();
   Iterator localIterator = paramArrayList.iterator();
   int k;
   for (int i = 0; ; i = k)
     while (true)
     {
       zq localzq;
       if (localIterator.hasNext())
       {
         localzq = (zq)localIterator.next();
         if (4 + localArrayList1.size() < a);
       }
       try
       {
         App.ib.applyBatch(z[5], localArrayList1);
         localArrayList1.clear();
         if (i > 0);
         localStringBuilder.delete(0, localStringBuilder.length());
         if (localzq.b.indexOf("@") <= 0)
         {
           localArrayList2.add(localzq);
           if (!bool);
         }
         else
         {
           int j = localArrayList1.size();
           localStringBuilder.append(localzq).append(z[9]);
           ContentProviderOperation.Builder localBuilder1 = ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI);
           localBuilder1.withValue(z[4], paramAccount.name);
           localBuilder1.withValue(z[10], paramAccount.type);
           localBuilder1.withValue(z[13], localzq.b);
           localArrayList1.add(localBuilder1.build());
           ContentProviderOperation.Builder localBuilder2 = ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI);
           localBuilder2.withValueBackReference(z[6], j);
           localBuilder2.withValue(z[11], z[8]);
           localBuilder2.withValue(z[0], localzq.h);
           localArrayList1.add(localBuilder2.build());
           ContentProviderOperation.Builder localBuilder3 = ContentProviderOperation.newInsert(a(ContactsContract.Data.CONTENT_URI));
           localBuilder3.withValueBackReference(z[6], j);
           localBuilder3.withValue(z[11], z[2]);
           localBuilder3.withValue(z[0], localzq.b);
           localBuilder3.withValue(z[12], App.Mb.getString(2131296836));
           localBuilder3.withValue(z[1], "+" + localzq.b.substring(0, localzq.b.indexOf("@")));
           localArrayList1.add(localBuilder3.build());
           if (Build.VERSION.SDK_INT >= 14)
           {
             ContentProviderOperation.Builder localBuilder4 = ContentProviderOperation.newUpdate(ContactsContract.AggregationExceptions.CONTENT_URI);
             localBuilder4.withValue(z[26], Long.valueOf(localzq.a()));
             localBuilder4.withValueBackReference(z[28], j);
             localBuilder4.withValue(z[24], Integer.valueOf(1));
             localArrayList1.add(localBuilder4.build());
           }
           k = i + 1;
           if (!bool)
             break;
         }
       }
       catch (Exception localException2)
       {
         try
         {
           while (true)
           {
             if (!localArrayList1.isEmpty())
             {
               App.ib.applyBatch(z[5], localArrayList1);
               localArrayList1.clear();
             }
             localStringBuilder.delete(0, localStringBuilder.length());
             return;
             localException2 = localException2;
             g5.d(z[25] + i + "/" + localException2.toString());
           }
         }
         catch (Exception localException1)
         {
           while (true)
           {
             g5.d(z[27] + localException1.toString());
             App.w.a(localArrayList2);
           }
         }
         finally
         {
           App.w.a(localArrayList2);
         }
       }
     }
 }