Java Code Examples for android.os.Parcel#createBooleanArray()

The following examples show how to use android.os.Parcel#createBooleanArray() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
private void readFromParcel(Parcel p) {
    Log.v(TAG, "readFromParcel");

    try {
        boolean[] confirmedArray = p.createBooleanArray();
        isConfirmed = confirmedArray[0];
        patientIdentifier = p.readString();
        patientFirstName = p.readString();
        patientLastName = p.readString();
        patientGender = p.readString();
        patientBirthdate = new Date(p.readString());
    } catch (Exception e) {
        Log.e(TAG, "While reading PatientInfo from Parcel, got exception: "
                + e.toString());
        e.printStackTrace();
    }
}
 
Example 2
Source Project: Alarmio   File: AlarmData.java    License: Apache License 2.0 5 votes vote down vote up
protected AlarmData(Parcel in) {
    id = in.readInt();
    name = in.readString();
    time = Calendar.getInstance();
    time.setTimeInMillis(in.readLong());
    isEnabled = in.readByte() != 0;
    days = in.createBooleanArray();
    isVibrate = in.readByte() != 0;
    if (in.readByte() == 1)
        sound = SoundData.fromString(in.readString());
}
 
Example 3
ParcelableMqttMessage(Parcel parcel) {
  super(parcel.createByteArray());
  setQos(parcel.readInt());
  boolean[] flags = parcel.createBooleanArray();
  setRetained(flags[0]);
  setDuplicate(flags[1]);
  messageId = parcel.readString();
}
 
Example 4
private SliderState(@NonNull Parcel source) {
  super(source);
  valueFrom = source.readFloat();
  valueTo = source.readFloat();
  values = new ArrayList<>();
  source.readList(values, Float.class.getClassLoader());
  stepSize = source.readFloat();
  hasFocus = source.createBooleanArray()[0];
}
 
Example 5
protected PrimitiveArrayParcelable(Parcel in) {
    this.a = in.createIntArray();
    this.b = in.createDoubleArray();
    this.c = in.createStringArray();
    this.e = in.createFloatArray();
    this.f = in.createBooleanArray();
    this.g = in.createByteArray();
}
 
Example 6
/**
 * Creates a new ErrorInfo wrapper by reading data from a parcel.
 */
public ParcelableErrorInfo(Parcel in) {
  int reason = in.readInt();
  boolean isTransient = in.createBooleanArray()[0];
  String message = in.readString();
  this.errorInfo = ErrorInfo.newInstance(reason, isTransient, message, null);
}
 
Example 7
/**
 * Creates a new invalidation wrapper by reading data from a parcel.
 */
public ParcelableInvalidation(Parcel in) {
  // Read parcelable object id from parcel using the application class loader
  ParcelableObjectId objectId = in.readParcelable(getClass().getClassLoader());
  long version = in.readLong();
  boolean isTrickleRestart = in.createBooleanArray()[0];
  boolean[] values = in.createBooleanArray();
  byte[] payload = null;
  if (values[0]) { // hasPayload
    payload = in.createByteArray();
  }
  this.invalidation = Invalidation.newInstance(objectId.objectId, version, payload,
      isTrickleRestart);
  this.includePayload = payload != null;
}
 
Example 8
/**
 * Creates a new ErrorInfo wrapper by reading data from a parcel.
 */
public ParcelableErrorInfo(Parcel in) {
  int reason = in.readInt();
  boolean isTransient = in.createBooleanArray()[0];
  String message = in.readString();
  this.errorInfo = ErrorInfo.newInstance(reason, isTransient, message, null);
}
 
Example 9
/**
 * Creates a new invalidation wrapper by reading data from a parcel.
 */
public ParcelableInvalidation(Parcel in) {
  // Read parcelable object id from parcel using the application class loader
  ParcelableObjectId objectId = in.readParcelable(getClass().getClassLoader());
  long version = in.readLong();
  boolean isTrickleRestart = in.createBooleanArray()[0];
  boolean[] values = in.createBooleanArray();
  byte[] payload = null;
  if (values[0]) { // hasPayload
    payload = in.createByteArray();
  }
  this.invalidation = Invalidation.newInstance(objectId.objectId, version, payload,
      isTrickleRestart);
  this.includePayload = payload != null;
}
 
Example 10
public SavedState(Parcel source) {
    super(source);
    values = source.createBooleanArray();
}
 
Example 11
private SavedState(Parcel in) {
    mExpandableState = in.createBooleanArray();
    mExpansionState = in.createBooleanArray();
}
 
Example 12
protected CheckedExpandableGroup(Parcel in) {
  super(in);
  selectedChildren = in.createBooleanArray();
}
 
Example 13
Source Project: paperparcel   File: StaticAdapters.java    License: Apache License 2.0 4 votes vote down vote up
@Nullable @Override public boolean[] readFromParcel(@NonNull Parcel source) {
  return source.createBooleanArray();
}
 
Example 14
Source Project: AlarmOn   File: Week.java    License: Apache License 2.0 4 votes vote down vote up
public Week(Parcel source) {
  bitmask = source.createBooleanArray();
}
 
Example 15
public SavedState(Parcel source) {
    super(source);
    values = source.createBooleanArray();
}
 
Example 16
OpsTemplate(Parcel src) {
    ops = src.createIntArray();
    showPerms = src.createBooleanArray();
}
 
Example 17
Source Project: parceler   File: NonParcelRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Boolean nullSafeFromParcel(Parcel parcel) {
    return parcel.createBooleanArray()[0];
}