Build 1.0_r1(from source)

android.content.pm
Class ActivityInfo

java.lang.Object
  extended by android.content.pm.PackageItemInfo
      extended by android.content.pm.ComponentInfo
          extended by android.content.pm.ActivityInfo
All Implemented Interfaces:
Parcelable

public class ActivityInfo
extends ComponentInfo
implements Parcelable

Information you can retrieve about a particular application activity or receiver. This corresponds to information collected from the AndroidManifest.xml's <activity> and <receiver> tags.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.content.pm.PackageItemInfo
PackageItemInfo.DisplayNameComparator
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Field Summary
static int CONFIG_FONT_SCALE
          Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor.
static int CONFIG_KEYBOARD
          Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type.
static int CONFIG_KEYBOARD_HIDDEN
          Bit in configChanges that indicates that the activity can itself handle changes to the keyboard being hidden/exposed.
static int CONFIG_LOCALE
          Bit in configChanges that indicates that the activity can itself handle changes to the locale.
static int CONFIG_MCC
          Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MCC.
static int CONFIG_MNC
          Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MNC.
static int CONFIG_NAVIGATION
          Bit in configChanges that indicates that the activity can itself handle changes to the navigation type.
static int CONFIG_ORIENTATION
          Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation.
static int CONFIG_TOUCHSCREEN
          Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type.
 int configChanges
          Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system).
static Parcelable.Creator<ActivityInfo> CREATOR
           
static int FLAG_ALLOW_TASK_REPARENTING
          Bit in flags that indicates that the activity can be moved between tasks based on its task affinity.
static int FLAG_ALWAYS_RETAIN_TASK_STATE
          Bit in flags indicating that, when the activity is the root of a task, that task's stack should never be cleared when it is relaunched from home.
static int FLAG_CLEAR_TASK_ON_LAUNCH
          Bit in flags indicating that, when the activity is the root of a task, that task's stack should be cleared each time the user re-launches it from home.
static int FLAG_EXCLUDE_FROM_RECENTS
          Bit in flags that indicates that the activity should not appear in the list of recently launched activities.
static int FLAG_FINISH_ON_TASK_LAUNCH
          Bit in flags indicating that, when the activity's task is relaunched from home, this activity should be finished.
static int FLAG_MULTIPROCESS
          Bit in flags indicating whether this activity is able to run in multiple processes.
static int FLAG_STATE_NOT_NEEDED
          Bit in flags indicating that the activity's state is not required to be saved, so that if there is a failure the activity will not be removed from the activity stack.
 int flags
          Options that have been set in the activity declaration in the manifest: FLAG_MULTIPROCESS, FLAG_FINISH_ON_TASK_LAUNCH, FLAG_CLEAR_TASK_ON_LAUNCH, FLAG_ALWAYS_RETAIN_TASK_STATE, FLAG_STATE_NOT_NEEDED, FLAG_EXCLUDE_FROM_RECENTS, FLAG_ALLOW_TASK_REPARENTING.
static int LAUNCH_MULTIPLE
          Constant corresponding to standard in the R.attr.launchMode attribute.
static int LAUNCH_SINGLE_INSTANCE
          Constant corresponding to singleInstance in the R.attr.launchMode attribute.
static int LAUNCH_SINGLE_TASK
          Constant corresponding to singleTask in the R.attr.launchMode attribute.
static int LAUNCH_SINGLE_TOP
          Constant corresponding to singleTop in the R.attr.launchMode attribute.
 int launchMode
          The launch mode style requested by the activity.
 String permission
          Optional name of a permission required to be able to access this Activity.
static int SCREEN_ORIENTATION_BEHIND
          Constant corresponding to behind in the R.attr.screenOrientation attribute.
static int SCREEN_ORIENTATION_LANDSCAPE
          Constant corresponding to landscape in the R.attr.screenOrientation attribute.
static int SCREEN_ORIENTATION_NOSENSOR
          Constant corresponding to sensor in the R.attr.screenOrientation attribute.
static int SCREEN_ORIENTATION_PORTRAIT
          Constant corresponding to portrait in the R.attr.screenOrientation attribute.
static int SCREEN_ORIENTATION_SENSOR
          Constant corresponding to sensor in the R.attr.screenOrientation attribute.
static int SCREEN_ORIENTATION_UNSPECIFIED
          Constant corresponding to unspecified in the R.attr.screenOrientation attribute.
static int SCREEN_ORIENTATION_USER
          Constant corresponding to user in the R.attr.screenOrientation attribute.
 int screenOrientation
          The preferred screen orientation this activity would like to run in.
 String targetActivity
          If this is an activity alias, this is the real activity class to run for it.
 String taskAffinity
          The affinity this activity has for another task in the system.
 int theme
          A style resource identifier (in the package's resources) of this activity's theme.
 
Fields inherited from class android.content.pm.ComponentInfo
applicationInfo, enabled, exported, processName
 
Fields inherited from class android.content.pm.PackageItemInfo
icon, labelRes, metaData, name, nonLocalizedLabel, packageName
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
ActivityInfo()
           
ActivityInfo(ActivityInfo orig)
           
 
Method Summary
 int describeContents()
          Describe the kinds of special objects contained in this Parcelable's marshalled representation.
 void dump(Printer pw, String prefix)
           
 int getThemeResource()
          Return the theme resource identifier to use for this activity.
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 void writeToParcel(Parcel dest, int parcelableFlags)
          Flatten this object in to a Parcel.
 
Methods inherited from class android.content.pm.ComponentInfo
dumpBack, dumpFront, getIconResource, loadIcon, loadLabel
 
Methods inherited from class android.content.pm.PackageItemInfo
loadXmlMetaData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

theme

public int theme
A style resource identifier (in the package's resources) of this activity's theme. From the "theme" attribute or, if not set, 0.


LAUNCH_MULTIPLE

public static final int LAUNCH_MULTIPLE
Constant corresponding to standard in the R.attr.launchMode attribute.

See Also:
Constant Field Values

LAUNCH_SINGLE_TOP

public static final int LAUNCH_SINGLE_TOP
Constant corresponding to singleTop in the R.attr.launchMode attribute.

See Also:
Constant Field Values

LAUNCH_SINGLE_TASK

public static final int LAUNCH_SINGLE_TASK
Constant corresponding to singleTask in the R.attr.launchMode attribute.

See Also:
Constant Field Values

LAUNCH_SINGLE_INSTANCE

public static final int LAUNCH_SINGLE_INSTANCE
Constant corresponding to singleInstance in the R.attr.launchMode attribute.

See Also:
Constant Field Values

launchMode

public int launchMode
The launch mode style requested by the activity. From the R.attr.launchMode attribute, one of LAUNCH_MULTIPLE, LAUNCH_SINGLE_TOP, LAUNCH_SINGLE_TASK, or LAUNCH_SINGLE_INSTANCE.


permission

public String permission
Optional name of a permission required to be able to access this Activity. From the "permission" attribute.


taskAffinity

public String taskAffinity
The affinity this activity has for another task in the system. The string here is the name of the task, often the package name of the overall package. If null, the activity has no affinity. Set from the R.attr.taskAffinity attribute.


targetActivity

public String targetActivity
If this is an activity alias, this is the real activity class to run for it. Otherwise, this is null.


FLAG_MULTIPROCESS

public static final int FLAG_MULTIPROCESS
Bit in flags indicating whether this activity is able to run in multiple processes. If true, the system may instantiate it in the some process as the process starting it in order to conserve resources. If false, the default, it always runs in ComponentInfo.processName. Set from the R.attr.multiprocess attribute.

See Also:
Constant Field Values

FLAG_FINISH_ON_TASK_LAUNCH

public static final int FLAG_FINISH_ON_TASK_LAUNCH
Bit in flags indicating that, when the activity's task is relaunched from home, this activity should be finished. Set from the R.attr.finishOnTaskLaunch attribute.

See Also:
Constant Field Values

FLAG_CLEAR_TASK_ON_LAUNCH

public static final int FLAG_CLEAR_TASK_ON_LAUNCH
Bit in flags indicating that, when the activity is the root of a task, that task's stack should be cleared each time the user re-launches it from home. As a result, the user will always return to the original activity at the top of the task. This flag only applies to activities that are used to start the root of a new task. Set from the R.attr.clearTaskOnLaunch attribute.

See Also:
Constant Field Values

FLAG_ALWAYS_RETAIN_TASK_STATE

public static final int FLAG_ALWAYS_RETAIN_TASK_STATE
Bit in flags indicating that, when the activity is the root of a task, that task's stack should never be cleared when it is relaunched from home. Set from the R.attr.alwaysRetainTaskState attribute.

See Also:
Constant Field Values

FLAG_STATE_NOT_NEEDED

public static final int FLAG_STATE_NOT_NEEDED
Bit in flags indicating that the activity's state is not required to be saved, so that if there is a failure the activity will not be removed from the activity stack. Set from the R.attr.stateNotNeeded attribute.

See Also:
Constant Field Values

FLAG_EXCLUDE_FROM_RECENTS

public static final int FLAG_EXCLUDE_FROM_RECENTS
Bit in flags that indicates that the activity should not appear in the list of recently launched activities. Set from the R.attr.excludeFromRecents attribute.

See Also:
Constant Field Values

FLAG_ALLOW_TASK_REPARENTING

public static final int FLAG_ALLOW_TASK_REPARENTING
Bit in flags that indicates that the activity can be moved between tasks based on its task affinity. Set from the R.attr.allowTaskReparenting attribute.

See Also:
Constant Field Values

flags

public int flags
Options that have been set in the activity declaration in the manifest: FLAG_MULTIPROCESS, FLAG_FINISH_ON_TASK_LAUNCH, FLAG_CLEAR_TASK_ON_LAUNCH, FLAG_ALWAYS_RETAIN_TASK_STATE, FLAG_STATE_NOT_NEEDED, FLAG_EXCLUDE_FROM_RECENTS, FLAG_ALLOW_TASK_REPARENTING.


SCREEN_ORIENTATION_UNSPECIFIED

public static final int SCREEN_ORIENTATION_UNSPECIFIED
Constant corresponding to unspecified in the R.attr.screenOrientation attribute.

See Also:
Constant Field Values

SCREEN_ORIENTATION_LANDSCAPE

public static final int SCREEN_ORIENTATION_LANDSCAPE
Constant corresponding to landscape in the R.attr.screenOrientation attribute.

See Also:
Constant Field Values

SCREEN_ORIENTATION_PORTRAIT

public static final int SCREEN_ORIENTATION_PORTRAIT
Constant corresponding to portrait in the R.attr.screenOrientation attribute.

See Also:
Constant Field Values

SCREEN_ORIENTATION_USER

public static final int SCREEN_ORIENTATION_USER
Constant corresponding to user in the R.attr.screenOrientation attribute.

See Also:
Constant Field Values

SCREEN_ORIENTATION_BEHIND

public static final int SCREEN_ORIENTATION_BEHIND
Constant corresponding to behind in the R.attr.screenOrientation attribute.

See Also:
Constant Field Values

SCREEN_ORIENTATION_SENSOR

public static final int SCREEN_ORIENTATION_SENSOR
Constant corresponding to sensor in the R.attr.screenOrientation attribute.

See Also:
Constant Field Values

SCREEN_ORIENTATION_NOSENSOR

public static final int SCREEN_ORIENTATION_NOSENSOR
Constant corresponding to sensor in the R.attr.screenOrientation attribute.

See Also:
Constant Field Values

screenOrientation

public int screenOrientation
The preferred screen orientation this activity would like to run in. From the R.attr.screenOrientation attribute, one of SCREEN_ORIENTATION_UNSPECIFIED, SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_PORTRAIT, SCREEN_ORIENTATION_USER, SCREEN_ORIENTATION_BEHIND, SCREEN_ORIENTATION_SENSOR, SCREEN_ORIENTATION_NOSENSOR.


CONFIG_MCC

public static final int CONFIG_MCC
Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MCC. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_MNC

public static final int CONFIG_MNC
Bit in configChanges that indicates that the activity can itself handle changes to the IMSI MNC. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_LOCALE

public static final int CONFIG_LOCALE
Bit in configChanges that indicates that the activity can itself handle changes to the locale. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_TOUCHSCREEN

public static final int CONFIG_TOUCHSCREEN
Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_KEYBOARD

public static final int CONFIG_KEYBOARD
Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_KEYBOARD_HIDDEN

public static final int CONFIG_KEYBOARD_HIDDEN
Bit in configChanges that indicates that the activity can itself handle changes to the keyboard being hidden/exposed. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_NAVIGATION

public static final int CONFIG_NAVIGATION
Bit in configChanges that indicates that the activity can itself handle changes to the navigation type. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_ORIENTATION

public static final int CONFIG_ORIENTATION
Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation. Set from the R.attr.configChanges attribute.

See Also:
Constant Field Values

CONFIG_FONT_SCALE

public static final int CONFIG_FONT_SCALE
Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor. Set from the R.attr.configChanges attribute. This is not a core resource configutation, but a higher-level value, so its constant starts at the high bits.

See Also:
Constant Field Values

configChanges

public int configChanges
Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system). Contains any combination of CONFIG_FONT_SCALE, CONFIG_MCC, CONFIG_MNC, CONFIG_LOCALE, CONFIG_TOUCHSCREEN, CONFIG_KEYBOARD, CONFIG_NAVIGATION, and CONFIG_ORIENTATION. Set from the R.attr.configChanges attribute.


CREATOR

public static final Parcelable.Creator<ActivityInfo> CREATOR
Constructor Detail

ActivityInfo

public ActivityInfo()

ActivityInfo

public ActivityInfo(ActivityInfo orig)
Method Detail

getThemeResource

public final int getThemeResource()
Return the theme resource identifier to use for this activity. If the activity defines a theme, that is used; else, the application theme is used.

Returns:
The theme associated with this activity.

dump

public void dump(Printer pw,
                 String prefix)

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

describeContents

public int describeContents()
Description copied from interface: Parcelable
Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Specified by:
describeContents in interface Parcelable
Returns:
a bitmask indicating the set of special object types marshalled by the Parcelable.

writeToParcel

public void writeToParcel(Parcel dest,
                          int parcelableFlags)
Description copied from interface: Parcelable
Flatten this object in to a Parcel.

Specified by:
writeToParcel in interface Parcelable
Overrides:
writeToParcel in class ComponentInfo
Parameters:
dest - The Parcel in which the object should be written.
parcelableFlags - Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature