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

The following examples show how to use android.os.Parcel#writeCharSequence() . 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
Source Project: android_9.0.0_r45   File: WindowInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(type);
    parcel.writeInt(layer);
    parcel.writeStrongBinder(token);
    parcel.writeStrongBinder(parentToken);
    parcel.writeStrongBinder(activityToken);
    parcel.writeInt(focused ? 1 : 0);
    boundsInScreen.writeToParcel(parcel, flags);
    parcel.writeCharSequence(title);
    parcel.writeLong(accessibilityIdOfAnchor);
    parcel.writeInt(inPictureInPicture ? 1 : 0);

    if (childTokens != null && !childTokens.isEmpty()) {
        parcel.writeInt(1);
        parcel.writeBinderList(childTokens);
    } else {
        parcel.writeInt(0);
    }
}
 
Example 2
Source Project: android_9.0.0_r45   File: AutofillValue.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(mType);

    switch (mType) {
        case AUTOFILL_TYPE_TEXT:
            parcel.writeCharSequence((CharSequence) mValue);
            break;
        case AUTOFILL_TYPE_TOGGLE:
            parcel.writeInt((Boolean) mValue ? 1 : 0);
            break;
        case AUTOFILL_TYPE_LIST:
            parcel.writeInt((Integer) mValue);
            break;
        case AUTOFILL_TYPE_DATE:
            parcel.writeLong((Long) mValue);
            break;
    }
}
 
Example 3
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(mType);
    parcel.writeInt(mLayer);
    parcel.writeInt(mBooleanProperties);
    parcel.writeInt(mId);
    parcel.writeInt(mParentId);
    mBoundsInScreen.writeToParcel(parcel, flags);
    parcel.writeCharSequence(mTitle);
    parcel.writeLong(mAnchorId);

    final LongArray childIds = mChildIds;
    if (childIds == null) {
        parcel.writeInt(0);
    } else {
        final int childCount = childIds.size();
        parcel.writeInt(childCount);
        for (int i = 0; i < childCount; i++) {
            parcel.writeInt((int) childIds.get(i));
        }
    }

    parcel.writeInt(mConnectionId);
}
 
Example 4
Source Project: android_9.0.0_r45   File: PrintJobInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeParcelable(mId, flags);
    parcel.writeString(mLabel);
    parcel.writeParcelable(mPrinterId, flags);
    parcel.writeString(mPrinterName);
    parcel.writeInt(mState);
    parcel.writeInt(mAppId);
    parcel.writeString(mTag);
    parcel.writeLong(mCreationTime);
    parcel.writeInt(mCopies);
    parcel.writeParcelableArray(mPageRanges, flags);
    parcel.writeParcelable(mAttributes, flags);
    parcel.writeParcelable(mDocumentInfo, 0);
    parcel.writeFloat(mProgress);
    parcel.writeCharSequence(mStatus);
    parcel.writeInt(mStatusRes);
    parcel.writeCharSequence(mStatusResAppPackageName);
    parcel.writeInt(mCanceling ? 1 : 0);
    parcel.writeBundle(mAdvancedOptions);
}
 
Example 5
Source Project: android_9.0.0_r45   File: SaveInfo.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(mType);
    parcel.writeParcelableArray(mRequiredIds, flags);
    parcel.writeParcelableArray(mOptionalIds, flags);
    parcel.writeInt(mNegativeButtonStyle);
    parcel.writeParcelable(mNegativeActionListener, flags);
    parcel.writeCharSequence(mDescription);
    parcel.writeParcelable(mCustomDescription, flags);
    parcel.writeParcelable(mValidator, flags);
    parcel.writeParcelableArray(mSanitizerKeys, flags);
    if (mSanitizerKeys != null) {
        for (int i = 0; i < mSanitizerValues.length; i++) {
            parcel.writeParcelableArray(mSanitizerValues[i], flags);
        }
    }
    parcel.writeParcelable(mTriggerId, flags);
    parcel.writeInt(mFlags);
}
 
Example 6
Source Project: android_9.0.0_r45   File: Adjustment.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    if (mPackage != null) {
        dest.writeInt(1);
        dest.writeString(mPackage);
    } else {
        dest.writeInt(0);
    }
    if (mKey != null) {
        dest.writeInt(1);
        dest.writeString(mKey);
    } else {
        dest.writeInt(0);
    }
    if (mExplanation != null) {
        dest.writeInt(1);
        dest.writeCharSequence(mExplanation);
    } else {
        dest.writeInt(0);
    }
    dest.writeBundle(mSignals);
    dest.writeInt(mUser);
}
 
Example 7
@Override
public void writeToParcel(Parcel dest, int flags) {
    if (mId != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mId);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mExplanation != null) {
        dest.writeByte((byte) 1);
        dest.writeCharSequence(mExplanation);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mConfirmation != null) {
        dest.writeByte((byte) 1);
        dest.writeCharSequence(mConfirmation);
    } else {
        dest.writeByte((byte) 0);
    }
}
 
Example 8
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeCharSequence(mLabel);
    dest.writeParcelable(mIcon, 0);
    dest.writeInt(mBaseCharacter);
    dest.writeInt(mKeycode);
    dest.writeInt(mModifiers);
}
 
Example 9
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeCharSequence(mPackageName);
    dest.writeCharSequence(mName);

    int numDiscoveredPrinters = mDiscoveredPrinters.size();
    dest.writeInt(numDiscoveredPrinters);

    for (InetAddress printer : mDiscoveredPrinters) {
        dest.writeBlob(printer.getAddress());
    }

    dest.writeByte((byte) (mRecommendsMultiVendorService ? 1 : 0));
}
 
Example 10
Source Project: android_9.0.0_r45   File: Person.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, @WriteFlags int flags) {
    dest.writeCharSequence(mName);
    if (mIcon != null) {
        dest.writeInt(1);
        mIcon.writeToParcel(dest, 0);
    } else {
        dest.writeInt(0);
    }
    dest.writeString(mUri);
    dest.writeString(mKey);
    dest.writeBoolean(mIsImportant);
    dest.writeBoolean(mIsBot);
}
 
Example 11
Source Project: android_9.0.0_r45   File: RemoteInput.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeString(mResultKey);
    out.writeCharSequence(mLabel);
    out.writeCharSequenceArray(mChoices);
    out.writeInt(mFlags);
    out.writeBundle(mExtras);
    out.writeArraySet(mAllowedDataTypes);
}
 
Example 12
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeCharSequence(mLabel);
    dest.writeInt(mIndex);
    dest.writeCharSequenceList(mSynonyms);
    dest.writeBundle(mExtras);
}
 
Example 13
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeString(mPackageName);
    parcel.writeCharSequence(mLabelText);
    parcel.writeStringArray(mRequestedPermissions);
    parcel.writeStringArray(mGrantedPermissions);
    parcel.writeParcelable(mApplicationInfo, flags);
}
 
Example 14
Source Project: android_9.0.0_r45   File: ChooserTarget.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeCharSequence(mTitle);
    if (mIcon != null) {
        dest.writeInt(1);
        mIcon.writeToParcel(dest, 0);
    } else {
        dest.writeInt(0);
    }
    dest.writeFloat(mScore);
    ComponentName.writeToParcel(mComponentName, dest);
    dest.writeBundle(mIntentExtras);
}
 
Example 15
Source Project: android_9.0.0_r45   File: Suggestion.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(mId);
    dest.writeCharSequence(mTitle);
    dest.writeCharSequence(mSummary);
    dest.writeParcelable(mIcon, flags);
    dest.writeInt(mFlags);
    dest.writeParcelable(mPendingIntent, flags);
}
 
Example 16
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeCharSequence(mLabel);
    dest.writeTypedList(mItems);
    dest.writeInt(mSystemGroup ? 1 : 0);
}
 
Example 17
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(getMessage());
    dest.writeCharSequence(mUserMessage);
    mUserAction.writeToParcel(dest, flags);
}
 
Example 18
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeCharSequenceArray(mVoicePrompts);
    dest.writeCharSequence(mVisualPrompt);
}
 
Example 19
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeCharSequence(mLabel);
    parcel.writeInt(mFlags);
}
 
Example 20
Source Project: android_9.0.0_r45   File: ShortcutInfo.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mUserId);
    dest.writeString(mId);
    dest.writeString(mPackageName);
    dest.writeParcelable(mActivity, flags);
    dest.writeInt(mFlags);
    dest.writeInt(mIconResId);
    dest.writeLong(mLastChangedTimestamp);
    dest.writeInt(mDisabledReason);

    if (hasKeyFieldsOnly()) {
        dest.writeInt(0);
        return;
    }
    dest.writeInt(1);

    dest.writeParcelable(mIcon, flags);
    dest.writeCharSequence(mTitle);
    dest.writeInt(mTitleResId);
    dest.writeCharSequence(mText);
    dest.writeInt(mTextResId);
    dest.writeCharSequence(mDisabledMessage);
    dest.writeInt(mDisabledMessageResId);

    dest.writeParcelableArray(mIntents, flags);
    dest.writeParcelableArray(mIntentPersistableExtrases, flags);
    dest.writeInt(mRank);
    dest.writeParcelable(mExtras, flags);
    dest.writeString(mBitmapPath);

    dest.writeString(mIconResName);
    dest.writeString(mTitleResName);
    dest.writeString(mTextResName);
    dest.writeString(mDisabledMessageResName);

    if (mCategories != null) {
        final int N = mCategories.size();
        dest.writeInt(N);
        for (int i = 0; i < N; i++) {
            dest.writeString(mCategories.valueAt(i));
        }
    } else {
        dest.writeInt(0);
    }
}