writeTypedArray ( )源码实例Demo

android.os.Parcel#writeTypedArray ( )源码实例Demo

下面列出了android.os.Parcel#writeTypedArray ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: android_9.0.0_r45   文件: ContextHubInfo.java
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);
}
 
@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);
}
 
源代码3 项目: android_9.0.0_r45   文件: EuiccProfileInfo.java
@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);
}
 
源代码4 项目: android_9.0.0_r45   文件: ContentProviderNative.java
@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();
    }
}
 
源代码5 项目: android_9.0.0_r45   文件: WebViewProviderInfo.java
@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);
}
 
源代码6 项目: ShaderEditor   文件: CubeMapView.java
@Override
public void writeToParcel(Parcel out, int flags) {
	super.writeToParcel(out, flags);

	out.writeInt(savedSelectedFace);
	out.writeTypedArray(savedFaces, flags);
}
 
源代码7 项目: android_9.0.0_r45   文件: SoundTrigger.java
@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);
}
 
源代码8 项目: android_9.0.0_r45   文件: ProgramSelector.java
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mProgramType);
    dest.writeTypedObject(mPrimaryId, 0);
    dest.writeTypedArray(mSecondaryIds, 0);
    dest.writeLongArray(mVendorIds);
}
 
源代码9 项目: FontProvider   文件: FontInfo.java
@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);
}
 
@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());
    }
}
 
源代码11 项目: material   文件: ContactEditText.java
@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);
}
 
@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());
    }
}
 
源代码13 项目: android   文件: Contact.java
@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);
}
 
源代码14 项目: MediaSDK   文件: DrmInitData.java
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(schemeType);
  dest.writeTypedArray(schemeDatas, 0);
}
 
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mAttestationPackageInfos, flags);
}
 
源代码16 项目: adt-leanback-support   文件: FragmentManager.java
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mActive, flags);
    dest.writeIntArray(mAdded);
    dest.writeTypedArray(mBackStack, flags);
}
 
源代码17 项目: android_9.0.0_r45   文件: RemoteViews.java
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(viewId);
    dest.writeTypedArray(remoteInputs, flags);
}
 
源代码18 项目: arca-android   文件: Insert.java
@Override
public void writeToParcel(final Parcel dest, final int flags) {
	super.writeToParcel(dest, flags);
	dest.writeTypedArray(mValues, flags);
}
 
源代码19 项目: FontProvider   文件: FontFamily.java
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.variant);
    dest.writeString(this.language);
    dest.writeTypedArray(this.fonts, flags);
}
 
源代码20 项目: CodenameOne   文件: FragmentManager.java
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mActive, flags);
    dest.writeIntArray(mAdded);
    dest.writeTypedArray(mBackStack, flags);
}
 
如果文章对您有帮助,请点击页面广告。以鼓励作者做出的努力。
 方法所在类
 同类方法