package com.iBookStar.e.a; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import com.iBookStar.e.b.a; import com.iBookStar.utils.p; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; public class a { private Context a; /* renamed from: com.iBookStar.e.a.a$a reason: collision with other inner class name */ class ServiceConnectionC0069a implements ServiceConnection { final /* synthetic */ Object[] a; final /* synthetic */ CountDownLatch b; ServiceConnectionC0069a(Object[] objArr, CountDownLatch countDownLatch) { this.a = objArr; this.b = countDownLatch; } public void onServiceConnected(ComponentName componentName, IBinder iBinder) { try { p.a("ASUSDeviceIDHelper", "onServiceConnected"); this.a[0] = iBinder; this.b.countDown(); } catch (Throwable th) { a.this.a.unbindService(this); throw th; } a.this.a.unbindService(this); } public void onServiceDisconnected(ComponentName componentName) { p.a("ASUSDeviceIDHelper", "onServiceDisconnected"); } } public a(Context context) { this.a = context; } public String a() { try { if (this.a.getPackageManager().getPackageInfo("com.asus.msa.SupplementaryDID", 0) != null) { Intent intent = new Intent(); intent.setAction("com.asus.msa.action.ACCESS_DID"); intent.setComponent(new ComponentName("com.asus.msa.SupplementaryDID", "com.asus.msa.SupplementaryDID.SupplementaryDIDService")); Object[] objArr = new Object[1]; CountDownLatch countDownLatch = new CountDownLatch(1); if (this.a.bindService(intent, new ServiceConnectionC0069a(objArr, countDownLatch), 1)) { try { countDownLatch.await(3, TimeUnit.SECONDS); } catch (Throwable th) { th.printStackTrace(); } if (objArr[0] != null) { try { return new a.C0070a((IBinder) objArr[0]).b(); } catch (Throwable th2) { th2.printStackTrace(); } } } return null; } } catch (Throwable th3) { th3.printStackTrace(); } p.a("ASUSDeviceIDHelper", "not support oaid"); return null; } }