ServiceRecordpublic class ServiceRecord extends android.os.Binder A running application service. |
Fields Summary |
---|
final BatteryStatsImpl.Uid.Pkg.Serv | stats | final android.content.ComponentName | name | final String | shortName | final Intent.FilterComparison | intent | final android.content.pm.ServiceInfo | serviceInfo | final android.content.pm.ApplicationInfo | appInfo | final String | packageName | final String | processName | final String | permission | final String | baseDir | final String | resDir | final String | dataDir | final boolean | exported | final Runnable | restarter | final long | createTime | final HashMap | bindings | final HashMap | connections | final List | startArgs | ProcessRecord | app | boolean | isForeground | long | lastActivity | boolean | startRequested | int | lastStartId | int | executeNesting | long | executingStart | int | crashCount | int | totalRestartCount | int | restartCount | long | restartDelay | long | restartTime | long | nextRestartTime |
Constructors Summary |
---|
ServiceRecord(BatteryStatsImpl.Uid.Pkg.Serv servStats, android.content.ComponentName name, Intent.FilterComparison intent, android.content.pm.ServiceInfo sInfo, Runnable restarter)
this.stats = servStats;
this.name = name;
shortName = name.flattenToShortString();
this.intent = intent;
serviceInfo = sInfo;
appInfo = sInfo.applicationInfo;
packageName = sInfo.applicationInfo.packageName;
processName = sInfo.processName;
permission = sInfo.permission;
baseDir = sInfo.applicationInfo.sourceDir;
resDir = sInfo.applicationInfo.publicSourceDir;
dataDir = sInfo.applicationInfo.dataDir;
exported = sInfo.exported;
this.restarter = restarter;
createTime = lastActivity = SystemClock.uptimeMillis();
|
Methods Summary |
---|
void | dump(java.io.PrintWriter pw, java.lang.String prefix) // time when restartDelay will expire.
pw.println(prefix + this);
pw.println(prefix + "intent=" + intent.getIntent());
pw.println(prefix + "packageName=" + packageName);
pw.println(prefix + "processName=" + processName);
pw.println(prefix + "permission=" + permission);
pw.println(prefix + "baseDir=" + baseDir+ " resDir=" + resDir + " dataDir=" + dataDir);
pw.println(prefix + "app=" + app);
pw.println(prefix + "isForeground=" + isForeground
+ " lastActivity=" + lastActivity);
pw.println(prefix + "startRequested=" + startRequested
+ " startId=" + lastStartId
+ " executeNesting=" + executeNesting
+ " executingStart=" + executingStart
+ " crashCount=" + crashCount);
pw.println(prefix + "totalRestartCount=" + totalRestartCount
+ " restartCount=" + restartCount
+ " restartDelay=" + restartDelay
+ " restartTime=" + restartTime
+ " nextRestartTime=" + nextRestartTime);
if (bindings.size() > 0) {
pw.println(prefix + "Bindings:");
Iterator<IntentBindRecord> it = bindings.values().iterator();
while (it.hasNext()) {
IntentBindRecord b = it.next();
pw.println(prefix + "Binding " + b);
b.dump(pw, prefix + " ");
}
}
if (connections.size() > 0) {
pw.println(prefix + "All Connections:");
Iterator<ConnectionRecord> it = connections.values().iterator();
while (it.hasNext()) {
ConnectionRecord c = it.next();
pw.println(prefix + " " + c);
}
}
| public void | resetRestartCounter()
restartCount = 0;
restartDelay = 0;
restartTime = 0;
| public AppBindRecord | retrieveAppBindingLocked(android.content.Intent intent, ProcessRecord app)
Intent.FilterComparison filter = new Intent.FilterComparison(intent);
IntentBindRecord i = bindings.get(filter);
if (i == null) {
i = new IntentBindRecord(this, filter);
bindings.put(filter, i);
}
AppBindRecord a = i.apps.get(app);
if (a != null) {
return a;
}
a = new AppBindRecord(this, i, app);
i.apps.put(app, a);
return a;
| public java.lang.String | toString()
return "ServiceRecord{"
+ Integer.toHexString(System.identityHashCode(this))
+ " " + shortName + "}";
|
|