APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:For S9
版本号:4.5
包名称:com.jb.gokeyboard.theme.emojiztfors9.getjar

MD5 校验值:27cf44ec6e0720408f5ef017a90a3331

反编译源代码说明

b.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package com.jb.gokeyboard.theme.template.httpwecloud.a;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.text.TextUtils;
import com.jb.gokeyboard.theme.template.MainActivity;
import com.jb.gokeyboard.theme.template.ThemeApplication;
import java.net.URISyntaxException;
import java.util.List;

public class b {
    public static boolean a(Context context, String str, boolean z, boolean z2) {
        if (context == null || TextUtils.isEmpty(str)) {
            return false;
        }
        String trim = str.trim();
        String lowerCase = trim.toLowerCase();
        if (a(context)) {
            try {
                if (!lowerCase.startsWith("market://details?id=")) {
                    if (lowerCase.startsWith("http://play.google.com/store/apps/details?id=")) {
                        trim = trim.replace("http://play.google.com/store/apps/details?id=", "");
                    } else if (lowerCase.startsWith("https://play.google.com/store/apps/details?id=")) {
                        trim = trim.replace("https://play.google.com/store/apps/details?id=", "");
                    } else if (lowerCase.startsWith("http://") || lowerCase.startsWith("https://")) {
                        if (z2) {
                            return b(context, trim);
                        }
                        return a(context, trim);
                    }
                    trim = "market://details?id=" + trim;
                }
                Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(trim));
                intent.setPackage("com.android.vending");
                if (context instanceof Activity) {
                    intent.addFlags(524288);
                    intent.addFlags(1073741824);
                } else {
                    intent.addFlags(268435456);
                    intent.addFlags(32768);
                }
                context.startActivity(intent);
                return true;
            } catch (Exception e) {
                if (z2) {
                    b(context, trim);
                    return false;
                }
                a(context, trim);
                return false;
            }
        }
        if (!z) {
            return false;
        }
        if (z2) {
            return b(context, trim);
        }
        return a(context, trim);
    }

    public static boolean a(Context context) {
        return com.jb.gokeyboard.theme.template.util.b.a(context, "com.android.vending");
    }

    public static boolean a(Context context, String str) {
        if (context == null || TextUtils.isEmpty(str)) {
            return false;
        }
        if (!str.startsWith("http://play.google.com/store/apps/details?id=") && !str.startsWith("https://play.google.com/store/apps/details?id=") && (str.startsWith("market://details?id=") || (!str.startsWith("http://") && !str.startsWith("https://")))) {
            if (str.startsWith("market://details?id=")) {
                str = str.replace("market://details?id=", "");
            }
            str = "https://play.google.com/store/apps/details?id=" + str;
        }
        try {
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
            List<ResolveInfo> queryIntentActivities = context.getPackageManager().queryIntentActivities(intent, 0);
            if (queryIntentActivities != null && queryIntentActivities.size() > 0) {
                ActivityInfo activityInfo = queryIntentActivities.get(0) != null ? queryIntentActivities.get(0).activityInfo : null;
                String str2 = activityInfo != null ? activityInfo.packageName : null;
                String str3 = activityInfo != null ? activityInfo.name : null;
                if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
                    intent.setClassName(str2, str3);
                }
            }
            if (context instanceof Activity) {
                intent.addFlags(1073741824);
            } else {
                intent.addFlags(268435456);
                intent.addFlags(32768);
            }
            context.startActivity(intent);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }

    public static boolean b(Context context, String str) {
        if (context == null || TextUtils.isEmpty(str)) {
            return false;
        }
        if (!str.startsWith("http://play.google.com/store/apps/details?id=") && !str.startsWith("https://play.google.com/store/apps/details?id=") && (str.startsWith("market://details?id=") || (!str.startsWith("http://") && !str.startsWith("https://")))) {
            if (str.startsWith("market://details?id=")) {
                str = str.replace("market://details?id=", "");
            }
            str = "https://play.google.com/store/apps/details?id=" + str;
        }
        try {
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
            ResolveInfo resolveActivity = context.getPackageManager().resolveActivity(intent, 0);
            if (resolveActivity != null) {
                ActivityInfo activityInfo = resolveActivity.activityInfo;
                String str2 = activityInfo != null ? activityInfo.packageName : null;
                String str3 = activityInfo != null ? activityInfo.name : null;
                if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
                    if (str2.equals("android") || str3.equals("com.android.internal.app.ResolverActivity")) {
                        return a(context, str);
                    }
                    intent.setClassName(str2, str3);
                }
            }
            if (context instanceof Activity) {
                intent.addFlags(1073741824);
            } else {
                intent.addFlags(268435456);
                intent.addFlags(32768);
            }
            context.startActivity(intent);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }

    public static void c(Context context, String str) {
        if (!TextUtils.isEmpty(str)) {
            if (str.startsWith("#self#")) {
                try {
                    int parseInt = Integer.parseInt(str.replace("#self#", "").trim());
                    Intent intent = new Intent(context, (Class<?>) MainActivity.class);
                    intent.setFlags(268435456);
                    intent.putExtra("PAGE_ID", parseInt);
                    intent.putExtra("TAB_ID", "1");
                    context.startActivity(intent);
                    return;
                } catch (NumberFormatException e) {
                    return;
                }
            }
            try {
                Intent parseUri = Intent.parseUri(str, 1);
                parseUri.setFlags(268435456);
                if (context.getPackageManager().queryIntentActivities(parseUri, 131072).size() != 0) {
                    context.startActivity(parseUri);
                }
            } catch (URISyntaxException e2) {
            }
        }
    }

    public static void a(int i, String str) {
        a(i, str, false);
    }

    public static void a(int i, String str, boolean z) {
        try {
            Intent intent = new Intent(ThemeApplication.a(), (Class<?>) MainActivity.class);
            intent.setFlags(268435456);
            intent.putExtra("PAGE_ID", i);
            intent.putExtra("TAB_ID", str);
            intent.putExtra("key_force", z);
            ThemeApplication.a().startActivity(intent);
        } catch (ActivityNotFoundException e) {
        }
    }
}