Chinaunix首页 | 论坛 | 博客
  • 博客访问: 173640
  • 博文数量: 47
  • 博客积分: 992
  • 博客等级: 准尉
  • 技术积分: 565
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-08 21:57
文章分类

全部博文(47)

文章存档

2019年(1)

2018年(1)

2017年(1)

2014年(6)

2013年(1)

2012年(2)

2011年(35)

我的朋友

分类: 嵌入式

2011-03-24 19:18:01

Android110324: ActivityManagerService注记 1


Email:    zcatt@163.com
Blog    http://zcatt.cublog.cn
 
内容提要
屏幕尺寸大小.以供备忘和参考。

声明
仅限学习交流,禁止商业用途。转载需注明出处。

版本记录
Date        Ver        Note
2011-03-24    0.1        Draft.  zcatt, Beijing


 
ActivityManagerService的主要数据成员,

static int MY_PID
    process id

ArrayList mHistory
    history stack,容纳HistoryRecord objects。HistoryRecord代表activity。

activity的状态有9个,如下
enum ActivityState {
        INITIALIZING,
        RESUMED,
        PAUSING,
        PAUSED,
        STOPPING,
        STOPPED,
        FINISHING,
        DESTROYING,
        DESTROYED
    }

几个跟状态迁移有关的Activity缓存变量:
    HistoryRecord mPausingActivity
        pausing一个activity,启动另一个activity前, 这个保存要paused的activity。其它时刻,是null。

    HistoryRecord mResumedActivity
        current activity that is resumed。

    HistoryRecord mFocusedActivity
        Activity we have told the window manager to have key focus.

    HistoryRecord mLastPausedActivity
        最近切到paused状态的act,用于进入和退出休眠时的切换处理。
        This is the last activity that we put into the paused state. This is used to determine if we need to do an activity transition while sleeping, when we normally hold the top activity paused.

    ArrayList mWaitingVisibleActivities
        容纳HistoryRecord。在执行下步动作前,必须等待新act显示出来的activities。
        List of activities that are waiting for a new activity to become visible before completing whatever operation they are supposed to do.

    ArrayList mStoppingActivities
        准备好stopped的activities,但stopped前需等待下个activity处理告一段落。也就是等待stopped的activities。
        List of activities that are ready to be stopped, but waiting for the next activity to settle down before doing so.  It contains HistoryRecord objects.
    ArrayList mFinishingActivities
        准备好finished的activities,但finishedd前需等待下个activity处理告一段落。也就是等待finished的activities。

ArrayList mNoAnimActivities
    不需迁移动画的activities.

ArrayList mRecentTasks
    最近的task记录。 index 0 是时间最近的。

final ArrayList mLRUActivities
    List of running activities, sorted by recent usage. The first entry in the list is the least recently used. It contains HistoryRecord objects.


Broadcast相关的:

    BroadcastRecord mPendingBroadcast
        Intent broadcast that we have tried to start, but are waiting for its application's process to be created.  We only need one (instead of a list) because we always process broadcasts one at a time, so no others can be started while waiting for this one.

    HashMap mRegisteredReceivers
        Keeps track of all IIntentReceivers that have been registered for broadcasts.  Hash keys are the receiver IBinder, hash value is a ReceiverList.

    HashMap mRegisteredReceivers
        Keeps track of all IIntentReceivers that have been registered for broadcasts.  Hash keys are the receiver IBinder, hash value is a ReceiverList.

    IntentResolver mReceiverResolver
        Resolver for broadcast intents to registered receivers. Holds BroadcastFilter (subclass of IntentFilter).

    HashMap> mStickyBroadcasts
        sticky,
        State of all active sticky broadcasts.  Keys are the action of the sticky Intent, values are an ArrayList of all broadcasted intents with that action (which should usually be one).


Service相关的:

    HashMap mServices
        All currently running services.

    HashMap mServicesByIntent
        All currently running services indexed by the Intent used to start them.

    HashMap mServiceConnections
        All currently bound service connections.  Keys are the IBinder of the client's IServiceConnection.

    ArrayList mPendingServices
        List of services that we have been asked to start, but haven't yet been able to.  It is used to hold start requests while waiting for their corresponding application thread to get going.

    ArrayList mStoppingServices
        List of services that are in the process of being stopped.


ArrayList mPendingThumbnails
    List of PendingThumbnailsRecord objects of clients who are still waiting to receive all of the thumbnails for a task.

ArrayList mCancelledThumbnails
    List of HistoryRecord objects that have been finished and must still report back to a pending thumbnail receiver.


Provider相关:

HashMap mProvidersByName
    All of the currently running global content providers.  Keys are a string containing the provider name and values are a ContentProviderRecord object containing the data about it.  Note that a single provider may be published under multiple names, so there may be multiple entries here for a single one in mProvidersByClass.

HashMap mProvidersByClass
    All of the currently running global content providers.  Keys are a string containing the provider's implementation class and values are a ContentProviderRecord object containing the data about it.

ArrayList mLaunchingProviders
    List of content providers who have clients waiting for them.  The application is currently being launched and the provider will be removed from this list once it is published.

SparseArray> mGrantedUriPermissions
    Global set of specific Uri permissions that have been granted.


Configuration mConfiguration
    Current configuration information.  HistoryRecord objects are given a reference to this object to indicate which configuration they are currently running in, so this object must be kept immutable.

HashMap mAppBindArgs
    传递到process的参数,就是几个常用的.
    List of initialization arguments to pass to all processes when binding applications to them. For example, references to the commonly used services.


WindowManagerService mWindowManager

static ActivityThread mSystemThread

AlertDialog mUidAlert

阅读(1232) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~