English | Site Directory

Android - An Open Handset Alliance Project

android.content.pm
public class

android.content.pm.ActivityInfo

java.lang.Object
android.content.pm.PackageItemInfo
android.content.pm.ComponentInfo
android.content.pm.ActivityInfo 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.

Summary

Constants

      Value  
int  CLEAR_ON_BACKGROUND_FLAG  Bit in flags that indicates that the activity's stack should be cleared when it moves to the background.  0x00000002 
int  CONFIG_FONT_SCALE  Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor.  0x00000001 
int  CONFIG_KEYBOARD  Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type.  0x00000008 
int  CONFIG_KEYBOARD_HIDDEN  Bit in configChanges that indicates that the activity can itself handle changes to the keyboard being hidden/exposed.  16  0x00000010 
int  CONFIG_LOCALE  Bit in configChanges that indicates that the activity can itself handle changes to the locale.  0x00000002 
int  CONFIG_NAVIGATION  Bit in configChanges that indicates that the activity can itself handle changes to the navigation type.  32  0x00000020 
int  CONFIG_ORIENTATION  Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation.  64  0x00000040 
int  CONFIG_TOUCHSCREEN  Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type.  0x00000004 
Creator  CREATOR       
int  EXCLUDE_FROM_RECENTS_FLAG  Bit in flags that indicates that the activity should not appear in the list of recently launched activities.  0x00000008 
int  MULTIPLE_LAUNCH  Constant corresponding to multiple in the launchMode attribute.  0x00000000 
int  MULTIPROCESS_FLAG  Bit in flags indicating whether this activity is able to run in multiple processes.  0x00000001 
int  SINGLE_INSTANCE_LAUNCH  Constant corresponding to singleInstance in the launchMode attribute.  0x00000003 
int  SINGLE_TASK_LAUNCH  Constant corresponding to singleTask in the launchMode attribute.  0x00000002 
int  SINGLE_TOP_LAUNCH  Constant corresponding to singleTop in the launchMode attribute.  0x00000001 
int  STATE_NOT_NEEDED_FLAG  Bit in flags that indicates 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.  0x00000004 

Fields

public      int  configChanges  Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system). 
public      int  flags  Options that have been set in the activity declaration in the manifest: MULTIPROCESS_FLAG, CLEAR_ON_BACKGROUND_FLAG, STATE_NOT_NEEDED_FLAG
public      int  launchMode  The launch mode style requested by the activity. 
public      String  permission  Optional name of a permission required to be able to access this Activity. 
public      String  taskAffinity  The affinity this activity has for another task in the system. 
public      int  theme  A style resource identifier (in the package's resources) of this activity's theme. 
Fields inherited from class android.content.pm.ComponentInfo
Fields inherited from class android.content.pm.PackageItemInfo

Public Constructors

          ActivityInfo()
          ActivityInfo(ActivityInfo orig)

Public Methods

        void  dump(Printer pw, String prefix)
    final    int  getThemeResource()
Return the theme resource identifier to use for this activity.
        String  toString()
Answers a string containing a concise, human-readable description of the receiver.
        void  writeToParcel(Parcel dest)
Methods inherited from class android.content.pm.ComponentInfo
Methods inherited from class android.content.pm.PackageItemInfo
Methods inherited from class java.lang.Object
Methods inherited from interface android.os.Parcelable

Details

Constants

public static final int CLEAR_ON_BACKGROUND_FLAG

Bit in flags that indicates that the activity's stack should be cleared when it moves to the background. When the user next brings the task to the front, they will return to the original activity at the top of the tasks. This flag only applies to activities that are used to start the root of a new task. Set from the clearOnBackground attribute.
Constant Value: 2 (0x00000002)

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 configChanges attribute.
Constant Value: 1 (0x00000001)

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 configChanges attribute.
Constant Value: 8 (0x00000008)

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 configChanges attribute.
Constant Value: 16 (0x00000010)

public static final int CONFIG_LOCALE

Bit in configChanges that indicates that the activity can itself handle changes to the locale. Set from the configChanges attribute.
Constant Value: 2 (0x00000002)

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 configChanges attribute.
Constant Value: 32 (0x00000020)

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 configChanges attribute.
Constant Value: 64 (0x00000040)

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 configChanges attribute.
Constant Value: 4 (0x00000004)

public static final Creator CREATOR

public static final int EXCLUDE_FROM_RECENTS_FLAG

Bit in flags that indicates that the activity should not appear in the list of recently launched activities. Set from the excludeFromRecents attribute.
Constant Value: 8 (0x00000008)

public static final int MULTIPLE_LAUNCH

Constant corresponding to multiple in the launchMode attribute.
Constant Value: 0 (0x00000000)

public static final int MULTIPROCESS_FLAG

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 processName. Set from the multiprocess attribute.
Constant Value: 1 (0x00000001)

public static final int SINGLE_INSTANCE_LAUNCH

Constant corresponding to singleInstance in the launchMode attribute.
Constant Value: 3 (0x00000003)

public static final int SINGLE_TASK_LAUNCH

Constant corresponding to singleTask in the launchMode attribute.
Constant Value: 2 (0x00000002)

public static final int SINGLE_TOP_LAUNCH

Constant corresponding to singleTop in the launchMode attribute.
Constant Value: 1 (0x00000001)

public static final int STATE_NOT_NEEDED_FLAG

Bit in flags that indicates 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 stateNotNeeded attribute.
Constant Value: 4 (0x00000004)

Fields

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_LOCALE, CONFIG_TOUCHSCREEN, CONFIG_KEYBOARD, CONFIG_NAVIGATION, and CONFIG_ORIENTATION. Set from the configChanges attribute.

public int flags

Options that have been set in the activity declaration in the manifest: MULTIPROCESS_FLAG, CLEAR_ON_BACKGROUND_FLAG, STATE_NOT_NEEDED_FLAG.

public int launchMode

The launch mode style requested by the activity. From the launchMode attribute, one of MULTIPLE_LAUNCH, SINGLE_TOP_LAUNCH, SINGLE_TASK_LAUNCH, or SINGLE_INSTANCE_LAUNCH.

public String permission

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

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. Specifying an affinity allows an activity to be migrated over to another task once the user has moved away from its current task. This comes from the "taskAffinity" attribute.

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.

Public Constructors

public ActivityInfo()

public ActivityInfo(ActivityInfo orig)

Public Methods

public void dump(Printer pw, String prefix)

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.

public String toString()

Answers a string containing a concise, human-readable description of the receiver.

public void writeToParcel(Parcel dest)

Build m5-rc15g - 14 May 2008 12:50