Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import java.lang.reflect.Field;

public class Main {
    public static int OP_SYSTEM_ALERT_WINDOW = 0;

    public static void init() {
        try {
            Class AppOpsManager = Class.forName("android.app.AppOpsManager");
            Field field = AppOpsManager.getDeclaredField("OP_SYSTEM_ALERT_WINDOW");
            field.setAccessible(true);
            OP_SYSTEM_ALERT_WINDOW = field.getInt(null);
        } catch (ClassNotFoundException e2) {

        } catch (NoSuchFieldException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }
}