Example usage for android.os UserHandle readFromParcel

List of usage examples for android.os UserHandle readFromParcel

Introduction

In this page you can find the example usage for android.os UserHandle readFromParcel.

Prototype

public static UserHandle readFromParcel(Parcel in) 

Source Link

Document

Read a UserHandle from a Parcel that was previously written with #writeToParcel(UserHandle,Parcel) , returning either a null or new object as appropriate.

Usage

From source file:com.oasisfeng.android.service.notification.StatusBarNotificationCompat.java

private static UserHandle toUserHandle(final int user) {
    final Parcel parcel = Parcel.obtain();
    try {/*from   ww w.j  a  va 2s.c  o  m*/
        parcel.writeInt(user);
        parcel.setDataPosition(0);
        return UserHandle.readFromParcel(parcel);
    } finally {
        parcel.recycle();
    }
}

From source file:com.oasisfeng.nevo.StatusBarNotificationEvo.java

private StatusBarNotificationEvo(final Parcel in) {
    super(in.readString(), null, in.readInt(), in.readInt() != 0 ? in.readString() : null, in.readInt(), 0, 0,
            NULL_NOTIFICATION, UserHandle.readFromParcel(in), in.readLong());
    holder = INotification.Stub.asInterface(in.readStrongBinder());
}