// Path: app/src/main/java/com/vv/androidreview/base/BaseApplication.java
// public class BaseApplication extends Application{
// 
//     public static Context sContext;
//     public static Resources sResource;
// 
//     private static String PREF_NAME = "creativelocker.pref";
//     private static String LAST_REFRESH_TIME = "last_refresh_time.pref";
//     private static long lastToastTime;
//     //运行系统是否为2.3或以上
//     public static boolean isAtLeastGB;
// 
//     static {
//         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
//             isAtLeastGB = true;
//         }
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         sContext = getApplicationContext();
//         sResource = sContext.getResources();
//     }
// 
//     public static synchronized BaseApplication context() {
//         return (BaseApplication) sContext;
//     }
// 
//     public static Resources resources() {
//         return sResource;
//     }
// 
// }
// 
// Path: app/src/main/java/com/vv/androidreview/base/system/AppContext.java
// public class AppContext extends BaseApplication {
// 
//     private static AppContext instance;
// 
//     private static final String ApplicationID = "这里输入你的Bmob ApplicationID";
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         instance = this;
//         Bmob.initialize(this, ApplicationID);
//         //初始化Log系统
//         Logger.init("MyDemo")               // default PRETTYLOGGER or use just init()
//               .setMethodCount(1)            // default 2
//               .hideThreadInfo();           // default shown
//         //异常捕获收集
// //        CrashWoodpecker.fly().to(this);
//     }
// 
//     /**
//      * 获得当前app运行的AppContext
//      *
//      * @return
//      */
//     public static AppContext getInstance() {
//         return instance;
//     }
// 
// 
// }


import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Point;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.PowerManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import com.vv.androidreview.base.BaseApplication;
import com.vv.androidreview.base.system.AppContext;
import java.io.File;
import java.lang.reflect.Field;
import java.text.NumberFormat;
import java.util.List;
/*
 * Copyright (c) 2016. Vv <envyfan@qq.com><http://www.v-sounds.com/>
 *
 * This file is part of AndroidReview (Android面试复习)
 *
 * AndroidReview is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 *  AndroidReview is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 * along with AndroidReview.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.vv.androidreview.utils;





/**
 * Author：Vv on 2015/7/21 14:45
 * Mail：envyfan@qq.com
 * Description：
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public class TDevice {

    // 手机网络类型
    public static final int NETTYPE_WIFI = 0x01;
    public static final int NETTYPE_CMWAP = 0x02;
    public static final int NETTYPE_CMNET = 0x03;

    public static boolean GTE_HC;
    public static boolean GTE_ICS;
    public static boolean PRE_HC;
    private static Boolean _hasBigScreen = null;
    private static Boolean _hasCamera = null;
    private static Boolean _isTablet = null;
    private static Integer _loadFactor = null;

    private static int _pageSize = -1;
    public static float displayDensity = 0.0F;

    static {
        GTE_ICS = Build.VERSION.SDK_INT >= 14;
        GTE_HC = Build.VERSION.SDK_INT >= 11;
        PRE_HC = Build.VERSION.SDK_INT < 11;
    }

    public TDevice() {
    }

    public static float dpToPixel(float dp) {
        return dp * (getDisplayMetrics().densityDpi / 160F);
    }

    public static int getDefaultLoadFactor() {
        if (_loadFactor == null) {
// Path: app/src/main/java/com/vv/androidreview/base/BaseApplication.java
// public class BaseApplication extends Application{
// 
//     public static Context sContext;
//     public static Resources sResource;
// 
//     private static String PREF_NAME = "creativelocker.pref";
//     private static String LAST_REFRESH_TIME = "last_refresh_time.pref";
//     private static long lastToastTime;
//     //运行系统是否为2.3或以上
//     public static boolean isAtLeastGB;
// 
//     static {
//         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
//             isAtLeastGB = true;
//         }
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         sContext = getApplicationContext();
//         sResource = sContext.getResources();
//     }
// 
//     public static synchronized BaseApplication context() {
//         return (BaseApplication) sContext;
//     }
// 
//     public static Resources resources() {
//         return sResource;
//     }
// 
// }
// 
// Path: app/src/main/java/com/vv/androidreview/base/system/AppContext.java
// public class AppContext extends BaseApplication {
// 
//     private static AppContext instance;
// 
//     private static final String ApplicationID = "这里输入你的Bmob ApplicationID";
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         instance = this;
//         Bmob.initialize(this, ApplicationID);
//         //初始化Log系统
//         Logger.init("MyDemo")               // default PRETTYLOGGER or use just init()
//               .setMethodCount(1)            // default 2
//               .hideThreadInfo();           // default shown
//         //异常捕获收集
// //        CrashWoodpecker.fly().to(this);
//     }
// 
//     /**
//      * 获得当前app运行的AppContext
//      *
//      * @return
//      */
//     public static AppContext getInstance() {
//         return instance;
//     }
// 
// 
// }


// Path: app/src/main/java/com/vv/androidreview/utils/TDevice.java
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Point;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.PowerManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import com.vv.androidreview.base.BaseApplication;
import com.vv.androidreview.base.system.AppContext;
import java.io.File;
import java.lang.reflect.Field;
import java.text.NumberFormat;
import java.util.List;

/*
 * Copyright (c) 2016. Vv <envyfan@qq.com><http://www.v-sounds.com/>
 *
 * This file is part of AndroidReview (Android面试复习)
 *
 * AndroidReview is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 *  AndroidReview is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 * along with AndroidReview.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.vv.androidreview.utils;





/**
 * Author：Vv on 2015/7/21 14:45
 * Mail：envyfan@qq.com
 * Description：
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public class TDevice {

    // 手机网络类型
    public static final int NETTYPE_WIFI = 0x01;
    public static final int NETTYPE_CMWAP = 0x02;
    public static final int NETTYPE_CMNET = 0x03;

    public static boolean GTE_HC;
    public static boolean GTE_ICS;
    public static boolean PRE_HC;
    private static Boolean _hasBigScreen = null;
    private static Boolean _hasCamera = null;
    private static Boolean _isTablet = null;
    private static Integer _loadFactor = null;

    private static int _pageSize = -1;
    public static float displayDensity = 0.0F;

    static {
        GTE_ICS = Build.VERSION.SDK_INT >= 14;
        GTE_HC = Build.VERSION.SDK_INT >= 11;
        PRE_HC = Build.VERSION.SDK_INT < 11;
    }

    public TDevice() {
    }

    public static float dpToPixel(float dp) {
        return dp * (getDisplayMetrics().densityDpi / 160F);
    }

    public static int getDefaultLoadFactor() {
        if (_loadFactor == null) {
            Integer integer = Integer.valueOf(0xf & BaseApplication.context()