package com.xlx.speech.o; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import androidx.core.app.ActivityCompat; import com.xlx.speech.f.d; import com.xlx.speech.i.a; import com.xlx.speech.m0.b0; import com.xlx.speech.m0.w; import com.xlx.speech.m0.x; import com.xlx.speech.t.a; import com.xlx.speech.u.e; import com.xlx.speech.voicereadsdk.bean.resp.OverPageResult; import com.xlx.speech.voicereadsdk.bean.resp.PageConfig; import com.xlx.speech.voicereadsdk.bean.resp.RetryInstallResult; import com.xlx.speech.voicereadsdk.bean.resp.SingleAdDetailResult; import com.xlx.speech.voicereadsdk.entrance.SpeechVoiceSdk; public abstract class c extends a implements d { public SingleAdDetailResult c; public OverPageResult d; public PageConfig e; public RetryInstallResult f; public e g; public void a(RetryInstallResult retryInstallResult) { if (!TextUtils.isEmpty(retryInstallResult.getPackageName())) { View findViewById = findViewById(16908290); if (this.c.readFirst == 1) { if (c() != 1) { return; } } else if (!(retryInstallResult.getPromptTiming() == 1 && c() == 1) && (retryInstallResult.getPromptTiming() == 1 || c() <= 1)) { return; } b0.a(this, retryInstallResult, findViewById); } } public abstract int b(); public int c() { return getIntent().getIntExtra("EXTRA_PAGE_COUNT", 0); } public abstract void d(); public abstract void e(); public abstract void f(); public void g() { } public abstract void h(); @Override // com.xlx.speech.t.a public void onCreate(Bundle bundle) { super.onCreate(bundle); this.c = (SingleAdDetailResult) getIntent().getParcelableExtra("data"); this.d = (OverPageResult) getIntent().getParcelableExtra("EXTRA_OVER_PAGE"); this.e = (PageConfig) getIntent().getParcelableExtra("EXTRA_PAGE_CONFIG"); this.f = (RetryInstallResult) getIntent().getParcelableExtra("EXTRA_RETRY_INSTALL"); setContentView(b()); if (!this.c.readFirstSloganForce) { com.xlx.speech.a.a.a(this); if (SpeechVoiceSdk.getAdManger().getVoiceAdListener() != null) { SpeechVoiceSdk.getAdManger().getVoiceAdListener().onAdShow(); } } e eVar = new e(); this.g = eVar; PageConfig pageConfig = this.e; if (pageConfig == null) { a.C0409a.a.a.i(d.a(null)).enqueue(new a(this)); } else { eVar.d.a = pageConfig; } e(); h(); d(); f(); g(); RetryInstallResult retryInstallResult = this.f; if (retryInstallResult == null) { a.C0409a.a.a.f(d.a(null)).enqueue(new b(this)); } else { a(retryInstallResult); } } @Override // com.xlx.speech.t.a public void onDestroy() { super.onDestroy(); e eVar = this.g; if (eVar != null) { eVar.a(); } } @Override // com.xlx.speech.t.a public void onPause() { super.onPause(); e eVar = this.g; if (eVar != null) { eVar.b(); } } public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) { super.onRequestPermissionsResult(i, strArr, iArr); if (i == 1) { com.xlx.speech.e.c.a(w.a("android.permission.RECORD_AUDIO")); if (!w.a("android.permission.RECORD_AUDIO") && strArr.length > 0 && !ActivityCompat.shouldShowRequestPermissionRationale(this, strArr[0])) { x.b(this); } } } @Override // com.xlx.speech.t.a public void onResume() { super.onResume(); e eVar = this.g; if (eVar != null) { eVar.d(); } } }