Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;
import android.content.pm.ApplicationInfo;

public class Main {
    /**
     * Check if android:debuggable is true 
     * @param context
     * @return
     */
    public static boolean isDebuggable(Context context) {
        ApplicationInfo ai = context.getApplicationInfo();
        if (ai == null) {
            return false;
        }
        return (ai.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
    }
}