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

The following examples show how to use android.os.Parcel#writeTypedArray() . 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 check out the related API usage on the sidebar.
Example 1
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(mId);
    out.writeString(mName);
    out.writeString(mVendor);
    out.writeString(mToolchain);
    out.writeInt(mPlatformVersion);
    out.writeInt(mToolchainVersion);
    out.writeFloat(mPeakMips);
    out.writeFloat(mStoppedPowerDrawMw);
    out.writeFloat(mSleepPowerDrawMw);
    out.writeFloat(mPeakPowerDrawMw);
    out.writeInt(mMaxPacketLengthBytes);
    out.writeLong(mChrePlatformId);
    out.writeByte(mChreApiMajorVersion);
    out.writeByte(mChreApiMinorVersion);
    out.writeInt(mChrePatchVersion);

    out.writeInt(mSupportedSensors.length);
    out.writeIntArray(mSupportedSensors);
    out.writeTypedArray(mMemoryRegions, flags);
}
 
Example 2
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
  super.writeToParcel(out, flags);

  int size = extendableStates.size();
  out.writeInt(size);

  String[] keys = new String[size];
  Bundle[] states = new Bundle[size];

  for (int i = 0; i < size; i++) {
    keys[i] = extendableStates.keyAt(i);
    states[i] = extendableStates.valueAt(i);
  }

  out.writeStringArray(keys);
  out.writeTypedArray(states, 0);
}
 
Example 3
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(mIccid);
    dest.writeString(mNickname);
    dest.writeString(mServiceProviderName);
    dest.writeString(mProfileName);
    dest.writeInt(mProfileClass);
    dest.writeInt(mState);
    if (mCarrierIdentifier != null) {
        dest.writeByte((byte) 1);
        mCarrierIdentifier.writeToParcel(dest, flags);
    } else {
        dest.writeByte((byte) 0);
    }
    dest.writeInt(mPolicyRules);
    dest.writeTypedArray(mAccessRules, flags);
}
 
Example 4
@Override
public int bulkInsert(String callingPkg, Uri url, ContentValues[] values) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    try {
        data.writeInterfaceToken(IContentProvider.descriptor);

        data.writeString(callingPkg);
        url.writeToParcel(data, 0);
        data.writeTypedArray(values, 0);

        mRemote.transact(IContentProvider.BULK_INSERT_TRANSACTION, data, reply, 0);

        DatabaseUtils.readExceptionFromParcel(reply);
        int count = reply.readInt();
        return count;
    } finally {
        data.recycle();
        reply.recycle();
    }
}
 
Example 5
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeString(packageName);
    out.writeString(description);
    out.writeInt(availableByDefault ? 1 : 0);
    out.writeInt(isFallback ? 1 : 0);
    out.writeTypedArray(signatures, 0);
}
 
Example 6
Source Project: ShaderEditor   File: CubeMapView.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
	super.writeToParcel(out, flags);

	out.writeInt(savedSelectedFace);
	out.writeTypedArray(savedFaces, flags);
}
 
Example 7
Source Project: android_9.0.0_r45   File: SoundTrigger.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(uuid.toString());
    if (vendorUuid == null) {
        dest.writeInt(-1);
    } else {
        dest.writeInt(vendorUuid.toString().length());
        dest.writeString(vendorUuid.toString());
    }
    dest.writeBlob(data);
    dest.writeTypedArray(keyphrases, flags);
}
 
Example 8
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mProgramType);
    dest.writeTypedObject(mPrimaryId, 0);
    dest.writeTypedArray(mSecondaryIds, 0);
    dest.writeLongArray(mVendorIds);
}
 
Example 9
Source Project: FontProvider   File: FontInfo.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.name);
    dest.writeString(this.variant);
    dest.writeStringArray(this.language);
    dest.writeIntArray(this.ttc_index);
    dest.writeString(this.size);
    dest.writeStringArray(this.preview_text);
    dest.writeString(this.url_prefix);
    dest.writeTypedArray(this.style, flags);
}
 
Example 10
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(mNumTextCells);
    out.writeInt(mNumStatusCells);
    out.writeTypedArray(mKeyBindings, flags);
    out.writeInt(mFriendlyKeyNames.size());
    for (Map.Entry<String, String> entry : mFriendlyKeyNames.entrySet()) {
        out.writeString(entry.getKey());
        out.writeString(entry.getValue());
    }
}
 
Example 11
Source Project: material   File: ContactEditText.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
    super.writeToParcel(out, flags);
    int length = recipients == null ? 0 : recipients.length;
    out.writeInt(length);
    if(length > 0)
        out.writeTypedArray(recipients, flags);
}
 
Example 12
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(mNumTextCells);
    out.writeInt(mNumStatusCells);
    out.writeTypedArray(mKeyBindings, flags);
    out.writeInt(mFriendlyKeyNames.size());
    for (Map.Entry<String, String> entry : mFriendlyKeyNames.entrySet()) {
        out.writeString(entry.getKey());
        out.writeString(entry.getValue());
    }
}
 
Example 13
Source Project: android   File: Contact.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(id);
    dest.writeString(name);
    dest.writeString(phone);
    dest.writeString(photoURL);
    dest.writeString(party);
    dest.writeString(state);
    dest.writeString(reason);
    dest.writeString(area);
    dest.writeTypedArray(field_offices, PARCELABLE_WRITE_RETURN_VALUE);
}
 
Example 14
Source Project: MediaSDK   File: DrmInitData.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(schemeType);
  dest.writeTypedArray(schemeDatas, 0);
}
 
Example 15
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mAttestationPackageInfos, flags);
}
 
Example 16
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mActive, flags);
    dest.writeIntArray(mAdded);
    dest.writeTypedArray(mBackStack, flags);
}
 
Example 17
Source Project: android_9.0.0_r45   File: RemoteViews.java    License: Apache License 2.0 4 votes vote down vote up
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(viewId);
    dest.writeTypedArray(remoteInputs, flags);
}
 
Example 18
@Override
public void writeToParcel(final Parcel dest, final int flags) {
	super.writeToParcel(dest, flags);
	dest.writeTypedArray(mValues, flags);
}
 
Example 19
Source Project: FontProvider   File: FontFamily.java    License: MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.variant);
    dest.writeString(this.language);
    dest.writeTypedArray(this.fonts, flags);
}
 
Example 20
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mActive, flags);
    dest.writeIntArray(mAdded);
    dest.writeTypedArray(mBackStack, flags);
}