Example usage for android.content Context getApplicationInfo

List of usage examples for android.content Context getApplicationInfo

Introduction

In this page you can find the example usage for android.content Context getApplicationInfo.

Prototype

public abstract ApplicationInfo getApplicationInfo();

Source Link

Document

Return the full application info for this context's package.

Usage

From source file:Main.java

public static String getAppPackageName(Context context) {
    return context.getApplicationInfo().packageName;
}

From source file:Main.java

public static String getRootDirectory(Context context) {
    return context.getApplicationInfo().dataDir;
}

From source file:Main.java

public static boolean isDebuggable(Context c) {
    return (0 != (c.getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE));
}

From source file:Main.java

public static boolean isDebuggable(Context context) {
    return (context.getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE) != 0;
}

From source file:Main.java

public static boolean isAppDebuggable(Context context) {
    return (context.getApplicationInfo().flags & DEVICE_STATE_JAILBROKEN) != 0 ? true : CLS_TRACE_DEFAULT;
}

From source file:Main.java

public static boolean isAsSystemApp(Context pContext) {
    return (pContext.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) != 0;
}

From source file:Main.java

public static ApplicationInfo getApplicationInfo(Context context) {
    return context.getApplicationInfo();
}

From source file:Main.java

public static String getAppName(Context cx) {
    return cx.getString(cx.getApplicationInfo().labelRes);
}

From source file:Main.java

public static boolean isDebugModeEnable(Context context) {
    return (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
}

From source file:Main.java

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static boolean isLargeHeap(Context context) {
    return (context.getApplicationInfo().flags & ApplicationInfo.FLAG_LARGE_HEAP) != 0;
}