导航菜单

页面标题

页面副标题

AdaModal v1.4.0 - a.java 源代码

正在查看: AdaModal v1.4.0 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.oliveapp.camerasdk.a;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.AssetManager;
import android.os.Build;
import android.os.Handler;
import android.text.TextUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

public class a {
    private static final String ae = "a";
    private String bn;
    private String bo;
    private Context bp;
    private SharedPreferences bq;
    private static final a af = new a();
    private static String ag = "disableCameraSDK";
    private static String ah = "readCamNumException";
    private static String ai = "disableFrontCamera";
    private static String aj = "usedPreciseScreenRatio";
    private static String ak = "beBlurredPreviewAfterTakePic";
    private static String al = "beBlurredPicAfterTakePic";
    private static String am = "disableBackFlashMode";
    private static String an = "frontFlashModeException";
    private static String ao = "frontFlashNoAuto";
    private static String ap = "backFlashModeException";
    private static String aq = "backFlashNoOn";
    private static String ar = "backFlashNoAuto";
    private static String as = "disableFocusMode";
    private static String at = "disableAutoFocusDouble";
    private static String au = "disableFocusModeContinuousPicture";
    private static String av = "frontCamRotate0";
    private static String aw = "frontCamRotate90";
    private static String ax = "frontCamRotate180";
    private static String ay = "frontCamRotate270";
    private static String az = "backCamRotate0";
    private static String aA = "backCamRotate90";
    private static String aB = "backCamRotate180";
    private static String aC = "backCamRotate270";
    private static String aD = "frontExifRotate0";
    private static String aE = "frontExifRotate90";
    private static String aF = "frontExifRotate180";
    private static String aG = "frontExifRotate270";
    private static String aH = "backExifRotate0";
    private static String aI = "backExifRotate90";
    private static String aJ = "backExifRotate180";
    private static String aK = "backExifRotate270";
    private static String aL = "frontCamFlipH";
    private static String aM = "disableFrontExposure";
    private static String aN = "disableBackExposure";
    private static String aO = "frontExposureStepOne";
    private static String aP = "backExposureStepOne";
    private static String aQ = "beBlurredWhilePreviewSizeIs980";
    private static String aR = "cannotFlashWhileAutoFocus";
    private static String aS = "cannotSetSurfaceHolderNull";
    private static String aT = "frontCamCannotRotate";
    private static String aU = "readExifFlashModeAbnormal";
    private static String aV = "readMaxNumMeteringAreasAbnormal";
    private static String aW = "readMaxNumFocusAreasAbnormal";
    private static String aX = "cannotStopPreviewWhileCreateOrResume";
    private static String aY = "cannotRotatePreview";
    private static String aZ = "cannotWriteFlashStatusWhileFlashOn";
    private static String ba = "beScaledWhileFrontFullScreen";
    private static String bb = "cannotFlashWhileFlashOn";
    private static String bc = "cannotCloseFlashAfterSetFlashOn";
    private static String bd = "beScaledWhileBackFullScreen";
    private static String be = "backCamCannotRotate";
    private static String bf = "readSupportedFlashModesExcWhileSenseNight";
    private static String bg = "readSupportedSenseModesNullKey";
    private static String bh = "beBluuredPreviewWhileAutofocus";
    private static String bi = "cannotCloseFlashAfterSetFlashAuto";
    private static String bj = "hasShutterVoice";
    private static String bk = "hasShutterVoiceWhenMute";
    private static String bl = "cannotUseStartSmoothZoom";
    private static String bm = "cannotWriteFlashExif";
    public Boolean a = false;
    public Boolean b = false;
    public Boolean c = false;
    public Boolean d = false;
    public Boolean e = false;
    public Boolean f = false;
    public Boolean g = false;
    public Boolean h = false;
    public Boolean i = false;
    public Boolean j = false;
    public Boolean k = false;
    public Boolean l = false;
    public Boolean m = false;
    public Boolean n = false;
    public Boolean o = false;
    public Boolean p = false;
    public int q = -1;
    public int r = -1;
    public int s = -1;
    public int t = -1;
    public int u = -1;
    public int v = -1;
    public int w = -1;
    public int x = -1;
    public int y = -1;
    public int z = -1;
    public int A = -1;
    public int B = -1;
    public int C = -1;
    public int D = -1;
    public int E = -1;
    public int F = -1;
    public Boolean G = false;
    public Boolean H = false;
    public Boolean I = false;
    public Boolean J = false;
    public Boolean K = false;
    public Boolean L = false;
    public Boolean M = false;
    public Boolean N = false;
    public Boolean O = false;
    public Boolean P = false;
    public Boolean Q = false;
    public Boolean R = false;
    public Boolean S = false;
    public Boolean T = false;
    public Boolean U = false;
    public Boolean V = false;
    public Boolean W = false;
    public Boolean X = false;
    public Boolean Y = false;
    public Boolean Z = false;
    public Boolean aa = false;
    public Boolean ab = false;
    public Boolean ac = false;
    public Boolean ad = false;

    private a() {
        this.bn = c.b.booleanValue() ? "http://182.131.12.68/services/cameraCoreSvr.php" : "http://xiangji.qq.com/services/cameraCoreSvr.php";
    }

    public static a a() {
        return af;
    }

    public void a(String str) {
        String str2 = ae;
        i.a(str2, "[parseXML] + BEGIN");
        if (TextUtils.isEmpty(str)) {
            i.d(str2, "[parseXML] sourceString is empty");
            return;
        }
        try {
            XmlPullParser newPullParser = XmlPullParserFactory.newInstance().newPullParser();
            newPullParser.setInput(new StringReader(str));
            SharedPreferences.Editor edit = this.bq.edit();
            Boolean bool = false;
            for (int eventType = newPullParser.getEventType(); eventType != 1; eventType = newPullParser.next()) {
                if (eventType == 2) {
                    String name = newPullParser.getName();
                    String b = e.a().b();
                    String str3 = b + "_" + Build.DISPLAY.replace(" ", "_").toUpperCase();
                    if (name.equals(b)) {
                        int attributeCount = newPullParser.getAttributeCount();
                        int i = 0;
                        while (i < attributeCount) {
                            String attributeName = newPullParser.getAttributeName(i);
                            String attributeValue = newPullParser.getAttributeValue(i);
                            if (attributeName.endsWith("0")) {
                                int parseInt = Integer.parseInt(attributeValue);
                                Integer.valueOf(parseInt).getClass();
                                edit.putInt(attributeName, parseInt);
                            } else {
                                boolean parseBoolean = Boolean.parseBoolean(attributeValue);
                                Boolean.valueOf(parseBoolean).getClass();
                                edit.putBoolean(attributeName, parseBoolean);
                            }
                            String str4 = ae;
                            StringBuilder sb = new StringBuilder();
                            sb.append("parseXML item[");
                            i++;
                            sb.append(i);
                            sb.append("] name = ");
                            sb.append(attributeName);
                            sb.append(", value = ");
                            sb.append(attributeValue);
                            i.a(str4, sb.toString());
                        }
                        bool = true;
                    } else if (str3.startsWith(name)) {
                        int attributeCount2 = newPullParser.getAttributeCount();
                        int i2 = 0;
                        while (i2 < attributeCount2) {
                            String attributeName2 = newPullParser.getAttributeName(i2);
                            String attributeValue2 = newPullParser.getAttributeValue(i2);
                            if (attributeName2.endsWith("0")) {
                                int parseInt2 = Integer.parseInt(attributeValue2);
                                Integer.valueOf(parseInt2).getClass();
                                edit.putInt(attributeName2, parseInt2);
                            } else {
                                boolean parseBoolean2 = Boolean.parseBoolean(attributeValue2);
                                Boolean.valueOf(parseBoolean2).getClass();
                                edit.putBoolean(attributeName2, parseBoolean2);
                            }
                            String str5 = ae;
                            StringBuilder sb2 = new StringBuilder();
                            sb2.append("parseXML(subNode) item[");
                            i2++;
                            sb2.append(i2);
                            sb2.append("] name = ");
                            sb2.append(attributeName2);
                            sb2.append(", value = ");
                            sb2.append(attributeValue2);
                            i.a(str5, sb2.toString());
                        }
                    }
                }
                if (bool.booleanValue()) {
                    edit.putBoolean("is_need_parse_xml", false);
                    edit.commit();
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        } catch (XmlPullParserException e2) {
            e2.printStackTrace();
        }
        i.a(ae, "[parseXML] + END");
    }

    public String d() {
        String str;
        String str2;
        InputStream inputStream;
        InputStream inputStream2;
        ?? r2 = "parseXML(release mode) from ";
        String str3 = ae;
        i.a(str3, "[decodeXML] + BEGIN");
        AssetManager assets = this.bp.getAssets();
        InputStream inputStream3 = null;
        r6 = null;
        String str4 = null;
        inputStream3 = null;
        try {
            try {
                try {
                    try {
                        if (c.a.booleanValue()) {
                            InputStream open = assets.open("phone_attrs_config.xml");
                            str4 = h.b(open);
                            i.a(str3, "parseXML(debug mode) sourceString = " + str4);
                            str2 = str4;
                            r2 = open;
                        } else {
                            if (new File(this.bo + "encrypt_phone_attrs_config.dat").exists()) {
                                i.a(str3, "parseXML(release mode) from " + this.bo + "encrypt_phone_attrs_config.dat");
                                inputStream2 = new FileInputStream(this.bo + "encrypt_phone_attrs_config.dat");
                            } else {
                                i.a(str3, "parseXML(release mode) from assets");
                                inputStream2 = assets.open("encrypt_phone_attrs_config.dat");
                            }
                            str2 = new String(g.a(inputStream2));
                            try {
                                i.a(str3, "parseXML(release mode) sourceString = ".concat(str2));
                                r2 = inputStream2;
                            } catch (Exception e) {
                                str = str2;
                                e = e;
                                inputStream = inputStream2;
                                inputStream3 = inputStream;
                                e.printStackTrace();
                                if (inputStream3 != null) {
                                    h.a(inputStream3);
                                }
                                str2 = str;
                                i.a(ae, "[decodeXML] + END");
                                return str2;
                            }
                        }
                        if (r2 != 0) {
                            h.a(r2);
                        }
                    } catch (Throwable th) {
                        th = th;
                        inputStream3 = r2;
                        if (inputStream3 != null) {
                            h.a(inputStream3);
                        }
                        throw th;
                    }
                } catch (Exception e2) {
                    e = e2;
                    str = str4;
                    inputStream = r2;
                }
            } catch (Exception e3) {
                e = e3;
                str = null;
            }
            i.a(ae, "[decodeXML] + END");
            return str2;
        } catch (Throwable th2) {
            th = th2;
        }
    }

    public void e() {
        String str = ae;
        i.a(str, "[loadValueFromPref] + BEGIN");
        Boolean valueOf = Boolean.valueOf(this.bq.getBoolean(ag, false));
        this.a = valueOf;
        if (valueOf.booleanValue()) {
            this.bq.edit().putBoolean("pref_camerasdk_disable", true).apply();
            i.a(str, "set camerasdk disable flag true");
        }
        this.b = Boolean.valueOf(this.bq.getBoolean(ah, false));
        this.d = Boolean.valueOf(this.bq.getBoolean(ai, false));
        this.e = Boolean.valueOf(this.bq.getBoolean(aj, false));
        this.f = Boolean.valueOf(this.bq.getBoolean(ak, false));
        this.g = Boolean.valueOf(this.bq.getBoolean(al, false));
        this.h = Boolean.valueOf(this.bq.getBoolean(am, false));
        this.k = Boolean.valueOf(this.bq.getBoolean(ap, false));
        this.i = Boolean.valueOf(this.bq.getBoolean(an, false));
        this.l = Boolean.valueOf(this.bq.getBoolean(aq, false));
        this.m = Boolean.valueOf(this.bq.getBoolean(ar, false));
        this.j = Boolean.valueOf(this.bq.getBoolean(ao, false));
        this.n = Boolean.valueOf(this.bq.getBoolean(as, false));
        this.p = Boolean.valueOf(this.bq.getBoolean(au, false));
        this.o = Boolean.valueOf(this.bq.getBoolean(at, false));
        this.q = this.bq.getInt(av, -1);
        this.r = this.bq.getInt(aw, -1);
        this.s = this.bq.getInt(ax, -1);
        this.t = this.bq.getInt(ay, -1);
        this.u = this.bq.getInt(az, -1);
        this.v = this.bq.getInt(aA, -1);
        this.w = this.bq.getInt(aB, -1);
        this.x = this.bq.getInt(aC, -1);
        this.y = this.bq.getInt(aD, -1);
        this.z = this.bq.getInt(aE, -1);
        this.A = this.bq.getInt(aF, -1);
        this.B = this.bq.getInt(aG, -1);
        this.C = this.bq.getInt(aH, -1);
        this.D = this.bq.getInt(aI, -1);
        this.E = this.bq.getInt(aJ, -1);
        this.F = this.bq.getInt(aK, -1);
        this.G = Boolean.valueOf(this.bq.getBoolean(aL, false));
        this.H = Boolean.valueOf(this.bq.getBoolean(aM, false));
        this.I = Boolean.valueOf(this.bq.getBoolean(aN, false));
        this.J = Boolean.valueOf(this.bq.getBoolean(aO, false));
        this.K = Boolean.valueOf(this.bq.getBoolean(aP, false));
        this.L = Boolean.valueOf(this.bq.getBoolean(aR, false));
        this.U = Boolean.valueOf(this.bq.getBoolean(aS, false));
        this.P = Boolean.valueOf(this.bq.getBoolean(aT, false));
        this.N = Boolean.valueOf(this.bq.getBoolean(aU, false));
        this.R = Boolean.valueOf(this.bq.getBoolean(aV, false));
        this.S = Boolean.valueOf(this.bq.getBoolean(aW, false));
        this.T = Boolean.valueOf(this.bq.getBoolean(aX, false));
        this.Q = Boolean.valueOf(this.bq.getBoolean(aY, false));
        this.V = Boolean.valueOf(this.bq.getBoolean(aZ, false));
        this.ac = Boolean.valueOf(this.bq.getBoolean(ba, false));
        this.M = Boolean.valueOf(this.bq.getBoolean(bb, false));
        this.ad = Boolean.valueOf(this.bq.getBoolean(bd, false));
        this.O = Boolean.valueOf(this.bq.getBoolean(be, false));
        this.X = Boolean.valueOf(this.bq.getBoolean(bf, false));
        this.Y = Boolean.valueOf(this.bq.getBoolean(bg, false));
        this.Z = Boolean.valueOf(this.bq.getBoolean(bj, false));
        this.aa = Boolean.valueOf(this.bq.getBoolean(bk, false));
        this.ab = Boolean.valueOf(this.bq.getBoolean(bl, false));
        this.W = Boolean.valueOf(this.bq.getBoolean(bm, false));
        i.a(str, "[loadValueFromPref] + END");
    }

    public void f() {
        String str = ae;
        i.a(str, "PhoneAttr start-------------------------------------------------------------");
        i.a(str, "PhoneAttr disableCameraSDK = " + this.a);
        i.a(str, "PhoneAttr readCamNumException = " + this.b);
        i.a(str, "PhoneAttr disableFrontCamera = " + this.d);
        i.a(str, "PhoneAttr beBlurredPreviewAfterTakePic = " + this.f);
        i.a(str, "PhoneAttr beBlurredPicAfterTakePic = " + this.g);
        i.a(str, "PhoneAttr usedPreciseScreenRatio = " + this.e);
        i.a(str, "PhoneAttr disableBackFlashMode = " + this.h);
        i.a(str, "PhoneAttr frontFlashModeException = " + this.i);
        i.a(str, "PhoneAttr backFlashModeException = " + this.k);
        i.a(str, "PhoneAttr backFlashNoOn = " + this.l);
        i.a(str, "PhoneAttr backFlashNoAuto = " + this.m);
        i.a(str, "PhoneAttr frontFlashNoAuto = " + this.j);
        i.a(str, "PhoneAttr disableFocusMode = " + this.n);
        i.a(str, "PhoneAttr disableFocusModeContinuousPicture = " + this.p);
        i.a(str, "PhoneAttr disableAutoFocusDouble = " + this.o);
        i.a(str, "PhoneAttr frontCamRotate0 = " + this.q);
        i.a(str, "PhoneAttr frontCamRotate90 = " + this.r);
        i.a(str, "PhoneAttr frontCamRotate180 = " + this.s);
        i.a(str, "PhoneAttr frontCamRotate270 = " + this.t);
        i.a(str, "PhoneAttr backCamRotate0 = " + this.u);
        i.a(str, "PhoneAttr backCamRotate90 = " + this.v);
        i.a(str, "PhoneAttr backCamRotate180 = " + this.w);
        i.a(str, "PhoneAttr backCamRotate270 = " + this.x);
        i.a(str, "PhoneAttr frontExifRotate0 = " + this.y);
        i.a(str, "PhoneAttr frontExifRotate90 = " + this.z);
        i.a(str, "PhoneAttr frontExifRotate180 = " + this.A);
        i.a(str, "PhoneAttr frontExifRotate270 = " + this.B);
        i.a(str, "PhoneAttr backExifRotate0 = " + this.C);
        i.a(str, "PhoneAttr backExifRotate90 = " + this.D);
        i.a(str, "PhoneAttr backExifRotate180 = " + this.E);
        i.a(str, "PhoneAttr backExifRotate270 = " + this.F);
        i.a(str, "PhoneAttr frontCamFlipH = " + this.G);
        i.a(str, "PhoneAttr disableFrontExposure = " + this.H);
        i.a(str, "PhoneAttr disableBackExposure = " + this.I);
        i.a(str, "PhoneAttr frontExposureStepOne = " + this.J);
        i.a(str, "PhoneAttr backExposureStepOne = " + this.K);
        i.a(str, "PhoneAttr cannotFlashWhileAutoFocus = " + this.L);
        i.a(str, "PhoneAttr cannotSetSurfaceHolderNull = " + this.U);
        i.a(str, "PhoneAttr frontCamCannotRotate = " + this.P);
        i.a(str, "PhoneAttr readExifFlashModeAbnormal = " + this.N);
        i.a(str, "PhoneAttr readMaxNumMeteringAreasAbnormal = " + this.R);
        i.a(str, "PhoneAttr readMaxNumFocusAreasAbnormal = " + this.S);
        i.a(str, "PhoneAttr cannotStopPreviewWhileCreateOrResume = " + this.T);
        i.a(str, "PhoneAttr cannotRotatePreview = " + this.Q);
        i.a(str, "PhoneAttr cannotWriteFlashStatusWhileFlashOn = " + this.V);
        i.a(str, "PhoneAttr beScaledWhileFrontFullScreen = " + this.ac);
        i.a(str, "PhoneAttr cannotFlashWhileFlashOn = " + this.M);
        i.a(str, "PhoneAttr beScaledWhileBackFullScreen = " + this.ad);
        i.a(str, "PhoneAttr backCamCannotRotate = " + this.O);
        i.a(str, "PhoneAttr readSupportedFlashModesExcWhileSenseNight = " + this.X);
        i.a(str, "PhoneAttr readSupportedSenseModesNull = " + this.Y);
        i.a(str, "PhoneAttr hasShutterVoice = " + this.Z);
        i.a(str, "PhoneAttr hasShutterVoiceWhenMute = " + this.aa);
        i.a(str, "PhoneAttr cannotUseStartSmoothZoom = " + this.ab);
        i.a(str, "PhoneAttr cannotWriteFlashExif = " + this.W);
        i.a(str, "PhoneAttr end-------------------------------------------------------------\n");
    }

    public void a(Context context) {
        String str = ae;
        i.a(str, "[init] + BEGIN");
        this.bp = context;
        this.bo = context.getFilesDir().toString() + "/";
        Context context2 = this.bp;
        SharedPreferences sharedPreferences = context2.getSharedPreferences(c.a(context2), 0);
        this.bq = sharedPreferences;
        if (sharedPreferences.getBoolean("is_need_parse_xml", true)) {
            a(d());
        }
        e();
        f();
        i.a(str, "[init] + END");
    }

    public void a(Handler handler, String str, String str2, String str3) {
        String str4 = ae;
        i.a(str4, "[checkVersion] + BEGIN");
        new Thread(new b(this, str, str2, str3, handler)).start();
        i.a(str4, "[checkVersion] + END");
    }

    public SharedPreferences b() {
        return this.bq;
    }
}