List of usage examples for android.content Context getApplicationInfo
public abstract ApplicationInfo getApplicationInfo();
From source file:Main.java
public static String getApplicationName(Context context) { int stringId = context.getApplicationInfo().labelRes; return context.getString(stringId); }
From source file:Main.java
public static boolean isDebugBuild(Context context) { return (0 != (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)); }
From source file:Main.java
public static String getAppName(Context context) { int stringId = context.getApplicationInfo().labelRes; return context.getString(stringId); }
From source file:Main.java
public static boolean isAppDebuggable(Context context) { return (0 != (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)); }
From source file:Main.java
private static String getAppName(Context context, int pID) { return context.getApplicationInfo().name; }
From source file:Main.java
public static boolean isDebuggable(Context context) { int flags = context.getApplicationInfo().flags; flags &= ApplicationInfo.FLAG_DEBUGGABLE; return (flags != 0); }
From source file:Main.java
public static int tryToGetIconFormStringOrGetFromApplication(String str, Context context) { int i = context.getApplicationInfo().icon; if (str != null) { int identifier = context.getResources().getIdentifier(str, "drawable", context.getPackageName()); if (identifier != 0) { return identifier; }/*from w ww.j a v a 2 s .com*/ } return i; }
From source file:Main.java
public static int getApplicationIconId(Context context) { ApplicationInfo info = context.getApplicationInfo(); return info.icon; }
From source file:Main.java
public static String getApplicationName(Context context) { return context.getString(context.getApplicationInfo().labelRes); }
From source file:Main.java
/** * @return true if the app is debuggable, false otherwise *///ww w .j a va2 s . co m public static boolean isDebuggable(Context context) { return ((context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0); }