package com.seewo.remote.base;

import android.app.Application;
import android.content.Context;
import com.ifpdos.sdk.udi.opensdk.SdkEnvironment;
import com.seewo.remote.d.a;
import com.seewo.remote.d.b;
import com.seewo.remote.e.e.n.d.h;
import com.seewo.vcommons.data.c;
import e.b.b.a.f;

/* JADX INFO: loaded from: classes.dex */
public class App extends Application {
    public static Context b;

    private void a() {
        if (b(this)) {
            c.F(this, a.g() ? c.a.NOT_AUTH : c.a.CLOSE);
            c(this);
        }
    }

    private static boolean b(Context context) {
        return context.getSharedPreferences("DefaultConfig", 0).getBoolean("first_boot", true);
    }

    private static void c(Context context) {
        context.getSharedPreferences("DefaultConfig", 0).edit().putBoolean("first_boot", false).apply();
    }

    @Override // android.content.ContextWrapper
    protected void attachBaseContext(Context context) {
        super.attachBaseContext(context);
        d.a.a.l(this);
    }

    @Override // android.app.Application
    public void onCreate() {
        super.onCreate();
        b = this;
        b.b().d(this);
        e.c.d.c.p().m(this);
        SdkEnvironment.init(this, "xZLhe1TbN4vIUbhTPnzQBE5zhaRvog7G7EovGbc6ydRQq8hBog==");
        f.b(this, "xZLhe1TbN4vIUbhTPnzQBE5zhaRvog7G7EovGbc6ydRQq8hBog==");
        h.a.b();
        a();
    }

    @Override // android.app.Application
    public void onTerminate() {
        super.onTerminate();
        e.c.d.c.p().o();
    }
}
