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

The following examples show how to use android.os.Parcel#writeBooleanArray() . 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 check out the related API usage on the sidebar.
Example 1
Source File: WatchFaceStyle.java    From android-wear-watchface with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel p, int flags) {
    p.writeParcelable(component, flags);
    p.writeInt(cardPeekMode);
    p.writeInt(cardProgressMode);
    p.writeInt(backgroundVisibility);

    boolean[] val = new boolean[1];
    val[0] = showSystemUiTime;
    p.writeBooleanArray(val);

    p.writeInt(ambientPeekMode);
    p.writeInt(peekOpacityMode);
    p.writeInt(viewProtectionMode);
    p.writeInt(statusBarGravity);
    p.writeInt(hotwordIndicatorGravity);
}
 
Example 2
Source File: AccountBean.java    From iBeebo with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(access_token);
    dest.writeLong(expires_time);
    dest.writeInt(navigationPosition);
    // uname cookie
    dest.writeString(uname);
    dest.writeString(pwd);
    dest.writeString(cookie);
    dest.writeString(access_token_hack);
    dest.writeLong(expires_time_hack);
    dest.writeString(gsid);
    // end
    dest.writeBooleanArray(new boolean[]{
            this.black_magic
    });
    dest.writeParcelable(info, flags);
}
 
Example 3
Source File: UserModel.java    From BlackLight with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
	dest.writeString(id);
	dest.writeString(screen_name);
	dest.writeString(name);
	dest.writeString(province);
	dest.writeString(city);
	dest.writeString(location);
	dest.writeString(description);
	dest.writeString(url);
	dest.writeString(profile_image_url);
	dest.writeString(domain);
	dest.writeString(gender);
	dest.writeString(created_at);
	dest.writeString(avatar_large);
	dest.writeString(verified_reason);
	dest.writeInt(followers_count);
	dest.writeInt(friends_count);
	dest.writeInt(statuses_count);
	dest.writeInt(favourites_count);
	dest.writeInt(verified_type);
	dest.writeInt(online_status);
	dest.writeInt(bi_followers_count);
	dest.writeString(cover_image);
	dest.writeBooleanArray(new boolean[]{following, allow_all_act_msg, geo_enabled, verified, allow_all_comment});
}
 
Example 4
Source File: AnimationRect.java    From iBeebo with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(scaledBitmapRect, flags);
    dest.writeParcelable(imageViewEntireRect, flags);
    dest.writeParcelable(imageViewVisibleRect, flags);
    dest.writeInt(type);
    dest.writeBooleanArray(new boolean[]{
            isTotalVisible
    });
    dest.writeBooleanArray(new boolean[]{
            isTotalInvisible
    });
    dest.writeBooleanArray(new boolean[]{
            isScreenPortrait
    });
    dest.writeFloat(thumbnailWidthHeightRatio);
    dest.writeInt(thumbnailWidth);
    dest.writeInt(thumbnailHeight);
    dest.writeInt(widgetWidth);
    dest.writeInt(widgetHeight);
    dest.writeFloat(clipByParentRectTop);
    dest.writeFloat(clipByParentRectBottom);
    dest.writeFloat(clipByParentRectLeft);
    dest.writeFloat(clipByParentRectRight);
}
 
Example 5
Source File: TopTipsView.java    From iBeebo with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    Bundle bundle = new Bundle();
    bundle.putSerializable("ids", ids);
    bundle.putSerializable("type", type);
    out.writeBundle(bundle);
    out.writeBooleanArray(new boolean[]{this.disappear, this.visible});
}
 
Example 6
Source File: MessageBean.java    From iBeebo with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(created_at);
    dest.writeLong(id);

    dest.writeString(idstr);
    dest.writeString(text);
    dest.writeString(source);
    dest.writeBooleanArray(new boolean[]{
            this.favorited
    });
    dest.writeString(truncated);
    dest.writeString(in_reply_to_status_id);
    dest.writeString(in_reply_to_user_id);
    dest.writeString(in_reply_to_screen_name);
    dest.writeString(mid);
    dest.writeInt(reposts_count);
    dest.writeInt(comments_count);

    dest.writeString(thumbnail_pic);
    dest.writeString(bmiddle_pic);
    dest.writeString(original_pic);

    dest.writeString(sourceString);

    dest.writeLong(mills);

    dest.writeParcelable(retweeted_status, flags);
    dest.writeParcelable(user, flags);
    dest.writeParcelable(geo, flags);

    dest.writeTypedList(pic_urls);
    dest.writeStringList(pic_ids);

    dest.writeTypedList(pic_infos);

}
 
Example 7
Source File: PatientInfo.java    From sana.mobile with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void writeToParcel(Parcel dest, int flags) {
    Log.v(TAG, "writeToParcel");
    dest.writeBooleanArray(new boolean[]{isConfirmed});
    dest.writeString(patientIdentifier);
    dest.writeString(patientFirstName);
    dest.writeString(patientLastName);
    dest.writeString(patientGender);
    dest.writeString(patientBirthdate.toString());
}
 
Example 8
Source File: SearchRecord.java    From android-recipes-app with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
	dest.writeLong(getId());
	dest.writeString(mString);
	dest.writeBooleanArray(new boolean[] {
		mStringDirty
	});
}
 
Example 9
Source File: LoopBarView.java    From LoopBar with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    super.writeToParcel(parcel, flags);
    parcel.writeInt(mCurrentItemPosition);
    parcel.writeInt(mSelectionGravity);
    parcel.writeInt(mScrollMode);
    parcel.writeBooleanArray(new boolean[]{mIsInfinite});
    parcel.writeInt(mAdapterSize);
}
 
Example 10
Source File: MessageBean.java    From iBeebo with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(created_at);
    dest.writeLong(id);

    dest.writeString(idstr);
    dest.writeString(text);
    dest.writeString(source);
    dest.writeBooleanArray(new boolean[]{
            this.favorited
    });
    dest.writeString(truncated);
    dest.writeString(in_reply_to_status_id);
    dest.writeString(in_reply_to_user_id);
    dest.writeString(in_reply_to_screen_name);
    dest.writeString(mid);
    dest.writeInt(reposts_count);
    dest.writeInt(comments_count);

    dest.writeString(thumbnail_pic);
    dest.writeString(bmiddle_pic);
    dest.writeString(original_pic);

    dest.writeString(sourceString);

    dest.writeLong(mills);

    dest.writeParcelable(retweeted_status, flags);
    dest.writeParcelable(user, flags);
    dest.writeParcelable(geo, flags);

    dest.writeTypedList(pic_urls);
    dest.writeStringList(pic_ids);

    dest.writeTypedList(pic_infos);

}
 
Example 11
Source File: BaseSlider.java    From material-components-android with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
  super.writeToParcel(dest, flags);
  dest.writeFloat(valueFrom);
  dest.writeFloat(valueTo);
  dest.writeList(values);
  dest.writeFloat(stepSize);
  boolean[] booleans = new boolean[1];
  booleans[0] = hasFocus;
  dest.writeBooleanArray(booleans);
}
 
Example 12
Source File: ParcelableErrorInfo.java    From android-chromium with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {

  // Data written to parcel is:
  // 1. int errorReason
  // 2. boolean [] { isTransient }
  // 3. String error message
  // TODO: Add support for object marshaling when needed
  parcel.writeInt(errorInfo.getErrorReason());
  parcel.writeBooleanArray(new boolean[]{errorInfo.isTransient()});
  parcel.writeString(errorInfo.getErrorMessage());
}
 
Example 13
Source File: MediaIntent.java    From belvedere with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(@NonNull final Parcel dest, final int flags) {
    dest.writeInt(requestCode);
    dest.writeParcelable(intent, flags);
    dest.writeString(permission);
    dest.writeBooleanArray(new boolean[]{isAvailable});
    dest.writeInt(target);
}
 
Example 14
Source File: AppItem.java    From openapk with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeParcelable(icon, flags);
    parcel.writeString(packageLabel);
    parcel.writeString(packageName);
    parcel.writeString(versionName);
    parcel.writeString(versionCode);
    parcel.writeString(data);
    parcel.writeString(source);
    parcel.writeString(install);
    parcel.writeString(update);
    parcel.writeBooleanArray(new boolean[]{ system, disable, hide, favorite });
}
 
Example 15
Source File: AlarmData.java    From Alarmio with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(id);
    parcel.writeString(name);
    parcel.writeLong(time.getTimeInMillis());
    parcel.writeByte((byte) (isEnabled ? 1 : 0));
    parcel.writeBooleanArray(days);
    parcel.writeByte((byte) (isVibrate ? 1 : 0));
    parcel.writeByte((byte) (sound != null ? 1 : 0));
    if (sound != null)
        parcel.writeString(sound.toString());
}
 
Example 16
Source File: ParcelUtil.java    From ParcelableGenerator with MIT License 4 votes vote down vote up
private static void writeValueInternal(Parcel dest, Object v) {
    if (v == null) {
        dest.writeInt(VAL_NULL);
    } else if (v instanceof String) {
        dest.writeInt(VAL_STRING);
        dest.writeString((String) v);
    } else if (v instanceof Integer) {
        dest.writeInt(VAL_INTEGER);
        dest.writeInt((Integer) v);
    } else if (v instanceof Map) {
        dest.writeInt(VAL_MAP);
        writeMap(dest, (Map) v);
    } else if (v instanceof Bundle) {
        // Must be before Parcelable
        dest.writeInt(VAL_BUNDLE);
        dest.writeBundle((Bundle) v);
    } else if (v instanceof Parcelable) {
        dest.writeInt(VAL_PARCELABLE);
        dest.writeParcelable((Parcelable) v, 0);
    } else if (v instanceof Short) {
        dest.writeInt(VAL_SHORT);
        dest.writeInt(((Short) v).intValue());
    } else if (v instanceof Long) {
        dest.writeInt(VAL_LONG);
        dest.writeLong((Long) v);
    } else if (v instanceof Float) {
        dest.writeInt(VAL_FLOAT);
        dest.writeFloat((Float) v);
    } else if (v instanceof Double) {
        dest.writeInt(VAL_DOUBLE);
        dest.writeDouble((Double) v);
    } else if (v instanceof Boolean) {
        dest.writeInt(VAL_BOOLEAN);
        dest.writeInt((Boolean) v ? 1 : 0);
    } else if (v instanceof CharSequence) {
        // Must be after String
        dest.writeInt(VAL_CHARSEQUENCE);
        TextUtils.writeToParcel((CharSequence) v, dest, 0);
    } else if (v instanceof List) {
        dest.writeInt(VAL_LIST);
        writeList(dest, (List) v);
    } else if (v instanceof SparseArray) {
        dest.writeInt(VAL_SPARSEARRAY);
        writeSparseArray(dest, (SparseArray<Object>) v);
    } else if (v instanceof boolean[]) {
        dest.writeInt(VAL_BOOLEANARRAY);
        dest.writeBooleanArray((boolean[]) v);
    } else if (v instanceof byte[]) {
        dest.writeInt(VAL_BYTEARRAY);
        dest.writeByteArray((byte[]) v);
    } else if (v instanceof String[]) {
        dest.writeInt(VAL_STRINGARRAY);
        dest.writeStringArray((String[]) v);
    } else if (v instanceof CharSequence[]) {
        // Must be after String[] and before Object[]
        dest.writeInt(VAL_CHARSEQUENCEARRAY);
        CharSequence[] val = (CharSequence[]) v;
        int N = val.length;
        dest.writeInt(N);
        for (int i = 0; i < N; i++) {
            TextUtils.writeToParcel((CharSequence) val[i], dest, 0);
        }
    } else if (v instanceof IBinder) {
        dest.writeInt(VAL_IBINDER);
        dest.writeStrongBinder((IBinder) v);
    } else if (v instanceof Parcelable[]) {
        dest.writeInt(VAL_PARCELABLEARRAY);
        dest.writeParcelableArray((Parcelable[]) v, 0);
    } else if (v instanceof Object[]) {
        dest.writeInt(VAL_OBJECTARRAY);
        writeArray(dest, (Object[]) v);
    } else if (v instanceof int[]) {
        dest.writeInt(VAL_INTARRAY);
        dest.writeIntArray((int[]) v);
    } else if (v instanceof long[]) {
        dest.writeInt(VAL_LONGARRAY);
        dest.writeLongArray((long[]) v);
    } else if (v instanceof Byte) {
        dest.writeInt(VAL_BYTE);
        dest.writeInt((Byte) v);
    } else if (v instanceof Serializable) {
        // Must be last
        dest.writeInt(VAL_SERIALIZABLE);
        dest.writeSerializable((Serializable) v);
    } else {
        throw new RuntimeException("Parcel: unable to marshal value " + v);
    }
}
 
Example 17
Source File: MultiCheckPreference.java    From PreferenceFragment with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeBooleanArray(values);
}
 
Example 18
Source File: DownloadDescriptor.java    From edx-app-android with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.url);
    dest.writeBooleanArray(new boolean[]{forceDownload});
}
 
Example 19
Source File: MultiCheckPreference.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeBooleanArray(values);
}
 
Example 20
Source File: ParcelableMqttMessage.java    From Sparkplug with Eclipse Public License 1.0 3 votes vote down vote up
/**
 * Writes the contents of this object to a parcel
 * 
 * @param parcel
 *            The parcel to write the data to.
 * @param flags
 *            this parameter is ignored
 */
@Override
public void writeToParcel(Parcel parcel, int flags) {
  parcel.writeByteArray(getPayload());
  parcel.writeInt(getQos());
  parcel.writeBooleanArray(new boolean[]{isRetained(), isDuplicate()});
  parcel.writeString(messageId);
}