中建乐购 v3.2.3版本的 MD5 值为:3856d0da11f056931d64951d23a4b3b8
以下内容为反编译后的 a.java 源代码,内容仅作参考
package fm;
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.AgentApplication;
import com.shopex.westore.activity.AgentActivity;
import com.shopex.westore.activity.LauncherActivity;
import com.shopex.westore.util.ai;
import com.shopex.westore.util.b;
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 a extends ai {
public static final String A = "com.qianseit.westore.EXTRA_THIRD_BUREAU_HOME_PAGE_DATA";
public static final String B = "com.qianseit.westore.IS_FROM_HOME_PAGE";
public static final int C = 1;
public static final String D = "com.thirdbureau.EXTRA_ISFIRSTLOGIN";
public static final String E = "logined_username";
public static final String F = "logined_user_password";
public static final String G = "shortcut_installed";
public static final String H = a();
public static final String I = "http://ios.wyaopeng.com";
public static final String J = "http://ios.wyaopeng.com/index.php/";
public static final String K = "http://ios.wyaopeng.com/wap/agoods-info.html?goods_id=%s";
public static final String L = "http://ios.wyaopeng.com/index.php//wap/article-%s.html";
public static final String M = "http://ios.wyaopeng.com/wap/opinions-info.html?opinions_id=%s";
public static final String N = "http://ios.wyaopeng.com/index.php/index-gen_vcode-b2c-4.html?";
public static final String O = "http://ios.wyaopeng.com/index.php/api";
public static final String P = "http://ios.wyaopeng.com/index.php/wap/product-%s.html";
public static final String Q = "home_ads_json.cache";
public static final String R = "mobileapi.member.setting";
public static long f16709a = 0;
public static int f16710b = 0;
public static boolean f16711c = true;
public static final String f16712d = "com.qianseit.westore.EXTRA_DETAIL_TYPE";
public static final String f16713e = "com.qianseit.westore.EXTRA_TAB_POSITION";
public static final String f16714f = "com.qianseit.westore.EXTRA_CLASS_ID";
public static final String f16715g = "com.qianseit.westore.EXTRA_SHARE_GOOD_ID";
public static final String f16716h = "com.qianseit.westore.EXTRA_ARTICLE_ID";
public static final String f16717i = "com.qianseit.westore.EXTRA_DATA";
public static final String f16718j = "com.qianseit.westore.EXTRA_DATA";
public static final String f16719k = "com.qianseit.westore.EXTRA_VALUE";
public static final String f16720l = "com.qianseit.westore.EXTRA_TITLE";
public static final String f16721m = "com.qianseit.westore.EXTRA_KEYWORDS";
public static final String f16722n = "com.qianseit.westore.EXTRA_HTML";
public static final String f16723o = "com.qianseit.westore.EXTRA_VITUAL_CATE";
public static final String f16724p = "com.qianseit.westore.EXTRA_ADDR";
public static final String f16725q = "com.qianseit.westore.PRODUCT_ID";
public static final String f16726r = "com.qianseit.westore.FROM_EXTRACT";
public static final String f16727s = "com.qianseit.westore.COUPON_DATA";
public static final String f16728t = "com.qianseit.westore.SCAN_REZULT";
public static final String f16729u = "com.qianseit.westore.DETAIL_BRAND";
public static final String f16730v = "com.qianseit.westore.STROE_DELETE_GOODS";
public static final String f16731w = "com.qianseit.westore.EXTRA_NEWS_ARTICLE_ID";
public static final String f16732x = "com.qianseit.westore.EXTRA_NEWS_IMG_URL";
public static final String f16733y = "com.qianseit.westore.EXTRA_SHARE_TEXT";
public static final String f16734z = "com.qianseit.westore.EXTRA_ACCOUNT_HOME_TITLE";
public enum EnumC0098a {
PAY_FINISH,
PAY_TO_MEDIUM,
PAY_PART,
REFUND_PART,
REFUND_ALL
}
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) {
return false;
}
if ("succ".equals(jSONObject.optString("rsp"))) {
return true;
}
if (TextUtils.equals(jSONObject.optString("res"), "need_login") && f16711c) {
f16711c = 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) {
a(context, g(optString));
}
}
return false;
}
public static m a(Context context, Resources resources) {
return a(context, resources, true);
}
public static m a(Context context, final Resources resources, final boolean z2) {
m a2 = 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 = 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) {
File[] listFiles;
if (file == null || !file.exists() || !file.isDirectory() || (listFiles = file.listFiles()) == null) {
return;
}
for (File file2 : listFiles) {
b(file2);
}
}
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 m b(final Context context, final Resources resources) {
m a2 = m.a(context);
a2.a(R.drawable.icon_launcher);
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 = b.a(((Uri) obj).toString(), true)) == null) {
return null;
}
AgentApplication b2 = AgentApplication.b(context);
return new BitmapDrawable(resources, a.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(f16722n, 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 boolean d(JSONObject jSONObject) {
try {
return jSONObject.optJSONObject("data").optString("pay_status").equals(EnumC0098a.PAY_FINISH.toString());
} 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.icon_launcher));
context.sendBroadcast(intent2);
}
public static String a() {
int length = "ad4acg7daxagfhbe3qeeewaq3d8xfz5f9g7x7r9g2h4jfk5l3udy9tarbe3wdq6d2x2c1vbb8ndm7kel8g3u6h8s5fdc9g8s1gdedw0t0ybuci0t1r9e7wdfds8f5g2h".length();
StringBuilder sb = new StringBuilder();
for (int i2 = 0; i2 < length; i2 += 2) {
sb.append("ad4acg7daxagfhbe3qeeewaq3d8xfz5f9g7x7r9g2h4jfk5l3udy9tarbe3wdq6d2x2c1vbb8ndm7kel8g3u6h8s5fdc9g8s1gdedw0t0ybuci0t1r9e7wdfds8f5g2h".charAt(i2));
}
return sb.toString();
}
}