123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package com.edufound.mobile.util;
- import android.app.Application;
- import android.content.Context;
- import com.edufound.mobile.base.BaseView;
- public class ContextUtil {
- public static final String CLOSE_ACTIVITY_SPLASH = "com.edufound.mobile.close.splash";
- public static final String CLOSE_ACTIVITY_MAIN = "com.edufound.mobile.close.main";
- public static final String CLOSE_ACTIVITY_PAY = "com.edufound.mobile.close.pay";
- public static final String RESTART_ACTIVITY_MAIN = "com.edufound.mobile.restart.main";
- public static final String CHANGE_VIDEO_TYPE_VIDEO = "com.edufound.mobile.change.video";
- public static final String CHANGE_VIDEO_TYPE_IJKPLAYER = "com.edufound.mobile.change.ijkplayer";
- public static final String NOTIFICATION_WEB_PLAYERTIME = "com.edufound.mobile.notification.playertime";
- static Context mContext;
- static Application application;
- public static Application getApplication() {
- return application;
- }
- public static void setApplication(Application application) {
- ContextUtil.application = application;
- }
- static boolean isDebug;
- static boolean mNetWorkState = true;
- public static boolean getNetWorkState() {
- return mNetWorkState;
- }
- public static void setmNetWorkState(boolean mNetWorkState) {
- ContextUtil.mNetWorkState = mNetWorkState;
- }
- public static void setContext(Context context) {
- mContext = context;
- }
- public static Context getContext() {
- if (mContext == null) {
- return null;
- }
- return mContext;
- }
- public static boolean isIsDebug() {
- return isDebug;
- }
- public static void setIsDebug(boolean isDebug) {
- ContextUtil.isDebug = isDebug;
- }
- }
|