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

The following examples show how to use android.os.Parcel#writeTypedObject() . 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
/** Write from Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedObject(mIntent, flags);
    dest.writeInt(mIdent);
    dest.writeTypedObject(mInfo, flags);
    dest.writeTypedObject(mCurConfig, flags);
    dest.writeTypedObject(mOverrideConfig, flags);
    dest.writeTypedObject(mCompatInfo, flags);
    dest.writeString(mReferrer);
    dest.writeStrongInterface(mVoiceInteractor);
    dest.writeInt(mProcState);
    dest.writeBundle(mState);
    dest.writePersistableBundle(mPersistentState);
    dest.writeTypedList(mPendingResults, flags);
    dest.writeTypedList(mPendingNewIntents, flags);
    dest.writeBoolean(mIsForward);
    dest.writeTypedObject(mProfilerInfo, flags);
}
 
Example 2
@Override
@SuppressWarnings("deprecation")
public void writeToParcel(Parcel out, int flags) {
    out.writeTypedObject(this.provider, flags);
    out.writeInt(this.minWidth);
    out.writeInt(this.minHeight);
    out.writeInt(this.minResizeWidth);
    out.writeInt(this.minResizeHeight);
    out.writeInt(this.updatePeriodMillis);
    out.writeInt(this.initialLayout);
    out.writeInt(this.initialKeyguardLayout);
    out.writeTypedObject(this.configure, flags);
    out.writeString(this.label);
    out.writeInt(this.icon);
    out.writeInt(this.previewImage);
    out.writeInt(this.autoAdvanceViewId);
    out.writeInt(this.resizeMode);
    out.writeInt(this.widgetCategory);
    out.writeTypedObject(this.providerInfo, flags);
    out.writeInt(this.widgetFeatures);
}
 
Example 3
Source Project: android_9.0.0_r45   File: AdvertiseData.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mServiceUuids.toArray(new ParcelUuid[mServiceUuids.size()]), flags);

    // mManufacturerSpecificData could not be null.
    dest.writeInt(mManufacturerSpecificData.size());
    for (int i = 0; i < mManufacturerSpecificData.size(); ++i) {
        dest.writeInt(mManufacturerSpecificData.keyAt(i));
        dest.writeByteArray(mManufacturerSpecificData.valueAt(i));
    }
    dest.writeInt(mServiceData.size());
    for (ParcelUuid uuid : mServiceData.keySet()) {
        dest.writeTypedObject(uuid, flags);
        dest.writeByteArray(mServiceData.get(uuid));
    }
    dest.writeByte((byte) (getIncludeTxPowerLevel() ? 1 : 0));
    dest.writeByte((byte) (getIncludeDeviceName() ? 1 : 0));
}
 
Example 4
/** Write from Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedObject(mIntent, flags);
    dest.writeInt(mIdent);
    dest.writeTypedObject(mInfo, flags);
    dest.writeTypedObject(mCurConfig, flags);
    dest.writeTypedObject(mOverrideConfig, flags);
    dest.writeTypedObject(mCompatInfo, flags);
    dest.writeString(mReferrer);
    dest.writeStrongInterface(mVoiceInteractor);
    dest.writeInt(mProcState);
    dest.writeBundle(mState);
    dest.writePersistableBundle(mPersistentState);
    dest.writeTypedList(mPendingResults, flags);
    dest.writeTypedList(mPendingNewIntents, flags);
    dest.writeBoolean(mIsForward);
    dest.writeTypedObject(mProfilerInfo, flags);
}
 
Example 5
Source Project: android_9.0.0_r45   File: RemoteViews.java    License: Apache License 2.0 6 votes vote down vote up
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(viewId);
    dest.writeInt(isRelative ? 1 : 0);
    dest.writeInt(useIcons ? 1 : 0);
    if (useIcons) {
        dest.writeTypedObject(i1, 0);
        dest.writeTypedObject(i2, 0);
        dest.writeTypedObject(i3, 0);
        dest.writeTypedObject(i4, 0);
    } else {
        dest.writeInt(d1);
        dest.writeInt(d2);
        dest.writeInt(d3);
        dest.writeInt(d4);
    }
}
 
Example 6
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(mSnapshotVersion);
    out.writeTypedList(mKeyChainProtectionParams);
    out.writeByteArray(mEncryptedRecoveryKeyBlob);
    out.writeTypedList(mEntryRecoveryData);
    out.writeInt(mMaxAttempts);
    out.writeLong(mCounterId);
    out.writeByteArray(mServerParams);
    out.writeTypedObject(mCertPath, /* no flags */ 0);
}
 
Example 7
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(mUserSecretType);
    out.writeInt(mLockScreenUiFormat);
    out.writeTypedObject(mKeyDerivationParams, flags);
    out.writeByteArray(mSecret);
}
 
Example 8
@Override
public void writeToParcel(Parcel dest, int flags) {
    final int size = mTransitionAnimationMap.size();
    dest.writeInt(size);
    for (int i = 0; i < size; i++) {
        dest.writeInt(mTransitionAnimationMap.keyAt(i));
        dest.writeTypedObject(mTransitionAnimationMap.valueAt(i), flags);
    }
}
 
Example 9
/** Write to Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedList(mPendingResults, flags);
    dest.writeTypedList(mPendingNewIntents, flags);
    dest.writeInt(mConfigChanges);
    dest.writeTypedObject(mConfig, flags);
    dest.writeBoolean(mPreserveWindow);
}
 
Example 10
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mProgramType);
    dest.writeTypedObject(mPrimaryId, 0);
    dest.writeTypedArray(mSecondaryIds, 0);
    dest.writeLongArray(mVendorIds);
}
 
Example 11
Source Project: android_9.0.0_r45   File: RadioManager.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedObject(mSelector, flags);
    dest.writeTypedObject(mLogicallyTunedTo, flags);
    dest.writeTypedObject(mPhysicallyTunedTo, flags);
    Utils.writeTypedCollection(dest, mRelatedContent);
    dest.writeInt(mInfoFlags);
    dest.writeInt(mSignalQuality);
    dest.writeTypedObject(mMetadata, flags);
    Utils.writeStringMap(dest, mVendorInfo);
}
 
Example 12
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeTypedObject(packageInfo, flags);
    out.writeInt(status);
}
 
Example 13
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeTypedObject(mCodecConfig, 0);
    out.writeTypedArray(mCodecsLocalCapabilities, 0);
    out.writeTypedArray(mCodecsSelectableCapabilities, 0);
}
 
Example 14
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.writeTypedObject(intent, flags);
}
 
Example 15
/** Write to Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedObject(mConfiguration, flags);
}
 
Example 16
/** Write to Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedObject(mConfiguration, flags);
}
 
Example 17
/** Write to Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mTargetDisplayId);
    dest.writeTypedObject(mConfiguration, flags);
}
 
Example 18
/** Write to Parcel. */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeBoolean(mIsInMultiWindowMode);
    dest.writeTypedObject(mOverrideConfig, flags);
}
 
Example 19
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 out, int flags) {
    out.writeInt(this.viewId);
    out.writeString(this.methodName);
    out.writeInt(this.type);
    //noinspection ConstantIfStatement
    if (false) {
        Log.d(LOG_TAG, "write viewId=0x" + Integer.toHexString(this.viewId)
                + " methodName=" + this.methodName + " type=" + this.type);
    }

    // For some values which are null, we record an integer flag to indicate whether
    // we have written a valid value to the parcel.
    switch (this.type) {
        case BOOLEAN:
            out.writeBoolean((Boolean) this.value);
            break;
        case BYTE:
            out.writeByte((Byte) this.value);
            break;
        case SHORT:
            out.writeInt((Short) this.value);
            break;
        case INT:
            out.writeInt((Integer) this.value);
            break;
        case LONG:
            out.writeLong((Long) this.value);
            break;
        case FLOAT:
            out.writeFloat((Float) this.value);
            break;
        case DOUBLE:
            out.writeDouble((Double) this.value);
            break;
        case CHAR:
            out.writeInt((int)((Character)this.value).charValue());
            break;
        case STRING:
            out.writeString((String)this.value);
            break;
        case CHAR_SEQUENCE:
            TextUtils.writeToParcel((CharSequence)this.value, out, flags);
            break;
        case BUNDLE:
            out.writeBundle((Bundle) this.value);
            break;
        case URI:
        case BITMAP:
        case INTENT:
        case COLOR_STATE_LIST:
        case ICON:
            out.writeTypedObject((Parcelable) this.value, flags);
            break;
        default:
            break;
    }
}
 
Example 20
Source Project: android_9.0.0_r45   File: Announcement.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedObject(mSelector, 0);
    dest.writeInt(mType);
    Utils.writeStringMap(dest, mVendorInfo);
}