翰林优商.apk(点击下载) / SpeechVoiceClockLandingActivity.java
package com.xlx.speech.voicereadsdk.ui.activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.xlx.speech.b.a;
import com.xlx.speech.m0.f0;
import com.xlx.speech.m0.i0;
import com.xlx.speech.m0.j;
import com.xlx.speech.m0.m;
import com.xlx.speech.m0.s;
import com.xlx.speech.m0.u;
import com.xlx.speech.o.l;
import com.xlx.speech.s.c;
import com.xlx.speech.s.d;
import com.xlx.speech.voicereadsdk.R;
import com.xlx.speech.voicereadsdk.bean.resp.OverPageResult;
import com.xlx.speech.voicereadsdk.bean.resp.SingleAdDetailResult;
import com.xlx.speech.voicereadsdk.ui.widget.DownloadButton;
import com.xlx.speech.voicereadsdk.ui.widget.XlxVoiceTitleBar;
import java.util.HashMap;
import java.util.List;
public class SpeechVoiceClockLandingActivity extends com.xlx.speech.t.a {
public static final /* synthetic */ int t = 0;
public u.b c;
public a.c d;
public com.xlx.speech.s.b e;
public d f;
public OverPageResult g;
public SingleAdDetailResult h;
public RecyclerView i;
public XlxVoiceTitleBar j;
public TextView k;
public TextView l;
public TextView m;
public ImageView n;
public u o;
public DownloadButton p;
public ImageView q;
public boolean r;
public boolean s = false;
public class a extends s {
public a() {
}
@Override // com.xlx.speech.m0.s
public void a(View view) {
SpeechVoiceClockLandingActivity speechVoiceClockLandingActivity = SpeechVoiceClockLandingActivity.this;
m.a(speechVoiceClockLandingActivity, speechVoiceClockLandingActivity.j.b.h, speechVoiceClockLandingActivity.o, speechVoiceClockLandingActivity.h);
}
}
/* access modifiers changed from: private */
public /* synthetic */ void a(View view) {
m.a(this, this.o, this.g, this.h);
}
/* access modifiers changed from: private */
public /* synthetic */ void d() {
SingleAdDetailResult singleAdDetailResult = this.h;
i0.a(singleAdDetailResult.logId, singleAdDetailResult.icpmOne);
this.r = true;
}
public final void b() {
a.c a2;
this.e.a(this.g.getKeyword());
this.k.setText(this.g.getAdvertName());
this.m.setText(String.format("“ %s ”", this.g.getAdContent()));
this.l.setText(this.g.getAdIntroduce());
this.p.setText(this.g.getButtonMsg());
XlxVoiceTitleBar xlxVoiceTitleBar = this.j;
f0.a(xlxVoiceTitleBar.a, this.g.getPageTitle(), this.g.getPageTitleHighlight(), "#FF7800");
j.a().loadImage(this, this.g.getIconUrl(), this.n);
List<D> list = (List<D>) this.g.getRewardList();
if (list != null && list.size() > 0) {
this.i.setLayoutManager(new GridLayoutManager(this, list.size()));
d dVar = this.f;
dVar.b = list;
dVar.notifyDataSetChanged();
}
XlxVoiceTitleBar xlxVoiceTitleBar2 = this.j;
xlxVoiceTitleBar2.b.a(this.g.getDelaySeconds(), true, false, "");
xlxVoiceTitleBar2.a.setSelected(true);
xlxVoiceTitleBar2.a.setFocusable(true);
if (this.g.getButtonType() == 1) {
a2 = com.xlx.speech.b.a.b(this.p);
} else {
if (this.g.getButtonType() == 2) {
this.q.setVisibility(0);
a2 = com.xlx.speech.b.a.a(this.q);
}
HashMap hashMap = new HashMap();
hashMap.put("reward", this.g.getReward());
hashMap.put("ad_name", this.g.getAdvertName());
hashMap.put("type", Integer.valueOf(this.g.getPageMode()));
hashMap.put(CampaignEx.JSON_KEY_LANDING_TYPE, 0);
com.xlx.speech.i.b.a("landing_page_view", hashMap);
}
this.d = a2;
HashMap hashMap2 = new HashMap();
hashMap2.put("reward", this.g.getReward());
hashMap2.put("ad_name", this.g.getAdvertName());
hashMap2.put("type", Integer.valueOf(this.g.getPageMode()));
hashMap2.put(CampaignEx.JSON_KEY_LANDING_TYPE, 0);
com.xlx.speech.i.b.a("landing_page_view", hashMap2);
}
public final void c() {
SingleAdDetailResult singleAdDetailResult = this.h;
u a2 = u.a(this, singleAdDetailResult.adId, singleAdDetailResult.logId, singleAdDetailResult.packageName);
this.o = a2;
b bVar = new b();
this.c = bVar;
a2.a(bVar);
this.p.setOnClickListener(new SpeechVoiceClockLandingActivity$$ExternalSyntheticLambda0(this));
}
public void onBackPressed() {
m.a(this, this.j.b.h, this.o, this.h);
}
@Override // com.xlx.speech.t.a
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.xlx_voice_activity_clock_landing);
this.h = (SingleAdDetailResult) getIntent().getParcelableExtra("ad_detail");
this.g = (OverPageResult) getIntent().getParcelableExtra("data");
com.xlx.speech.s.b bVar = new com.xlx.speech.s.b();
this.e = bVar;
((RecyclerView) findViewById(R.id.xlx_voice_rv_keyword)).setAdapter(bVar);
this.i = (RecyclerView) findViewById(R.id.xlx_voice_rv_progress);
d dVar = new d();
this.f = dVar;
this.i.setAdapter(dVar);
this.j = (XlxVoiceTitleBar) findViewById(R.id.xlx_voice_title_bar);
this.k = (TextView) findViewById(R.id.xlx_voice_tv_ad_name);
this.l = (TextView) findViewById(R.id.xlx_voice_tv_ad_introduce);
this.m = (TextView) findViewById(R.id.xlx_voice_tv_content);
this.n = (ImageView) findViewById(R.id.xlx_voice_detail_ad_icon);
this.p = (DownloadButton) findViewById(R.id.xlx_voice_download_button);
this.q = (ImageView) findViewById(R.id.xlx_voice_iv_gesture);
this.j.setOnBackClickListener(new a());
if (bundle != null) {
this.r = bundle.getBoolean("STATE_AD_SUCCESS_CALLED", false);
}
if (!this.r) {
this.j.getCountDown().setOnCountDownListener(new SpeechVoiceClockLandingActivity$$ExternalSyntheticLambda1(this));
}
if (this.g == null) {
new com.xlx.speech.e.b().a(this.h.logId, new l(this));
} else {
b();
}
c();
}
@Override // com.xlx.speech.t.a
public void onDestroy() {
super.onDestroy();
this.o.b(this.c);
}
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (intent.getBooleanExtra("EXTRA_FLAG_ACTIVE", false)) {
this.s = true;
}
}
@Override // com.xlx.speech.t.a
public void onPause() {
super.onPause();
a.c cVar = this.d;
if (cVar != null) {
cVar.b();
}
}
@Override // com.xlx.speech.t.a
public void onResume() {
super.onResume();
a.c cVar = this.d;
if (cVar != null) {
cVar.c();
}
if (this.s) {
com.xlx.speech.s.b bVar = this.e;
bVar.c = true;
bVar.notifyDataSetChanged();
new Handler().postDelayed(new com.xlx.speech.s.a(bVar), 800);
d dVar = this.f;
dVar.c = true;
dVar.notifyDataSetChanged();
new Handler().postDelayed(new c(dVar), 800);
OverPageResult overPageResult = this.g;
if (overPageResult != null) {
this.p.setText(overPageResult.getPageGuideButton());
}
this.s = false;
}
}
public void onSaveInstanceState(Bundle bundle) {
bundle.putBoolean("STATE_AD_SUCCESS_CALLED", this.r);
super.onSaveInstanceState(bundle);
}
public class b implements u.b {
public b() {
}
@Override // com.xlx.speech.m0.u.b
public void a() {
SpeechVoiceClockLandingActivity speechVoiceClockLandingActivity = SpeechVoiceClockLandingActivity.this;
DownloadButton downloadButton = speechVoiceClockLandingActivity.p;
OverPageResult overPageResult = speechVoiceClockLandingActivity.g;
downloadButton.setText(overPageResult != null ? overPageResult.getButtonMsg() : "安装");
}
@Override // com.xlx.speech.m0.u.b
public void a(int i) {
a.c cVar = SpeechVoiceClockLandingActivity.this.d;
if (cVar != null) {
cVar.a();
SpeechVoiceClockLandingActivity.this.d = null;
}
SpeechVoiceClockLandingActivity.this.p.setProgress(i);
}
@Override // com.xlx.speech.m0.u.b
public void a(String str) {
SpeechVoiceClockLandingActivity speechVoiceClockLandingActivity = SpeechVoiceClockLandingActivity.this;
DownloadButton downloadButton = speechVoiceClockLandingActivity.p;
OverPageResult overPageResult = speechVoiceClockLandingActivity.g;
downloadButton.setText(overPageResult != null ? overPageResult.getButtonMsg() : "打开");
OverPageResult overPageResult2 = SpeechVoiceClockLandingActivity.this.g;
if (overPageResult2 != null && overPageResult2.getPageGuideType() == 2) {
SpeechVoiceClockLandingActivity speechVoiceClockLandingActivity2 = SpeechVoiceClockLandingActivity.this;
speechVoiceClockLandingActivity2.getClass();
try {
if (Build.VERSION.SDK_INT < 29 || Settings.canDrawOverlays(speechVoiceClockLandingActivity2)) {
Intent intent = new Intent(speechVoiceClockLandingActivity2, SpeechVoiceClockLandingActivity.class);
intent.putExtra("ad_detail", speechVoiceClockLandingActivity2.h);
intent.putExtra("data", speechVoiceClockLandingActivity2.g);
intent.putExtra("EXTRA_FLAG_ACTIVE", true);
intent.addFlags(67108864);
speechVoiceClockLandingActivity2.startActivity(intent);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}