// Path: app/src/main/java/me/wavever/ganklock/MyApplication.java
// public class MyApplication extends Application{
// 
//     private static Context context;
// 
//     private static PreferenceUtil sp;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
//         if (PreferenceUtil.getBoolean(Config.GANK_LOCK_IS_OPEN)) {
//             context.startService(new Intent(context, LockService.class));
//         }
//     }
// 
//     /**
//      * 获得一个全局的Context对象
//      */
//     public static Context getContext() {
//         return context;
//     }
// }


import android.content.Context;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import me.wavever.ganklock.MyApplication;
package me.wavever.ganklock.utils;



/**
 * Created by wavever on 2016/3/10.
 */
public class UIUtil {

    public static int[] getScreenSize() {
        DisplayMetrics metrics = new DisplayMetrics();
        WindowManager windowManager
// Path: app/src/main/java/me/wavever/ganklock/MyApplication.java
// public class MyApplication extends Application{
// 
//     private static Context context;
// 
//     private static PreferenceUtil sp;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
//         if (PreferenceUtil.getBoolean(Config.GANK_LOCK_IS_OPEN)) {
//             context.startService(new Intent(context, LockService.class));
//         }
//     }
// 
//     /**
//      * 获得一个全局的Context对象
//      */
//     public static Context getContext() {
//         return context;
//     }
// }


// Path: app/src/main/java/me/wavever/ganklock/utils/UIUtil.java
import android.content.Context;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import me.wavever.ganklock.MyApplication;

package me.wavever.ganklock.utils;



/**
 * Created by wavever on 2016/3/10.
 */
public class UIUtil {

    public static int[] getScreenSize() {
        DisplayMetrics metrics = new DisplayMetrics();
        WindowManager windowManager
                = (WindowManager) MyApplication.getContext()