package com.util;

/*
 **********************************************
 *      DATE           PERSON       REASON
 *    2021-01-15          FXY        Created
 **********************************************
 */


import android.app.Application;
import android.content.Context;

/**
 * 全局上下文，可以用来弹出无依赖的对话框等
 */
public class GlobalApplication extends Application {

    private static Context context;//全局上下文

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
    }

    //获取全局的上下文
    public static Context getContext() {
        return context;
    }
}