Example usage for android.app Application getApplicationInfo

List of usage examples for android.app Application getApplicationInfo

Introduction

In this page you can find the example usage for android.app Application getApplicationInfo.

Prototype

@Override
    public ApplicationInfo getApplicationInfo() 

Source Link

Usage

From source file:Main.java

/**
 * Checks if the application is running as debug mode or not.
 * @param app the application to check//from   ww  w.  ja  v  a2s  .co  m
 * @return true if debuggable, false otherwise.
 */
public static final boolean isDebuggable(Application app) {
    ApplicationInfo info = app.getApplicationInfo();
    return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
}