Methods Summary |
---|
public void | addReadPermission(UriPermission perm)
if (mReadPerms == null) {
mReadPerms = Sets.newArraySet();
}
mReadPerms.add(perm);
|
public void | addWritePermission(UriPermission perm)
if (mWritePerms == null) {
mWritePerms = Sets.newArraySet();
}
mWritePerms.add(perm);
|
public void | dump(java.io.PrintWriter pw, java.lang.String prefix)
if (mReadPerms != null) {
pw.print(prefix); pw.print("readUriPermissions="); pw.println(mReadPerms);
}
if (mWritePerms != null) {
pw.print(prefix); pw.print("writeUriPermissions="); pw.println(mWritePerms);
}
|
static com.android.server.am.UriPermissionOwner | fromExternalToken(android.os.IBinder token)
if (token instanceof ExternalToken) {
return ((ExternalToken)token).getOwner();
}
return null;
|
android.os.Binder | getExternalTokenLocked()
if (externalToken == null) {
externalToken = new ExternalToken();
}
return externalToken;
|
public void | removeReadPermission(UriPermission perm)
mReadPerms.remove(perm);
if (mReadPerms.isEmpty()) {
mReadPerms = null;
}
|
void | removeUriPermissionLocked(ActivityManagerService.GrantUri grantUri, int mode)
if ((mode & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0
&& mReadPerms != null) {
Iterator<UriPermission> it = mReadPerms.iterator();
while (it.hasNext()) {
UriPermission perm = it.next();
if (grantUri == null || grantUri.equals(perm.uri)) {
perm.removeReadOwner(this);
service.removeUriPermissionIfNeededLocked(perm);
it.remove();
}
}
if (mReadPerms.isEmpty()) {
mReadPerms = null;
}
}
if ((mode & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0
&& mWritePerms != null) {
Iterator<UriPermission> it = mWritePerms.iterator();
while (it.hasNext()) {
UriPermission perm = it.next();
if (grantUri == null || grantUri.equals(perm.uri)) {
perm.removeWriteOwner(this);
service.removeUriPermissionIfNeededLocked(perm);
it.remove();
}
}
if (mWritePerms.isEmpty()) {
mWritePerms = null;
}
}
|
void | removeUriPermissionsLocked()
removeUriPermissionsLocked(Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
void | removeUriPermissionsLocked(int mode)
removeUriPermissionLocked(null, mode);
|
public void | removeWritePermission(UriPermission perm)
mWritePerms.remove(perm);
if (mWritePerms.isEmpty()) {
mWritePerms = null;
}
|
public java.lang.String | toString()
return owner.toString();
|