FileDocCategorySizeDatePackage
AllPermission.javaAPI DocAndroid 1.5 API4333Wed May 06 22:41:04 BST 2009java.security

AllPermission

public final class AllPermission extends Permission
{@code AllPermission} represents the permission to perform any operation. Since its {@link #implies(Permission)} method always returns {@code true}, granting this permission is equivalent to disabling security.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private static final String
ALL_PERMISSIONS
private static final String
ALL_ACTIONS
Constructors Summary
public AllPermission(String name, String actions)
Constructs a new instance of {@code AllPermission}. The two argument version is provided for class {@code Policy} so that it has a consistent call pattern across all permissions. The name and action list are both ignored.

param
name ignored.
param
actions ignored.
since
Android 1.0

 //$NON-NLS-1$

                                                                             
         
        super(ALL_PERMISSIONS);
    
public AllPermission()
Constructs a new instance of {@code AllPermission}.

since
Android 1.0

        super(ALL_PERMISSIONS);
    
Methods Summary
public booleanequals(java.lang.Object obj)
Compares the specified object with this {@code AllPermission} for equality and returns {@code true} if the specified object is equal, {@code false} otherwise. To be equal, the given object needs to be an instance of {@code AllPermission}.

param
obj object to be compared for equality with this {@code AllPermission}.
return
{@code true} if the specified object is equal to this {@code AllPermission}, otherwise {@code false}.
since
Android 1.0
see
#hashCode

        return (obj instanceof AllPermission);
    
public java.lang.StringgetActions()
Returns the actions associated with this {@code AllPermission}. Since {@code AllPermission} objects allow all actions, this method returns always the string "<all actions>".

return
the actions associated with this {@code AllPermission}.
since
Android 1.0

        return ALL_ACTIONS;
    
public inthashCode()
Returns the hash code value for this {@code AllPermission}. Returns the same hash code for {@code AllPermission}s that are equal to each other as required by the general contract of {@link Object#hashCode}.

return
the hash code value for this {@code AllPermission}.
see
Object#equals(Object)
see
AllPermission#equals(Object)
since
Android 1.0

        return 1;
    
public booleanimplies(java.security.Permission permission)
Indicates whether the given permission is implied by this permission. {@code AllPermission} objects imply all other permissions.

return
always {@code true}.
param
permission the permission to check.
since
Android 1.0

        return true;
    
public java.security.PermissionCollectionnewPermissionCollection()
Returns a new {@code PermissionCollection} for holding permissions of this class.

return
a new {@code PermissionCollection}.
since
Android 1.0

        return new AllPermissionCollection();