FileDocCategorySizeDatePackage
ProcessRecord.javaAPI DocAndroid 1.5 API9885Wed May 06 22:42:00 BST 2009com.android.server.am

ProcessRecord

public class ProcessRecord extends Object implements Watchdog.PssRequestor
Full information about a particular process that is currently running.

Fields Summary
final BatteryStatsImpl.Uid.Proc
batteryStats
final android.content.pm.ApplicationInfo
info
final String
processName
final HashSet
pkgList
android.app.IApplicationThread
thread
int
pid
boolean
starting
int
maxAdj
int
hiddenAdj
int
curRawAdj
int
setRawAdj
int
curAdj
int
setAdj
boolean
isForeground
boolean
setIsForeground
boolean
foregroundServices
boolean
bad
android.os.IBinder
forcingToForeground
int
adjSeq
android.content.ComponentName
instrumentationClass
String
instrumentationProfileFile
android.app.IInstrumentationWatcher
instrumentationWatcher
android.os.Bundle
instrumentationArguments
android.content.ComponentName
instrumentationResultClass
BroadcastRecord
curReceiver
long
lastRequestedGc
int
lastPss
final ArrayList
activities
final HashSet
services
final HashSet
executingServices
final HashSet
connections
final HashSet
receivers
final HashMap
pubProviders
final HashSet
conProviders
boolean
persistent
boolean
crashing
android.app.Dialog
crashDialog
boolean
notResponding
android.app.Dialog
anrDialog
boolean
removed
boolean
debugging
int
persistentActivities
boolean
waitedForDebugger
android.app.Dialog
waitDialog
ActivityManager.ProcessErrorStateInfo
crashingReport
ActivityManager.ProcessErrorStateInfo
notRespondingReport
Constructors Summary
ProcessRecord(BatteryStatsImpl.Uid.Proc _batteryStats, android.app.IApplicationThread _thread, android.content.pm.ApplicationInfo _info, String _processName)

        batteryStats = _batteryStats;
        info = _info;
        processName = _processName;
        pkgList.add(_info.packageName);
        thread = _thread;
        maxAdj = ActivityManagerService.EMPTY_APP_ADJ;
        hiddenAdj = ActivityManagerService.HIDDEN_APP_MIN_ADJ;
        curRawAdj = setRawAdj = -100;
        curAdj = setAdj = -100;
        persistent = false;
        removed = false;
        persistentActivities = 0;
    
Methods Summary
public booleanaddPackage(java.lang.String pkg)

        if (!pkgList.contains(pkg)) {
            pkgList.add(pkg);
            return true;
        }
        return false;
    
voiddump(java.io.PrintWriter pw, java.lang.String prefix)


         
        pw.println(prefix + this);
        pw.println(prefix + "class=" + info.className);
        pw.println(prefix+"manageSpaceActivityName="+info.manageSpaceActivityName);
        pw.println(prefix + "dir=" + info.sourceDir + " publicDir=" + info.publicSourceDir 
              + " data=" + info.dataDir);
        pw.println(prefix + "packageList=" + pkgList);
        pw.println(prefix + "instrumentationClass=" + instrumentationClass
              + " instrumentationProfileFile=" + instrumentationProfileFile);
        pw.println(prefix + "instrumentationArguments=" + instrumentationArguments);
        pw.println(prefix + "thread=" + thread + " curReceiver=" + curReceiver);
        pw.println(prefix + "pid=" + pid + " starting=" + starting
                + " lastPss=" + lastPss);
        pw.println(prefix + "maxAdj=" + maxAdj + " hiddenAdj=" + hiddenAdj
                + " curRawAdj=" + curRawAdj + " setRawAdj=" + setRawAdj
                + " curAdj=" + curAdj + " setAdj=" + setAdj);
        pw.println(prefix + "isForeground=" + isForeground
                + " setIsForeground=" + setIsForeground
                + " foregroundServices=" + foregroundServices
                + " forcingToForeground=" + forcingToForeground);
        pw.println(prefix + "persistent=" + persistent + " removed=" + removed
                + " persistentActivities=" + persistentActivities);
        pw.println(prefix + "debugging=" + debugging
                + " crashing=" + crashing + " " + crashDialog
                + " notResponding=" + notResponding + " " + anrDialog
                + " bad=" + bad);
        pw.println(prefix + "activities=" + activities);
        pw.println(prefix + "services=" + services);
        pw.println(prefix + "executingServices=" + executingServices);
        pw.println(prefix + "connections=" + connections);
        pw.println(prefix + "pubProviders=" + pubProviders);
        pw.println(prefix + "conProviders=" + conProviders);
        pw.println(prefix + "receivers=" + receivers);
    
public java.lang.String[]getPackageList()

        int size = pkgList.size();
        if (size == 0) {
            return null;
        }
        String list[] = new String[size];
        pkgList.toArray(list);
        return list;
    
public booleanisInterestingToUserLocked()
This method returns true if any of the activities within the process record are interesting to the user. See HistoryRecord.isInterestingToUserLocked()

        final int size = activities.size();
        for (int i = 0 ; i < size ; i++) {
            HistoryRecord r = (HistoryRecord) activities.get(i);
            if (r.isInterestingToUserLocked()) {
                return true;
            }
        }
        return false;
    
public voidrequestPss()

        IApplicationThread localThread = thread;
        if (localThread != null) {
            try {
                localThread.requestPss();
            } catch (RemoteException e) {
            }
        }
    
public voidresetPackageList()

        pkgList.clear();
        pkgList.add(info.packageName);
    
public voidstopFreezingAllLocked()

        int i = activities.size();
        while (i > 0) {
            i--;
            ((HistoryRecord)activities.get(i)).stopFreezingScreenLocked(true);
        }
    
public java.lang.StringtoString()

        return "ProcessRecord{"
            + Integer.toHexString(System.identityHashCode(this))
            + " " + pid + ":" + processName + "/" + info.uid + "}";