Build 1.0_r1(from source)

android.app
Class ActivityThread

java.lang.Object
  extended by android.app.ActivityThread

public final class ActivityThread
extends Object

This manages the execution of the main thread in an application process, scheduling and executing activities, broadcasts, and other operations on it as the activity manager requests.


Nested Class Summary
(package private)  class ActivityThread.GcIdler
           
static class ActivityThread.PackageInfo
           
 
Field Summary
(package private)  HashMap<String,WeakReference<Resources>> mActiveResources
           
(package private)  HashMap<IBinder,android.app.ActivityThread.ActivityRecord> mActivities
           
(package private)  ArrayList<Application> mAllApplications
           
(package private)  android.app.ActivityThread.ApplicationThread mAppThread
           
(package private)  android.app.ActivityThread.AppBindData mBoundApplication
           
(package private)  Configuration mConfiguration
           
(package private)  Display mDisplay
           
(package private)  ActivityThread.GcIdler mGcIdler
           
(package private)  boolean mGcIdlerScheduled
           
(package private)  android.app.ActivityThread.H mH
           
(package private)  Application mInitialApplication
           
(package private)  Instrumentation mInstrumentation
           
(package private)  String mInstrumentationAppDir
           
(package private)  String mInstrumentationAppPackage
           
(package private)  String mInstrumentedAppDir
           
(package private)  HashMap<IBinder,android.app.ActivityThread.ProviderRecord> mLocalProviders
           
(package private)  Looper mLooper
           
(package private)  android.app.ActivityThread.ActivityRecord mNewActivities
           
(package private)  int mNumVisibleActivities
           
(package private)  HashMap<String,WeakReference<ActivityThread.PackageInfo>> mPackages
           
(package private)  Configuration mPendingConfiguration
           
(package private)  HashMap<String,android.app.ActivityThread.ProviderRecord> mProviderMap
           
(package private)  HashMap<IBinder,android.app.ActivityThread.ProviderRefCount> mProviderRefCountMap
           
(package private)  ArrayList<android.app.ActivityThread.ActivityRecord> mRelaunchingActivities
          Activities that are enqueued to be relaunched.
(package private)  HashMap<String,WeakReference<ActivityThread.PackageInfo>> mResourcePackages
           
(package private)  HashMap<IBinder,Service> mServices
           
(package private)  boolean mSystemThread
           
(package private) static IPackageManager sPackageManager
           
(package private) static ThreadLocal sThreadLocal
           
 
Constructor Summary
ActivityThread()
           
 
Method Summary
 IContentProvider acquireProvider(Context c, String name)
           
(package private)  ArrayList<ComponentCallbacks> collectComponentCallbacksLocked(boolean allActivities, Configuration newConfig)
           
static ActivityThread currentActivityThread()
           
static String currentPackageName()
           
(package private)  void doGcIfNeeded()
           
(package private)  void finishInstrumentation(int resultCode, Bundle results)
           
 Activity getActivity(IBinder token)
           
 Application getApplication()
           
 android.app.ActivityThread.ApplicationThread getApplicationThread()
           
 Configuration getConfiguration()
           
(package private)  DisplayMetrics getDisplayMetricsLocked()
           
(package private)  Handler getHandler()
           
 Instrumentation getInstrumentation()
           
 Looper getLooper()
           
 ActivityThread.PackageInfo getPackageInfo(ApplicationInfo ai, int flags)
           
 ActivityThread.PackageInfo getPackageInfo(String packageName, int flags)
           
 ActivityThread.PackageInfo getPackageInfoNoCheck(ApplicationInfo ai)
           
static IPackageManager getPackageManager()
           
 String getProfileFilePath()
           
 ApplicationContext getSystemContext()
           
(package private)  Resources getTopLevelResources(String appDir)
           
(package private)  void handleActivityConfigurationChanged(IBinder token)
           
(package private)  void handleConfigurationChanged(Configuration config)
           
(package private)  void handleLowMemory()
           
(package private)  void handleResumeActivity(IBinder token, boolean clearHide)
           
 boolean hasPackageInfo(String packageName)
           
 void installSystemProviders(List providers)
           
 boolean isProfiling()
           
static void main(String[] args)
           
 android.app.ActivityThread.ActivityRecord performDestroyActivity(IBinder token, boolean finishing)
           
 void performNewIntents(IBinder token, List<Intent> intents)
           
(package private)  Bundle performPauseActivity(android.app.ActivityThread.ActivityRecord r, boolean finished, boolean saveState)
           
(package private)  Bundle performPauseActivity(IBinder token, boolean finished, boolean saveState)
           
(package private)  void performRestartActivity(IBinder token)
           
 android.app.ActivityThread.ActivityRecord performResumeActivity(IBinder token, boolean clearHide)
           
(package private)  void performStopActivity(IBinder token)
           
 boolean releaseProvider(IContentProvider provider)
           
(package private)  void removeDeadProvider(String name, IContentProvider provider)
           
(package private)  void removeDeadProviderLocked(String name, IContentProvider provider)
           
 void removeProviderLocked(IContentProvider provider)
           
 ActivityInfo resolveActivityInfo(Intent intent)
           
(package private)  void scheduleContextCleanup(ApplicationContext context, String who, String what)
           
(package private)  void scheduleGcIdler()
           
 void sendActivityResult(IBinder token, String id, int requestCode, int resultCode, Intent data)
           
 Activity startActivityNow(Activity parent, String id, Intent intent, ActivityInfo activityInfo, IBinder token, Bundle state)
           
 Activity startActivityNow(Activity parent, String id, Intent intent, IBinder token, Bundle state)
           
static ActivityThread systemMain()
           
(package private)  void unscheduleGcIdler()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sPackageManager

static IPackageManager sPackageManager

mAppThread

final android.app.ActivityThread.ApplicationThread mAppThread

mLooper

final Looper mLooper

mH

final android.app.ActivityThread.H mH

mActivities

final HashMap<IBinder,android.app.ActivityThread.ActivityRecord> mActivities

mNewActivities

android.app.ActivityThread.ActivityRecord mNewActivities

mNumVisibleActivities

int mNumVisibleActivities

mServices

final HashMap<IBinder,Service> mServices

mBoundApplication

android.app.ActivityThread.AppBindData mBoundApplication

mConfiguration

Configuration mConfiguration

mInitialApplication

Application mInitialApplication

mAllApplications

final ArrayList<Application> mAllApplications

sThreadLocal

static final ThreadLocal sThreadLocal

mInstrumentation

Instrumentation mInstrumentation

mInstrumentationAppDir

String mInstrumentationAppDir

mInstrumentationAppPackage

String mInstrumentationAppPackage

mInstrumentedAppDir

String mInstrumentedAppDir

mSystemThread

boolean mSystemThread

mRelaunchingActivities

final ArrayList<android.app.ActivityThread.ActivityRecord> mRelaunchingActivities
Activities that are enqueued to be relaunched. This list is accessed by multiple threads, so you must synchronize on it when accessing it.


mPendingConfiguration

Configuration mPendingConfiguration

mPackages

final HashMap<String,WeakReference<ActivityThread.PackageInfo>> mPackages

mResourcePackages

final HashMap<String,WeakReference<ActivityThread.PackageInfo>> mResourcePackages

mDisplay

Display mDisplay

mActiveResources

HashMap<String,WeakReference<Resources>> mActiveResources

mProviderMap

final HashMap<String,android.app.ActivityThread.ProviderRecord> mProviderMap

mProviderRefCountMap

final HashMap<IBinder,android.app.ActivityThread.ProviderRefCount> mProviderRefCountMap

mLocalProviders

final HashMap<IBinder,android.app.ActivityThread.ProviderRecord> mLocalProviders

mGcIdler

final ActivityThread.GcIdler mGcIdler

mGcIdlerScheduled

boolean mGcIdlerScheduled
Constructor Detail

ActivityThread

ActivityThread()
Method Detail

currentActivityThread

public static final ActivityThread currentActivityThread()

currentPackageName

public static final String currentPackageName()

getPackageManager

public static IPackageManager getPackageManager()

getDisplayMetricsLocked

DisplayMetrics getDisplayMetricsLocked()

getTopLevelResources

Resources getTopLevelResources(String appDir)

getHandler

final Handler getHandler()

getPackageInfo

public final ActivityThread.PackageInfo getPackageInfo(String packageName,
                                                       int flags)

getPackageInfo

public final ActivityThread.PackageInfo getPackageInfo(ApplicationInfo ai,
                                                       int flags)

getPackageInfoNoCheck

public final ActivityThread.PackageInfo getPackageInfoNoCheck(ApplicationInfo ai)

hasPackageInfo

public final boolean hasPackageInfo(String packageName)

getApplicationThread

public android.app.ActivityThread.ApplicationThread getApplicationThread()

getInstrumentation

public Instrumentation getInstrumentation()

getConfiguration

public Configuration getConfiguration()

isProfiling

public boolean isProfiling()

getProfileFilePath

public String getProfileFilePath()

getLooper

public Looper getLooper()

getApplication

public Application getApplication()

getSystemContext

public ApplicationContext getSystemContext()

scheduleGcIdler

void scheduleGcIdler()

unscheduleGcIdler

void unscheduleGcIdler()

doGcIfNeeded

void doGcIfNeeded()

resolveActivityInfo

public final ActivityInfo resolveActivityInfo(Intent intent)

startActivityNow

public final Activity startActivityNow(Activity parent,
                                       String id,
                                       Intent intent,
                                       IBinder token,
                                       Bundle state)

startActivityNow

public final Activity startActivityNow(Activity parent,
                                       String id,
                                       Intent intent,
                                       ActivityInfo activityInfo,
                                       IBinder token,
                                       Bundle state)

getActivity

public final Activity getActivity(IBinder token)

sendActivityResult

public final void sendActivityResult(IBinder token,
                                     String id,
                                     int requestCode,
                                     int resultCode,
                                     Intent data)

scheduleContextCleanup

final void scheduleContextCleanup(ApplicationContext context,
                                  String who,
                                  String what)

performNewIntents

public final void performNewIntents(IBinder token,
                                    List<Intent> intents)

performResumeActivity

public final android.app.ActivityThread.ActivityRecord performResumeActivity(IBinder token,
                                                                             boolean clearHide)

handleResumeActivity

final void handleResumeActivity(IBinder token,
                                boolean clearHide)

performPauseActivity

final Bundle performPauseActivity(IBinder token,
                                  boolean finished,
                                  boolean saveState)

performPauseActivity

final Bundle performPauseActivity(android.app.ActivityThread.ActivityRecord r,
                                  boolean finished,
                                  boolean saveState)

performStopActivity

final void performStopActivity(IBinder token)

performRestartActivity

final void performRestartActivity(IBinder token)

performDestroyActivity

public final android.app.ActivityThread.ActivityRecord performDestroyActivity(IBinder token,
                                                                              boolean finishing)

collectComponentCallbacksLocked

ArrayList<ComponentCallbacks> collectComponentCallbacksLocked(boolean allActivities,
                                                              Configuration newConfig)

handleConfigurationChanged

final void handleConfigurationChanged(Configuration config)

handleActivityConfigurationChanged

final void handleActivityConfigurationChanged(IBinder token)

handleLowMemory

final void handleLowMemory()

finishInstrumentation

final void finishInstrumentation(int resultCode,
                                 Bundle results)

acquireProvider

public final IContentProvider acquireProvider(Context c,
                                              String name)

releaseProvider

public final boolean releaseProvider(IContentProvider provider)

removeProviderLocked

public final void removeProviderLocked(IContentProvider provider)

removeDeadProvider

final void removeDeadProvider(String name,
                              IContentProvider provider)

removeDeadProviderLocked

final void removeDeadProviderLocked(String name,
                                    IContentProvider provider)

systemMain

public static final ActivityThread systemMain()

installSystemProviders

public final void installSystemProviders(List providers)

main

public static final void main(String[] args)

Build 1.0_r1(from source)

Please submit a feedback, bug or feature