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

UriPermission

public class UriPermission extends Object

Fields Summary
final int
uid
final android.net.Uri
uri
int
modeFlags
int
globalModeFlags
final HashSet
readActivities
final HashSet
writeActivities
Constructors Summary
UriPermission(int _uid, android.net.Uri _uri)

    
        
        uid = _uid;
        uri = _uri;
    
Methods Summary
voidclearModes(int modeFlags)

        if ((modeFlags&Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
            globalModeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
            modeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
            if (readActivities.size() > 0) {
                for (HistoryRecord r : readActivities) {
                    r.readUriPermissions.remove(this);
                    if (r.readUriPermissions.size() == 0) {
                        r.readUriPermissions = null;
                    }
                }
                readActivities.clear();
            }
        }
        if ((modeFlags&Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
            globalModeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
            modeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
            if (readActivities.size() > 0) {
                for (HistoryRecord r : readActivities) {
                    r.writeUriPermissions.remove(this);
                    if (r.writeUriPermissions.size() == 0) {
                        r.writeUriPermissions = null;
                    }
                }
                readActivities.clear();
            }
        }
    
voiddump(java.io.PrintWriter pw, java.lang.String prefix)

        pw.println(prefix + this);
        pw.println(prefix + "  modeFlags=0x" + Integer.toHexString(modeFlags)
                + " uid=" + uid 
                + " globalModeFlags=0x"
                + Integer.toHexString(globalModeFlags));
        pw.println(prefix + "  readActivities=" + readActivities);
        pw.println(prefix + "  writeActivities=" + writeActivities);
    
public java.lang.StringtoString()

        return "UriPermission{"
                + Integer.toHexString(System.identityHashCode(this))
                + " " + uri + "}";