public class UserInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
long |
creationTime |
static Parcelable.Creator<UserInfo> |
CREATOR |
static int |
FLAG_ADMIN
User with administrative privileges.
|
static int |
FLAG_GUEST
Indicates a guest user that may be transient.
|
static int |
FLAG_INITIALIZED
Indicates that this user has gone through its first-time initialization.
|
static int |
FLAG_MASK_USER_TYPE
6 bits for user type
|
static int |
FLAG_PRIMARY
Primary user.
|
static int |
FLAG_RESTRICTED
Indicates the user has restrictions in privileges, in addition to those for normal users.
|
int |
flags |
String |
iconPath |
int |
id |
long |
lastLoggedInTime |
String |
name |
boolean |
partial
User is only partially created.
|
int |
serialNumber |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
UserInfo() |
UserInfo(int id,
String name,
int flags) |
UserInfo(int id,
String name,
String iconPath,
int flags) |
UserInfo(UserInfo orig) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
UserHandle |
getUserHandle() |
boolean |
isAdmin() |
boolean |
isGuest() |
boolean |
isPrimary() |
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
void |
writeToParcel(Parcel dest,
int parcelableFlags)
Flatten this object in to a Parcel.
|
public static final int FLAG_MASK_USER_TYPE
public static final int FLAG_PRIMARY
public static final int FLAG_ADMIN
public static final int FLAG_GUEST
public static final int FLAG_RESTRICTED
public static final int FLAG_INITIALIZED
public int id
public int serialNumber
public String name
public String iconPath
public int flags
public long creationTime
public long lastLoggedInTime
public boolean partial
public static final Parcelable.Creator<UserInfo> CREATOR
public UserInfo(int id, String name, int flags)
public UserInfo()
public UserInfo(UserInfo orig)
public boolean isPrimary()
public boolean isAdmin()
public boolean isGuest()
public UserHandle getUserHandle()
public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
public int describeContents()
Parcelable
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int parcelableFlags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.parcelableFlags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.