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

The following examples show how to use android.os.Parcel#readCharSequence() . 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
Source Project: android_9.0.0_r45   File: WindowInfo.java    License: Apache License 2.0 6 votes vote down vote up
private void initFromParcel(Parcel parcel) {
    type = parcel.readInt();
    layer = parcel.readInt();
    token = parcel.readStrongBinder();
    parentToken = parcel.readStrongBinder();
    activityToken = parcel.readStrongBinder();
    focused = (parcel.readInt() == 1);
    boundsInScreen.readFromParcel(parcel);
    title = parcel.readCharSequence();
    accessibilityIdOfAnchor = parcel.readLong();
    inPictureInPicture = (parcel.readInt() == 1);

    final boolean hasChildren = (parcel.readInt() == 1);
    if (hasChildren) {
        if (childTokens == null) {
            childTokens = new ArrayList<IBinder>();
        }
        parcel.readBinderList(childTokens);
    }
}
 
Example 2
Source Project: android_9.0.0_r45   File: AutofillValue.java    License: Apache License 2.0 6 votes vote down vote up
private AutofillValue(@NonNull Parcel parcel) {
    mType = parcel.readInt();

    switch (mType) {
        case AUTOFILL_TYPE_TEXT:
            mValue = parcel.readCharSequence();
            break;
        case AUTOFILL_TYPE_TOGGLE:
            int rawValue = parcel.readInt();
            mValue = rawValue != 0;
            break;
        case AUTOFILL_TYPE_LIST:
            mValue = parcel.readInt();
            break;
        case AUTOFILL_TYPE_DATE:
            mValue = parcel.readLong();
            break;
        default:
            throw new IllegalArgumentException("type=" + mType + " not valid");
    }
}
 
Example 3
private void initFromParcel(Parcel parcel) {
    mType = parcel.readInt();
    mLayer = parcel.readInt();
    mBooleanProperties = parcel.readInt();
    mId = parcel.readInt();
    mParentId = parcel.readInt();
    mBoundsInScreen.readFromParcel(parcel);
    mTitle = parcel.readCharSequence();
    mAnchorId = parcel.readLong();

    final int childCount = parcel.readInt();
    if (childCount > 0) {
        if (mChildIds == null) {
            mChildIds = new LongArray(childCount);
        }
        for (int i = 0; i < childCount; i++) {
            final int childId = parcel.readInt();
            mChildIds.add(childId);
        }
    }

    mConnectionId = parcel.readInt();
}
 
Example 4
Source Project: android_9.0.0_r45   File: Adjustment.java    License: Apache License 2.0 6 votes vote down vote up
protected Adjustment(Parcel in) {
    if (in.readInt() == 1) {
        mPackage = in.readString();
    } else {
        mPackage = null;
    }
    if (in.readInt() == 1) {
        mKey = in.readString();
    } else {
        mKey = null;
    }
    if (in.readInt() == 1) {
        mExplanation = in.readCharSequence();
    } else {
        mExplanation = null;
    }
    mSignals = in.readBundle();
    mUser = in.readInt();
}
 
Example 5
protected SnoozeCriterion(Parcel in) {
    if (in.readByte() != 0) {
        mId = in.readString();
    } else {
        mId = null;
    }
    if (in.readByte() != 0) {
        mExplanation = in.readCharSequence();
    } else {
        mExplanation = null;
    }
    if (in.readByte() != 0) {
        mConfirmation = in.readCharSequence();
    } else {
        mConfirmation = null;
    }
}
 
Example 6
private KeyboardShortcutInfo(Parcel source) {
    mLabel = source.readCharSequence();
    mIcon = source.readParcelable(null);
    mBaseCharacter = (char) source.readInt();
    mKeycode = source.readInt();
    mModifiers = source.readInt();
}
 
Example 7
Source Project: android_9.0.0_r45   File: PrintJobInfo.java    License: Apache License 2.0 5 votes vote down vote up
private PrintJobInfo(@NonNull Parcel parcel) {
    mId = parcel.readParcelable(null);
    mLabel = parcel.readString();
    mPrinterId = parcel.readParcelable(null);
    mPrinterName = parcel.readString();
    mState = parcel.readInt();
    mAppId = parcel.readInt();
    mTag = parcel.readString();
    mCreationTime = parcel.readLong();
    mCopies = parcel.readInt();
    Parcelable[] parcelables = parcel.readParcelableArray(null);
    if (parcelables != null) {
        mPageRanges = new PageRange[parcelables.length];
        for (int i = 0; i < parcelables.length; i++) {
            mPageRanges[i] = (PageRange) parcelables[i];
        }
    }
    mAttributes = (PrintAttributes) parcel.readParcelable(null);
    mDocumentInfo = (PrintDocumentInfo) parcel.readParcelable(null);
    mProgress = parcel.readFloat();
    mStatus = parcel.readCharSequence();
    mStatusRes = parcel.readInt();
    mStatusResAppPackageName = parcel.readCharSequence();
    mCanceling = (parcel.readInt() == 1);
    mAdvancedOptions = parcel.readBundle();

    if (mAdvancedOptions != null) {
        Preconditions.checkArgument(!mAdvancedOptions.containsKey(null));
    }
}
 
Example 8
Source Project: android_9.0.0_r45   File: Person.java    License: Apache License 2.0 5 votes vote down vote up
private Person(Parcel in) {
    mName = in.readCharSequence();
    if (in.readInt() != 0) {
        mIcon = Icon.CREATOR.createFromParcel(in);
    }
    mUri = in.readString();
    mKey = in.readString();
    mIsImportant = in.readBoolean();
    mIsBot = in.readBoolean();
}
 
Example 9
Source Project: android_9.0.0_r45   File: RemoteInput.java    License: Apache License 2.0 5 votes vote down vote up
private RemoteInput(Parcel in) {
    mResultKey = in.readString();
    mLabel = in.readCharSequence();
    mChoices = in.readCharSequenceArray();
    mFlags = in.readInt();
    mExtras = in.readBundle();
    mAllowedDataTypes = (ArraySet<String>) in.readArraySet(null);
}
 
Example 10
private InstantAppInfo(Parcel parcel) {
    mPackageName = parcel.readString();
    mLabelText = parcel.readCharSequence();
    mRequestedPermissions = parcel.readStringArray();
    mGrantedPermissions = parcel.createStringArray();
    mApplicationInfo = parcel.readParcelable(null);
}
 
Example 11
Source Project: android_9.0.0_r45   File: ChooserTarget.java    License: Apache License 2.0 5 votes vote down vote up
ChooserTarget(Parcel in) {
    mTitle = in.readCharSequence();
    if (in.readInt() != 0) {
        mIcon = Icon.CREATOR.createFromParcel(in);
    } else {
        mIcon = null;
    }
    mScore = in.readFloat();
    mComponentName = ComponentName.readFromParcel(in);
    mIntentExtras = in.readBundle();
}
 
Example 12
Source Project: android_9.0.0_r45   File: Suggestion.java    License: Apache License 2.0 5 votes vote down vote up
private Suggestion(Parcel in) {
    mId = in.readString();
    mTitle = in.readCharSequence();
    mSummary = in.readCharSequence();
    mIcon = in.readParcelable(Icon.class.getClassLoader());
    mFlags = in.readInt();
    mPendingIntent = in.readParcelable(PendingIntent.class.getClassLoader());
}
 
Example 13
private KeyboardShortcutGroup(Parcel source) {
    mItems = new ArrayList<>();
    mLabel = source.readCharSequence();
    source.readTypedList(mItems, KeyboardShortcutInfo.CREATOR);
    mSystemGroup = source.readInt() == 1;
}
 
Example 14
/** {@hide} */
public RecoverableSecurityException(Parcel in) {
    this(new SecurityException(in.readString()), in.readCharSequence(),
            RemoteAction.CREATOR.createFromParcel(in));
}
 
Example 15
Option(Parcel in) {
    mLabel = in.readCharSequence();
    mIndex = in.readInt();
    mSynonyms = in.readCharSequenceList();
    mExtras = in.readBundle();
}
 
Example 16
/** Constructor to support Parcelable behavior. */
Prompt(Parcel in) {
    mVoicePrompts = in.readCharSequenceArray();
    mVisualPrompt = in.readCharSequence();
}
 
Example 17
private RuntimePermissionPresentationInfo(Parcel parcel) {
    mLabel = parcel.readCharSequence();
    mFlags = parcel.readInt();
}
 
Example 18
Source Project: android_9.0.0_r45   File: ShortcutInfo.java    License: Apache License 2.0 4 votes vote down vote up
private ShortcutInfo(Parcel source) {
    final ClassLoader cl = getClass().getClassLoader();

    mUserId = source.readInt();
    mId = source.readString();
    mPackageName = source.readString();
    mActivity = source.readParcelable(cl);
    mFlags = source.readInt();
    mIconResId = source.readInt();
    mLastChangedTimestamp = source.readLong();
    mDisabledReason = source.readInt();

    if (source.readInt() == 0) {
        return; // key information only.
    }

    mIcon = source.readParcelable(cl);
    mTitle = source.readCharSequence();
    mTitleResId = source.readInt();
    mText = source.readCharSequence();
    mTextResId = source.readInt();
    mDisabledMessage = source.readCharSequence();
    mDisabledMessageResId = source.readInt();
    mIntents = source.readParcelableArray(cl, Intent.class);
    mIntentPersistableExtrases = source.readParcelableArray(cl, PersistableBundle.class);
    mRank = source.readInt();
    mExtras = source.readParcelable(cl);
    mBitmapPath = source.readString();

    mIconResName = source.readString();
    mTitleResName = source.readString();
    mTextResName = source.readString();
    mDisabledMessageResName = source.readString();

    int N = source.readInt();
    if (N == 0) {
        mCategories = null;
    } else {
        mCategories = new ArraySet<>(N);
        for (int i = 0; i < N; i++) {
            mCategories.add(source.readString().intern());
        }
    }
}
 
Example 19
/**
 * Create a new recommendation from a parcel.
 *
 * @param parcel The parcel containing the data
 *
 * @see #CREATOR
 */
private RecommendationInfo(@NonNull Parcel parcel) {
    this(parcel.readCharSequence(), parcel.readCharSequence(), readDiscoveredPrinters(parcel),
            parcel.readByte() != 0);
}