public class

AppGlobals

extends Object
java.lang.Object
   ↳ com.davidluoye.support.app.AppGlobals

Class Overview

Special private access for certain globals related to a process.

Summary

Public Constructors
AppGlobals()
Public Methods
static boolean canAccessStorage(Context context)
static Class<?> getActivityThreadClass()
static Object getActivityThreadInstance()
static Application getApplication()
Return the first Application object made in the process.
static Instrumentation getInstrumentation()
static int getIntCoreSetting(String key, int defaultValue)
Gets the value of an integer core setting.
static String getOpPackageName()
static PackageManager getPackageManager()
Return the raw interface to the package manager.
static String getPackageName()
Return the package name of the first .apk loaded into the process.
static String getProcessName()
Return current process name.
static boolean setInstrumentation(Instrumentation instrumentation)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AppGlobals ()

Public Methods

public static boolean canAccessStorage (Context context)

public static Class<?> getActivityThreadClass ()

public static Object getActivityThreadInstance ()

public static Application getApplication ()

Return the first Application object made in the process. NOTE: Only works on the main thread.

public static Instrumentation getInstrumentation ()

public static int getIntCoreSetting (String key, int defaultValue)

Gets the value of an integer core setting.

Parameters
key The setting key.
defaultValue The setting default value.
Returns
  • The core settings.

public static String getOpPackageName ()

public static PackageManager getPackageManager ()

Return the raw interface to the package manager.

Returns
  • The package manager.

public static String getPackageName ()

Return the package name of the first .apk loaded into the process. NOTE: Only works on the main thread.

public static String getProcessName ()

Return current process name.

public static boolean setInstrumentation (Instrumentation instrumentation)