中建乐购 v3.2.3版本的 MD5 值为:3856d0da11f056931d64951d23a4b3b8
以下内容为反编译后的 k.java 源代码,内容仅作参考
package com.shopex.westore;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.shopex.westore.activity.AgentActivity;
import com.shopex.westore.activity.LauncherActivity;
import com.shopex.westore.util.ai;
import com.shopex.westore.util.m;
import com.zjsjtz.ecstore.R;
import java.io.File;
import java.util.Locale;
import org.json.JSONObject;
import org.slf4j.Marker;
public class k extends ai {
public static final String A = "logined_username";
public static final String B = "logined_user_password";
public static final String C = "shortcut_installed";
public static final String D = "buy_house_ads_json.cache";
public static final String E = "com.sanju.westore.EXTRA_BUILD_ID";
public static final String F = "mobileapi.indexad.get_all_list";
public static final String G = "page_info";
public static final String H = "com.qianseit.westore.EXTRA_NEWS_ARTICLE_ID";
public static String I = "notific_mode";
public static final String J = "notific_type";
public static final String K = "notific_empty_type";
public static final String L = "pack_price";
public static final String M = "https://www.zjsjtz.com/index.php/";
public static final String N = "https://www.zjsjtz.com/wap/agoods-info.html?goods_id=%s";
public static final String O = "https://www.zjsjtz.com/wap/opinions-info.html?opinions_id=%s";
public static final String P = "https://www.zjsjtz.com/index.php/index-gen_vcode-b2c-4.html?";
public static final String Q = "https://www.zjsjtz.com/index.php/api";
public static final String R = "home_ads_json.cache";
public static final String S = "mobileapi.member.save_setting";
public static final String T = "cscec3b.member.inviteCode";
public static final String U = "cscec3b.member.invited";
public static String V = "select_index";
public static final boolean f10229a = true;
public static final String f10230b = "https://www.zjsjtz.com";
public static final String f10231c = "f970d87c3519bec3e6d9e45b2c479e4decf3d12fc45d688dbd4074959d76c8cc";
public static long f10232d = 0;
public static int f10233e = 0;
public static boolean f10234f = true;
public static final String f10235g = "com.shopex.westore.EXTRA_DETAIL_TYPE";
public static final String f10236h = "com.shopex.westore.EXTRA_TAB_POSITION";
public static final String f10237i = "com.shopex.westore.EXTRA_CLASS_ID";
public static final String f10238j = "com.shopex.westore.EXTRA_ARTICLE_ID";
public static final String f10239k = "com.shopex.westore.EXTRA_DATA";
public static final String f10240l = "com.shopex.westore.EXTRA_DATA";
public static final String f10241m = "com.shopex.westore.EXTRA_VALUE";
public static final String f10242n = "com.shopex.westore.EXTRA_TITLE";
public static final String f10243o = "com.shopex.westore.EXTRA_KEYWORDS";
public static final String f10244p = "com.shopex.westore.EXTRA_HTML";
public static final String f10245q = "com.shopex.westore.EXTRA_VITUAL_CATE";
public static final String f10246r = "com.shopex.westore.EXTRA_ADDR";
public static final String f10247s = "com.shopex.westore.PRODUCT_ID";
public static final String f10248t = "com.shopex.westore.FROM_EXTRACT";
public static final String f10249u = "com.shopex.westore.COUPON_DATA";
public static final String f10250v = "com.shopex.westore.SCAN_REZULT";
public static final String f10251w = "com.shopex.westore.DETAIL_BRAND";
public static final String f10252x = "com.shopex.westore.STROE_DELETE_GOODS";
public static final String f10253y = "com.qianseit.westore.EXTRA_ACCOUNT_HOME_TITLE";
public static final String f10254z = "com.qianseit.westore.EXTRA_SHARE_GOOD_ID";
public static String a(String str) {
if (str.startsWith("\"")) {
str = str.substring(1);
}
return str.endsWith("\"") ? str.substring(0, str.length()) : str;
}
public static Intent a(int i2, int i3) {
Intent intent = new Intent("android.intent.action.GET_CONTENT", (Uri) null);
intent.setType("image/*");
intent.putExtra("crop", "false");
intent.putExtra("aspectX", i2);
intent.putExtra("aspectY", i3);
intent.putExtra("outputX", i2);
intent.putExtra("outputY", i3);
intent.putExtra("return-data", false);
return intent;
}
public static boolean b(String str) {
int parseInt;
return !TextUtils.isEmpty(str) && str.length() == 11 && str.startsWith("1") && e(str) && (parseInt = Integer.parseInt(str.substring(1, 2))) >= 3 && parseInt <= 9;
}
public static boolean a(Context context, JSONObject jSONObject) {
return a(context, jSONObject, true);
}
public static boolean a(Context context, JSONObject jSONObject, boolean z2) {
if (jSONObject == null || jSONObject.optString("data") == null || TextUtils.equals("null", jSONObject.optString("data"))) {
return false;
}
if ("succ".equals(jSONObject.optString("rsp"))) {
return true;
}
if (TextUtils.equals(jSONObject.optString("res"), "need_login") && f10234f) {
f10234f = false;
context.startActivity(AgentActivity.a(context, (int) AgentActivity.f8626j).setFlags(268435456));
AgentApplication.c(context).a(false);
AgentApplication.c(context).a((JSONObject) null);
return false;
}
String optString = jSONObject.isNull("data") ? "" : jSONObject.optString("data");
if (!TextUtils.isEmpty(optString) && z2) {
try {
a(context, g(new JSONObject(optString).optString("msg")));
} catch (Exception unused) {
if (optString != null) {
if (optString.contains("配件验证失败")) {
optString = "商品库存不足";
}
a(context, g(optString));
}
}
}
return false;
}
public static com.shopex.westore.util.m a(Context context, Resources resources) {
return a(context, resources, true);
}
public static com.shopex.westore.util.m a(Context context, final Resources resources, final boolean z2) {
com.shopex.westore.util.m a2 = com.shopex.westore.util.m.a(context);
a2.a(new m.d() {
@Override
public boolean a(View view, Drawable drawable) {
((ImageView) view).setImageDrawable(drawable);
return true;
}
});
a2.a(new m.b() {
@Override
public Drawable a(Object obj) {
Bitmap a3;
if (obj == null || !(obj instanceof Uri) || (a3 = com.shopex.westore.util.b.a(((Uri) obj).toString(), z2)) == null) {
return null;
}
return new BitmapDrawable(resources, a3);
}
});
return a2;
}
@SuppressLint({"NewApi"})
public static void a(Resources resources, Locale locale) {
Configuration configuration = resources.getConfiguration();
DisplayMetrics displayMetrics = resources.getDisplayMetrics();
try {
configuration.setLocale(locale);
} catch (NoSuchMethodError unused) {
configuration.locale = locale;
}
resources.updateConfiguration(configuration, displayMetrics);
}
public static void a(View view) {
ViewGroup viewGroup = (ViewGroup) view.getParent();
if (viewGroup != null) {
viewGroup.removeView(view);
}
}
public static String a(JSONObject jSONObject) {
String optString = jSONObject.optString("area");
int lastIndexOf = optString.lastIndexOf(":");
return lastIndexOf == -1 ? "" : optString.substring(lastIndexOf + 1);
}
public static long a(File file) {
long j2 = 0;
if (file.isDirectory()) {
File[] listFiles = file.listFiles();
if (listFiles != null) {
for (File file2 : listFiles) {
j2 += a(file2);
}
return j2;
}
return 0L;
}
return 0 + file.length();
}
public static void b(File file) {
if (file != null && file.exists() && file.isDirectory()) {
File[] listFiles = file.listFiles();
if (listFiles != null) {
for (File file2 : listFiles) {
b(file2);
}
return;
}
return;
}
file.delete();
}
public static boolean b(JSONObject jSONObject) {
return TextUtils.equals("offline", jSONObject.optString("pay_app_id")) || TextUtils.equals("offline", jSONObject.optString("app_id"));
}
public static boolean c(JSONObject jSONObject) {
return !jSONObject.optBoolean("app_pay_type", false);
}
public static Bitmap a(Bitmap bitmap, Bitmap bitmap2, Bitmap bitmap3) {
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setFilterBitmap(true);
int width = bitmap2.getWidth();
int height = bitmap2.getHeight();
float f2 = width;
float f3 = height;
RectF rectF = new RectF(0.0f, 0.0f, f2, f3);
Bitmap createBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
paint.setColor(0);
canvas.drawPaint(paint);
paint.setColor(-1);
canvas.drawBitmap(bitmap2, (Rect) null, rectF, paint);
Paint paint2 = new Paint();
paint2.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
paint2.setStyle(Paint.Style.STROKE);
canvas.drawRect(0.0f, 0.0f, f2, f3, paint2);
canvas.drawBitmap(bitmap, (Rect) null, rectF, paint2);
canvas.drawBitmap(bitmap3, (Rect) null, rectF, paint);
bitmap.recycle();
return createBitmap;
}
public static com.shopex.westore.util.m b(final Context context, final Resources resources) {
com.shopex.westore.util.m a2 = com.shopex.westore.util.m.a(context);
a2.a(R.drawable.account_avatar);
a2.a(new m.d() {
@Override
public boolean a(View view, Drawable drawable) {
((ImageView) view).setImageDrawable(drawable);
return true;
}
});
a2.a(new m.b() {
@Override
public Drawable a(Object obj) {
Bitmap a3;
if (obj == null || !(obj instanceof Uri) || (a3 = com.shopex.westore.util.b.a(((Uri) obj).toString(), true)) == null) {
return null;
}
AgentApplication b2 = AgentApplication.b(context);
return new BitmapDrawable(resources, k.a(a3, b2.f8484c, b2.f8485d));
}
});
return a2;
}
public static boolean a(Activity activity, JSONObject jSONObject) {
if (TextUtils.isEmpty(jSONObject.optString("res"))) {
return false;
}
activity.startActivity(AgentActivity.a(activity, 307).putExtra(f10244p, jSONObject.optString("res")));
return true;
}
public static boolean b(Activity activity, JSONObject jSONObject) {
try {
JSONObject optJSONObject = jSONObject.optJSONObject("data");
JSONObject optJSONObject2 = optJSONObject.optJSONObject("order");
a((Context) activity, optJSONObject.optString("msg"));
return optJSONObject2.optInt("pay_status") == 1;
} catch (Exception unused) {
return false;
}
}
public static String a(String str, int i2) {
if (TextUtils.isEmpty(str) || str.length() < i2 + 2) {
return str;
}
StringBuilder sb = new StringBuilder();
for (int i3 = 0; i3 < i2; i3++) {
sb.append(Marker.ANY_MARKER);
}
int length = (str.length() - i2) / 2;
return str.replaceFirst(str.substring(length, i2 + length), sb.toString());
}
public static void a(Context context) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(context, LauncherActivity.class));
Intent intent2 = new Intent(ai.f10477an);
intent2.putExtra(ai.f10476am, true);
intent2.putExtra("android.intent.extra.shortcut.NAME", context.getString(R.string.app_name));
intent2.putExtra("android.intent.extra.shortcut.INTENT", intent);
intent2.putExtra("android.intent.extra.shortcut.ICON_RESOURCE", Intent.ShortcutIconResource.fromContext(context, R.drawable.ic_launcher_new));
context.sendBroadcast(intent2);
}
}