Example #1
0
 private synchronized boolean j() {
   boolean z = false;
   synchronized (this) {
     if (this.c == null) {
       C0596r.d(a, "connHelper = " + this.c);
     } else {
       c f = this.c.f();
       a a = a(f);
       if (a == null) {
         C0596r.d(a, "Callback is invalid " + f);
       } else if (a.a()) {
         C0596r.e(a, "In syncing = " + f);
         a.c();
         z = true;
       } else {
         if (this.c.j()) {
           a.b();
         }
         C0596r.e(a, "mAddress = " + f);
         z = this.c.a(a);
       }
     }
   }
   return z;
 }
Example #2
0
 public static boolean c(Context context) {
   if (b.h().t.a.booleanValue()) {
     return a(context, null, null);
   }
   C0596r.d(B.a, "syncTwoWayDataASynced !Config.getInstance().SHOES.ENABLE");
   return true;
 }
Example #3
0
 public static boolean d(Context context) {
   if (b.h().t.a.booleanValue()) {
     boolean a = F.a(context);
     if (a) {
       return a;
     }
     C0596r.e(B.a, "Failed to syncPartner from Manual");
     return a;
   }
   C0596r.d(B.a, "syncPartnerShoesFromLocal !Config.getInstance().SHOES.ENABLE");
   return true;
 }
Example #4
0
 public static boolean b(Context context) {
   if (!b.h().t.a.booleanValue()) {
     C0596r.d(B.a, "syncAllShoesDataToServerSynced !Config.getInstance().SHOES.ENABLE");
     return true;
   } else if (context != null) {
     return !cn.com.smartdevices.bracelet.shoes.sync.c.c.f(context)
         ? false
         : SyncShoesDataService.b(context);
   } else {
     throw new IllegalArgumentException();
   }
 }
Example #5
0
 private synchronized boolean b(c cVar) {
   boolean z = true;
   synchronized (this) {
     if (cVar != null) {
       if (!cVar.e()) {
         this.c = new C0632i(this.b, cVar);
         this.c.a(true);
       }
     }
     C0596r.d(a, "initShoesConnection identity = " + cVar);
     z = false;
   }
   return z;
 }
Example #6
0
 public static boolean a(Context context) {
   if (!b.h().t.a.booleanValue()) {
     C0596r.d(B.a, "isNeedToSyncDataToServer !Config.getInstance().SHOES.ENABLE");
     return false;
   } else if (context == null) {
     throw new IllegalArgumentException();
   } else {
     List g = t.g(context);
     if (g != null && g.size() > 0) {
       return true;
     }
     g = t.c(context);
     return g != null && g.size() > 0;
   }
 }
Example #7
0
 public static String a(String str, String str2) {
   String str3 = null;
   if (!TextUtils.isEmpty(str)) {
     if (TextUtils.isEmpty(str2)) {
       str2 = "yyyy-MM-dd";
     }
     try {
       SimpleDateFormat simpleDateFormat = new SimpleDateFormat(str2);
       simpleDateFormat.setLenient(false);
       str3 = simpleDateFormat.format(simpleDateFormat.parse(str));
     } catch (Exception e) {
       C0596r.d("TimeVerifier", e.getMessage());
     }
   }
   return str3;
 }
Example #8
0
 public void onFailure(int i, Header[] headerArr, byte[] bArr, Throwable th) {
   String a = R.a(bArr);
   this.a.a = false;
   C0596r.d("Sync", "syncTrackInfoToSever onFailure:" + a + ", statusCode = " + i);
 }
Example #9
0
 public void onClick(View view) {
   this.a.a(this.b, this.c);
   C0596r.d("StartUpActivity", "clickUrl = " + this.b);
   C0596r.d("StartUpActivity", "title = " + this.c);
 }
Example #10
0
 public void a(int i) {
   C0596r.d("unlockscreen", "onState state = " + i);
   if (i == 4) {
     this.a.x.a(this.a.H);
   }
 }