Lines Matching refs:UserHandle
28 public final class UserHandle implements Parcelable {
38 public static final UserHandle ALL = new UserHandle(USER_ALL);
44 public static final UserHandle CURRENT = new UserHandle(USER_CURRENT);
54 public static final UserHandle CURRENT_OR_SELF = new UserHandle(USER_CURRENT_OR_SELF);
63 public static final UserHandle OWNER = new UserHandle(USER_OWNER);
73 private static final SparseArray<UserHandle> userHandles = new SparseArray<UserHandle>();
134 public static final UserHandle getCallingUserHandle() {
136 UserHandle userHandle = userHandles.get(userId);
138 if (userHandle == null) {
139 userHandle = new UserHandle(userId);
140 userHandles.put(userId, userHandle);
142 return userHandle;
243 * Returns true if this UserHandle refers to the owner user; false otherwise.
244 * @return true if this UserHandle refers to the owner user; false otherwise.
253 public UserHandle(int h) {
258 * Returns the userId stored in this UserHandle.
268 return "UserHandle{" + mHandle + "}";
275 UserHandle other = (UserHandle)obj;
297 * Write a UserHandle to a Parcel, handling null pointers. Must be
300 * @param h The UserHandle to be written.
301 * @param out The Parcel in which the UserHandle will be placed.
305 public static void writeToParcel(UserHandle h, Parcel out) {
314 * Read a UserHandle from a Parcel that was previously written
315 * with {@link #writeToParcel(UserHandle, Parcel)}, returning either
318 * @param in The Parcel from which to read the UserHandle
319 * @return Returns a new UserHandle matching the previously written
322 * @see #writeToParcel(UserHandle, Parcel)
324 public static UserHandle readFromParcel(Parcel in) {
326 return h != USER_NULL ? new UserHandle(h) : null;
329 public static final Parcelable.Creator<UserHandle> CREATOR
330 = new Parcelable.Creator<UserHandle>() {
331 public UserHandle createFromParcel(Parcel in) {
332 return new UserHandle(in);
335 public UserHandle[] newArray(int size) {
336 return new UserHandle[size];
341 * Instantiate a new UserHandle from the data in a Parcel that was
344 * {@link #writeToParcel(UserHandle, Parcel)} since it is not possible
345 * to handle a null UserHandle here.
347 * @param in The Parcel containing the previously written UserHandle,
350 public UserHandle(Parcel in) {