正在查看: 漫天星 v3.0.2 应用的 ApkConfirmDialogActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 漫天星 v3.0.2 应用的 ApkConfirmDialogActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.anythink.dlopt.activity;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.TextView;
import com.anythink.core.common.d.t;
import com.anythink.core.common.h.bj;
import com.anythink.core.common.h.w;
import com.anythink.core.common.k.a;
import com.anythink.core.common.res.b;
import com.anythink.core.common.res.e;
import com.anythink.core.common.ui.component.RoundImageView;
import com.anythink.core.common.v.am;
import com.anythink.core.common.v.b.b;
import com.anythink.core.common.v.q;
import com.anythink.core.common.v.y;
public class ApkConfirmDialogActivity extends Activity {
public static w a;
public static a b;
public Dialog c;
public class AnonymousClass2 implements View.OnClickListener {
public AnonymousClass2() {
}
@Override
public final void onClick(View view) {
b.a().a(new Runnable() {
@Override
public final void run() {
if (ApkConfirmDialogActivity.b != null) {
ApkConfirmDialogActivity.b.a(false);
}
}
});
ApkConfirmDialogActivity.this.finish();
}
}
public class AnonymousClass3 implements View.OnClickListener {
public AnonymousClass3() {
}
@Override
public final void onClick(View view) {
b.a().a(new Runnable() {
@Override
public final void run() {
if (ApkConfirmDialogActivity.b != null) {
ApkConfirmDialogActivity.b.a(true);
}
}
});
ApkConfirmDialogActivity.this.finish();
}
}
public class AnonymousClass4 implements b.a {
public final String a;
public final RoundImageView b;
public AnonymousClass4(String str, RoundImageView roundImageView) {
this.a = str;
this.b = roundImageView;
}
@Override
public final void onFail(String str, String str2) {
}
@Override
public final void onSuccess(String str, Bitmap bitmap) {
if (TextUtils.equals(str, this.a)) {
this.b.setImageBitmap(bitmap);
}
}
}
public class AnonymousClass5 implements View.OnClickListener {
public final w a;
public AnonymousClass5(w wVar) {
this.a = wVar;
}
@Override
public final void onClick(View view) {
y.a(ApkConfirmDialogActivity.this, this.a.P());
}
}
public class AnonymousClass6 implements View.OnClickListener {
public final w a;
public AnonymousClass6(w wVar) {
this.a = wVar;
}
@Override
public final void onClick(View view) {
y.a(ApkConfirmDialogActivity.this, this.a.O());
}
}
public class AnonymousClass7 implements View.OnClickListener {
public final w a;
public AnonymousClass7(w wVar) {
this.a = wVar;
}
@Override
public final void onClick(View view) {
y.a(ApkConfirmDialogActivity.this, this.a.h());
}
}
public class AnonymousClass8 implements View.OnClickListener {
public AnonymousClass8() {
}
@Override
public final void onClick(View view) {
com.anythink.core.common.v.b.b.a().a(new Runnable() {
@Override
public final void run() {
if (ApkConfirmDialogActivity.b != null) {
ApkConfirmDialogActivity.b.a(true);
}
}
});
ApkConfirmDialogActivity.this.finish();
}
}
public class AnonymousClass9 implements View.OnClickListener {
public AnonymousClass9() {
}
@Override
public final void onClick(View view) {
com.anythink.core.common.v.b.b.a().a(new Runnable() {
@Override
public final void run() {
if (ApkConfirmDialogActivity.b != null) {
ApkConfirmDialogActivity.b.a(false);
}
}
});
ApkConfirmDialogActivity.this.finish();
}
}
private void b() {
try {
String aK = a instanceof bj ? ((bj) a).aK() : "";
if (TextUtils.isEmpty(aK)) {
aK = a.x();
}
View inflate = LayoutInflater.from(this).inflate(q.a(this, "myoffer_confirm_dialog", "layout"), (ViewGroup) null, false);
TextView textView = (TextView) inflate.findViewById(q.a(this, "myoffer_confirm_msg", "id"));
TextView textView2 = (TextView) inflate.findViewById(q.a(this, "myoffer_confirm_give_up", "id"));
TextView textView3 = (TextView) inflate.findViewById(q.a(this, "myoffer_confirm_continue", "id"));
textView.setText(getResources().getString(q.a(this, "sample_dialog_download_app", "string"), aK));
textView2.setText(getResources().getString(q.a(this, "sample_dialog_give_up", "string")));
textView3.setText(getResources().getString(q.a(this, "sample_dialog_confirm", "string")));
textView2.setOnClickListener(new AnonymousClass2());
textView3.setOnClickListener(new AnonymousClass3());
Dialog dialog = new Dialog(this, q.a(this, "style_full_screen_translucent_dialog", "style"));
this.c = dialog;
dialog.setContentView(inflate);
this.c.setCancelable(false);
this.c.show();
} catch (Throwable unused) {
finish();
}
}
private void c() {
TextView textView;
TextView textView2;
View view;
TextView textView3;
try {
w wVar = a;
View inflate = LayoutInflater.from(this).inflate(q.a(this, "confirm", "layout"), (ViewGroup) null, false);
RoundImageView roundImageView = (RoundImageView) inflate.findViewById(q.a(this, "confirm_dialog_icon", "id"));
TextView textView4 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_title", "id"));
TextView textView5 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_version_name", "id"));
TextView textView6 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_publisher_name", "id"));
TextView textView7 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_permission_manage", "id"));
TextView textView8 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_privacy_agreement", "id"));
TextView textView9 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_desc", "id"));
View findViewById = inflate.findViewById(q.a(this, "confirm_dialog_center_line2", "id"));
TextView textView10 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_download_now", "id"));
TextView textView11 = (TextView) inflate.findViewById(q.a(this, "confirm_dialog_give_up", "id"));
String z = wVar.z();
if (TextUtils.isEmpty(z)) {
textView = textView11;
textView2 = textView9;
view = findViewById;
textView3 = textView10;
ViewGroup.LayoutParams layoutParams = roundImageView.getLayoutParams();
layoutParams.width = 0;
layoutParams.height = 0;
roundImageView.setLayoutParams(layoutParams);
} else {
roundImageView.setNeedRadiu(true);
roundImageView.setRadiusInDip(4);
ViewGroup.LayoutParams layoutParams2 = roundImageView.getLayoutParams();
textView = textView11;
textView3 = textView10;
view = findViewById;
textView2 = textView9;
com.anythink.core.common.res.b.a(this).a(new e(1, z), layoutParams2.width, layoutParams2.height, new AnonymousClass4(z, roundImageView));
}
String aK = wVar instanceof bj ? ((bj) wVar).aK() : "";
if (TextUtils.isEmpty(aK)) {
aK = wVar.x();
}
textView4.setText(aK);
textView5.setText(getResources().getString(q.a(this, "confirm_dialog_version", "string"), wVar.N()));
textView6.setText(getResources().getString(q.a(this, "confirm_dialog_publisher", "string"), wVar.M()));
String string = getResources().getString(q.a(this, "confirm_dialog_privacy_agreement", "string"));
String string2 = getResources().getString(q.a(this, "confirm_dialog_application_permission", "string"));
int length = string.length();
int length2 = string2.length();
if (length != length2) {
int abs = Math.abs(length2 - length);
StringBuilder sb = new StringBuilder(string);
for (int i = 0; i < abs; i++) {
sb.append(" ");
}
string = sb.toString();
}
textView8.setText(string);
textView7.setOnClickListener(new AnonymousClass5(wVar));
textView8.setOnClickListener(new AnonymousClass6(wVar));
if (!TextUtils.isEmpty(wVar.h())) {
TextView textView12 = textView2;
textView12.setVisibility(0);
view.setVisibility(0);
textView12.setOnClickListener(new AnonymousClass7(wVar));
}
textView3.setOnClickListener(new AnonymousClass8());
textView.setOnClickListener(new AnonymousClass9());
Dialog dialog = new Dialog(this, q.a(this, "style_full_screen_translucent_dialog", "style"));
this.c = dialog;
dialog.setContentView(inflate);
this.c.setCancelable(false);
Window window = this.c.getWindow();
if (window != null) {
int dimensionPixelSize = getResources().getDimensionPixelSize(q.a(this, "confirm_dialog_margin", "dimen"));
int i2 = getResources().getDisplayMetrics().widthPixels;
int i3 = getResources().getDisplayMetrics().heightPixels;
if (i2 > i3) {
window.setLayout((int) Math.ceil(r4 * 0.98859316f), i3 - (dimensionPixelSize * 2));
} else {
window.setLayout(i2 - (dimensionPixelSize * 2), (int) Math.ceil(r3 / 0.98859316f));
}
}
this.c.show();
} catch (Throwable unused) {
finish();
}
}
@Override
public void onCreate(android.os.Bundle r25) {
throw new UnsupportedOperationException("Method not decompiled: com.anythink.dlopt.activity.ApkConfirmDialogActivity.onCreate(android.os.Bundle):void");
}
@Override
public void onDestroy() {
am.a(false);
Dialog dialog = this.c;
if (dialog != null) {
dialog.dismiss();
this.c = null;
}
a = null;
b = null;
super.onDestroy();
}
@Override
public boolean onKeyDown(int i, KeyEvent keyEvent) {
if (4 == i) {
return true;
}
return super.onKeyDown(i, keyEvent);
}
@Override
public void onResume() {
super.onResume();
am.a(true);
}
public static void a(final Context context, final w wVar, final a aVar) {
com.anythink.core.common.v.b.b.a().a(new Runnable() {
@Override
public final void run() {
if (com.anythink.dlopt.common.b.a(context).a(wVar)) {
aVar.a(true);
} else if (com.anythink.dlopt.common.c.a.a(context, wVar.I())) {
aVar.a(true);
} else {
t.b().b(new Runnable() {
@Override
public final void run() {
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
ApkConfirmDialogActivity.a = wVar;
a unused = ApkConfirmDialogActivity.b = aVar;
Intent intent = new Intent(context, (Class<?>) ApkConfirmDialogActivity.class);
intent.addFlags(com.anythink.core.common.s.a.a.m);
context.startActivity(intent);
}
});
}
}
});
}
}