package com.bef.effectsdk;

import X.4Ms;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import java.io.File;

public class EffectApplicationInfo {
    public static Context appContext;

    static {
        Covode.recordClassIndex(2777);
    }

    public static native int nativeSetHomeDir(String str);

    public static Context getAppContext() {
        return appContext;
    }

    public static void onSetAppContext() {
        MethodCollector.i(12204);
        Context context = appContext;
        if (context != null) {
            nativeSetHomeDir(INVOKEVIRTUAL_com_bef_effectsdk_EffectApplicationInfo_com_ss_android_ugc_aweme_lancet_ContextLancet_getFilesDir(context).getAbsolutePath());
        }
        MethodCollector.o(12204);
    }

    public static void setAppContext(Context context) {
        appContext = context;
        onSetAppContext();
    }

    public static File INVOKEVIRTUAL_com_bef_effectsdk_EffectApplicationInfo_com_ss_android_ugc_aweme_lancet_ContextLancet_getFilesDir(Context context) {
        if (4Ms.LIZJ != null && 4Ms.LJ) {
            return 4Ms.LIZJ;
        }
        File filesDir = context.getFilesDir();
        4Ms.LIZJ = filesDir;
        return filesDir;
    }
}
