OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 o.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.g;
import android.app.Activity;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import com.excelliance.kxqp.gs.base.b;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.NotActiveActivity;
import com.excelliance.kxqp.gs.util.ad;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.bz;
import com.excelliance.kxqp.gs.util.cg;
import com.excelliance.kxqp.gs.util.cn;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
public class o implements com.excelliance.kxqp.gs.i.e {
private static volatile o f6224a;
private b f6225b = new b();
private Context c;
private o(Context context) {
this.c = context;
this.c.registerReceiver(this.f6225b, new IntentFilter("android.intent.action.CLOSE_SYSTEM_DIALOGS"));
}
public static o a(Context context) {
if (f6224a == null) {
synchronized (o.class) {
if (f6224a == null) {
f6224a = new o(context);
}
}
}
return f6224a;
}
public boolean b(Context context) {
return a(context, (Runnable) null);
}
public boolean a(final Context context, Runnable runnable) {
if (!c(context)) {
return false;
}
a aVar = new a(context, runnable);
aVar.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialogInterface) {
by.a(context, "global_config").a("sp_key_not_active_feedback_dialog_show", true);
bz.a().a(context, 53000, "未激活用户离开OurPlay反馈窗口显示");
}
});
aVar.show();
return true;
}
public boolean c(Context context) {
return (by.a(context, "global_config").b("sp_key_not_active_feedback_dialog_show", false).booleanValue() || d(context)) ? false : true;
}
private boolean d(Context context) {
return by.a(context, "sp_statistics_info").b("sp_kye_statistics_start_app_success", false).booleanValue();
}
class b extends BroadcastReceiver {
final String f6241a = "reason";
final String f6242b = "recentapps";
final String c = "homekey";
b() {
}
@Override
public void onReceive(Context context, Intent intent) {
String stringExtra;
if (!"android.intent.action.CLOSE_SYSTEM_DIALOGS".equals(intent.getAction()) || (stringExtra = intent.getStringExtra("reason")) == null) {
return;
}
if (stringExtra.equals("homekey")) {
if (o.this.c(context)) {
context.startActivity(new Intent(o.this.c, (Class<?>) NotActiveActivity.class));
if (o.this.f6225b != null) {
o.this.c.unregisterReceiver(o.this.f6225b);
o.this.f6225b = null;
return;
}
return;
}
return;
}
stringExtra.equals("recentapps");
}
}
public static void a(final Context context, String str, String str2, final Runnable runnable) {
com.excelliance.kxqp.gs.discover.bbs.c cVar = new com.excelliance.kxqp.gs.discover.bbs.c(context);
JSONObject i = cn.i(context);
try {
i.put("info", str);
i.put("contact", str2);
} catch (JSONException e) {
e.printStackTrace();
}
ResponseData a2 = cVar.a(i.toString(), "https://api.ourplay.com.cn/goneload/signoutinfo", new com.excelliance.kxqp.gs.discover.a.c<List>() {
@Override
public ResponseData<List> a(String str3) {
ResponseData<List> responseData = new ResponseData<>();
try {
responseData.code = new JSONObject(str3).optInt("code");
} catch (JSONException e2) {
e2.printStackTrace();
}
return responseData;
}
});
if (context != null && a2 != null && a2.code == 1) {
tp.i(new Runnable() {
@Override
public void run() {
o.c(context, runnable);
}
});
} else {
tp.i(new Runnable() {
@Override
public void run() {
cg.a(context, com.excelliance.kxqp.gs.util.w.e(context, "opinion_failure"));
if (runnable != null) {
runnable.run();
}
}
});
}
}
public static void c(Context context, final Runnable runnable) {
if (context != null) {
if ((context instanceof Activity) && ((Activity) context).isFinishing()) {
return;
}
final com.excelliance.kxqp.gs.dialog.g gVar = new com.excelliance.kxqp.gs.dialog.g(context, com.excelliance.kxqp.gs.util.w.o(context, "theme_dialog_no_title2"));
gVar.a(new b.InterfaceC0157b() {
@Override
public void b(int i, Message message, int i2) {
}
@Override
public void a(int i, Message message, int i2) {
if (com.excelliance.kxqp.gs.dialog.g.this == null || !com.excelliance.kxqp.gs.dialog.g.this.isShowing()) {
return;
}
com.excelliance.kxqp.gs.dialog.g.this.dismiss();
}
});
gVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (runnable != null) {
runnable.run();
}
}
});
gVar.c(24);
String e = com.excelliance.kxqp.gs.util.w.e(context, "confirm");
String e2 = com.excelliance.kxqp.gs.util.w.e(context, "title");
String e3 = com.excelliance.kxqp.gs.util.w.e(context, "msg_feedback_for_not_active");
gVar.show();
gVar.b(e2);
gVar.a(e3);
gVar.a(true, e, null);
}
}
@Override
public void a() {
if (this.f6225b != null) {
try {
this.c.unregisterReceiver(this.f6225b);
} catch (Exception e) {
e.printStackTrace();
}
}
this.c = null;
this.f6225b = null;
f6224a = null;
}
public class a extends Dialog {
private final Runnable f6235b;
public a(Context context, Runnable runnable) {
super(context, com.excelliance.kxqp.gs.util.w.q(context, "pop_custom_dialog_theme"));
this.f6235b = runnable;
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(com.excelliance.kxqp.gs.util.w.c(getContext(), "dialog_feedback_not_active"));
int width = getWindow().getWindowManager().getDefaultDisplay().getWidth();
WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.width = width - ad.a(getContext(), 46.0f);
attributes.height = -2;
attributes.gravity = 17;
getWindow().setAttributes(attributes);
setCanceledOnTouchOutside(true);
a();
setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
if (a.this.f6235b != null) {
a.this.f6235b.run();
}
}
});
}
private void a() {
final EditText editText = (EditText) findViewById(com.excelliance.kxqp.gs.util.w.d(getContext(), "et_msg"));
View findViewById = findViewById(com.excelliance.kxqp.gs.util.w.d(getContext(), "ll_contact_title"));
final EditText editText2 = (EditText) findViewById(com.excelliance.kxqp.gs.util.w.d(getContext(), "et_contact"));
if (!com.excelliance.kxqp.gs.util.b.ao(o.this.c)) {
findViewById.setVisibility(8);
editText2.setVisibility(8);
}
Button button = (Button) findViewById(com.excelliance.kxqp.gs.util.w.d(getContext(), "btn_submit"));
if (com.excelliance.kxqp.gs.newappstore.b.c.a(o.this.c)) {
com.excelliance.kxqp.gs.newappstore.b.c.a(button, com.excelliance.kxqp.gs.util.w.k(o.this.c, "btn_corner3dp_green_solid_new_store"));
}
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final String trim = editText.getText().toString().trim();
if (TextUtils.isEmpty(trim)) {
cg.a(o.this.c, editText.getHint().toString().trim());
} else {
tp.f(new Runnable() {
@Override
public void run() {
o.a(a.this.getContext(), trim, editText2.getText().toString().trim(), a.this.f6235b);
a.this.dismiss();
}
});
}
}
});
}
}
}