Methods Summary |
---|
public void | addExternalProcessHandleLocked(android.os.IBinder token)
if (token == null) {
externalProcessNoHandleCount++;
} else {
if (externalProcessTokenToHandle == null) {
externalProcessTokenToHandle = new HashMap<IBinder, ExternalProcessHandle>();
}
ExternalProcessHandle handle = externalProcessTokenToHandle.get(token);
if (handle == null) {
handle = new ExternalProcessHandle(token);
externalProcessTokenToHandle.put(token, handle);
}
handle.mAcquisitionCount++;
}
|
public boolean | canRunHere(ProcessRecord app)
return (info.multiprocess || info.processName.equals(app.processName))
&& uid == app.info.uid;
|
void | dump(java.io.PrintWriter pw, java.lang.String prefix, boolean full)
if (full) {
pw.print(prefix); pw.print("package=");
pw.print(info.applicationInfo.packageName);
pw.print(" process="); pw.println(info.processName);
}
pw.print(prefix); pw.print("proc="); pw.println(proc);
if (launchingApp != null) {
pw.print(prefix); pw.print("launchingApp="); pw.println(launchingApp);
}
if (full) {
pw.print(prefix); pw.print("uid="); pw.print(uid);
pw.print(" provider="); pw.println(provider);
}
if (singleton) {
pw.print(prefix); pw.print("singleton="); pw.println(singleton);
}
pw.print(prefix); pw.print("authority="); pw.println(info.authority);
if (full) {
if (info.isSyncable || info.multiprocess || info.initOrder != 0) {
pw.print(prefix); pw.print("isSyncable="); pw.print(info.isSyncable);
pw.print(" multiprocess="); pw.print(info.multiprocess);
pw.print(" initOrder="); pw.println(info.initOrder);
}
}
if (full) {
if (hasExternalProcessHandles()) {
pw.print(prefix); pw.print("externals:");
if (externalProcessTokenToHandle != null) {
pw.print(" w/token=");
pw.print(externalProcessTokenToHandle.size());
}
if (externalProcessNoHandleCount > 0) {
pw.print(" notoken=");
pw.print(externalProcessNoHandleCount);
}
pw.println();
}
} else {
if (connections.size() > 0 || externalProcessNoHandleCount > 0) {
pw.print(prefix); pw.print(connections.size());
pw.print(" connections, "); pw.print(externalProcessNoHandleCount);
pw.println(" external handles");
}
}
if (connections.size() > 0) {
if (full) {
pw.print(prefix); pw.println("Connections:");
}
for (int i=0; i<connections.size(); i++) {
ContentProviderConnection conn = connections.get(i);
pw.print(prefix); pw.print(" -> "); pw.println(conn.toClientString());
if (conn.provider != this) {
pw.print(prefix); pw.print(" *** WRONG PROVIDER: ");
pw.println(conn.provider);
}
}
}
|
public boolean | hasExternalProcessHandles()
return (externalProcessTokenToHandle != null || externalProcessNoHandleCount > 0);
|
public android.app.IActivityManager.ContentProviderHolder | newHolder(ContentProviderConnection conn)
ContentProviderHolder holder = new ContentProviderHolder(info);
holder.provider = provider;
holder.noReleaseNeeded = noReleaseNeeded;
holder.connection = conn;
return holder;
|
private void | removeExternalProcessHandleInternalLocked(android.os.IBinder token)
ExternalProcessHandle handle = externalProcessTokenToHandle.get(token);
handle.unlinkFromOwnDeathLocked();
externalProcessTokenToHandle.remove(token);
if (externalProcessTokenToHandle.size() == 0) {
externalProcessTokenToHandle = null;
}
|
public boolean | removeExternalProcessHandleLocked(android.os.IBinder token)
if (hasExternalProcessHandles()) {
boolean hasHandle = false;
if (externalProcessTokenToHandle != null) {
ExternalProcessHandle handle = externalProcessTokenToHandle.get(token);
if (handle != null) {
hasHandle = true;
handle.mAcquisitionCount--;
if (handle.mAcquisitionCount == 0) {
removeExternalProcessHandleInternalLocked(token);
return true;
}
}
}
if (!hasHandle) {
externalProcessNoHandleCount--;
return true;
}
}
return false;
|
public java.lang.String | toShortString()
if (shortStringName != null) {
return shortStringName;
}
StringBuilder sb = new StringBuilder(128);
sb.append(Integer.toHexString(System.identityHashCode(this)));
sb.append('/");
sb.append(name.flattenToShortString());
return shortStringName = sb.toString();
|
public java.lang.String | toString()
if (stringName != null) {
return stringName;
}
StringBuilder sb = new StringBuilder(128);
sb.append("ContentProviderRecord{");
sb.append(Integer.toHexString(System.identityHashCode(this)));
sb.append(" u");
sb.append(UserHandle.getUserId(uid));
sb.append(' ");
sb.append(name.flattenToShortString());
sb.append('}");
return stringName = sb.toString();
|