package com.xlx.speech.voicereadsdk.oaid.impl; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.os.IBinder; import com.xlx.speech.voicereadsdk.oaid.IGetter; import com.xlx.speech.voicereadsdk.oaid.IOAID; import com.xlx.speech.voicereadsdk.oaid.OAIDException; import com.xlx.speech.voicereadsdk.oaid.OAIDLog; import com.xlx.speech.voicereadsdk.oaid.aidl.asus.msa.SupplementaryDID.IDidAidlInterface; import com.xlx.speech.voicereadsdk.oaid.impl.OAIDService; /* access modifiers changed from: package-private */ public class AsusImpl implements IOAID { private final Context context; public AsusImpl(Context context2) { this.context = context2; } @Override // com.xlx.speech.voicereadsdk.oaid.IOAID public void doGet(IGetter iGetter) { if (this.context != null && iGetter != null) { Intent intent = new Intent("com.asus.msa.action.ACCESS_DID"); intent.setComponent(new ComponentName("com.asus.msa.SupplementaryDID", "com.asus.msa.SupplementaryDID.SupplementaryDIDService")); OAIDService.bind(this.context, intent, iGetter, new OAIDService.RemoteCaller() { /* class com.xlx.speech.voicereadsdk.oaid.impl.AsusImpl.AnonymousClass1 */ @Override // com.xlx.speech.voicereadsdk.oaid.impl.OAIDService.RemoteCaller public String callRemoteInterface(IBinder iBinder) { IDidAidlInterface asInterface = IDidAidlInterface.Stub.asInterface(iBinder); if (asInterface == null) { throw new OAIDException("IDidAidlInterface is null"); } else if (asInterface.isSupport()) { return asInterface.getOAID(); } else { throw new OAIDException("IDidAidlInterface#isSupport return false"); } } }); } } @Override // com.xlx.speech.voicereadsdk.oaid.IOAID public boolean supported() { Context context2 = this.context; if (context2 == null) { return false; } try { return context2.getPackageManager().getPackageInfo("com.asus.msa.SupplementaryDID", 0) != null; } catch (Exception e) { OAIDLog.print(e); return false; } } }