package com.bxzk.afxj.application;


/**
 * 基础Application
 *
 * @author Lemon
 * @use extends BaseApplication 或 在你的Application的onCreate方法中BaseApplication.init(this);
 * @see
 */
public class BaseApplication{

}

/*public class BaseApplication extends SophixApplication {
    private final String TAG = "SophixStubApplication";

    *//*public BaseApplication() {
        super(ShareConstants.TINKER_ENABLE_ALL, "com.yunsx.zdap.application.SampleApplicationLike",
                "com.tencent.tinker.loader.TinkerLoader", false);
    }
*//*

    @Keep
    @SophixEntry(BApplication.class)
    static class RealApplicationStub {}


    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
//         如果需要使用MultiDex，需要在此处调用。
         MultiDex.install(this);
        initSophix();
    }


    private void initSophix() {
        String appVersion = "0.0.0";
        try {
            appVersion = this.getPackageManager()
                    .getPackageInfo(this.getPackageName(), 0)
                    .versionName;
        } catch (Exception e) {
        }
        final SophixManager instance = SophixManager.getInstance();
        instance.setContext(this)
                .setAppVersion(appVersion)
                .setSecretMetaData(null, null, null)
                .setEnableDebug(true)
                .setEnableFullLog()
                .setPatchLoadStatusStub(new PatchLoadStatusListener() {
                    @Override
                    public void onLoad(final int mode, final int code, final String info, final int handlePatchVersion) {
                        if (code == PatchStatus.CODE_LOAD_SUCCESS) {
                            Log.i(TAG, "sophix load patch success!");
                        } else if (code == PatchStatus.CODE_LOAD_RELAUNCH) {
                            // 如果需要在后台重启，建议此处用SharePreference保存状态。
                            Log.i(TAG, "sophix preload patch success. restart app to make effect.");
                        }
                        Log.e("热修复状态码"+ code);
                    }
                }).initialize();
    }






}*/
