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

The following examples show how to use android.os.Parcel#readCharSequence() . 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 File: SnoozeCriterion.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
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 2
Source File: Adjustment.java    From android_9.0.0_r45 with 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 3
Source File: AutofillValue.java    From android_9.0.0_r45 with 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 4
Source File: AccessibilityWindowInfo.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
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 5
Source File: WindowInfo.java    From android_9.0.0_r45 with 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 6
Source File: RemoteInput.java    From android_9.0.0_r45 with 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 7
Source File: Suggestion.java    From android_9.0.0_r45 with 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 8
Source File: ChooserTarget.java    From android_9.0.0_r45 with 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 9
Source File: InstantAppInfo.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private InstantAppInfo(Parcel parcel) {
    mPackageName = parcel.readString();
    mLabelText = parcel.readCharSequence();
    mRequestedPermissions = parcel.readStringArray();
    mGrantedPermissions = parcel.createStringArray();
    mApplicationInfo = parcel.readParcelable(null);
}
 
Example 10
Source File: Person.java    From android_9.0.0_r45 with 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 11
Source File: PrintJobInfo.java    From android_9.0.0_r45 with 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 12
Source File: KeyboardShortcutInfo.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private KeyboardShortcutInfo(Parcel source) {
    mLabel = source.readCharSequence();
    mIcon = source.readParcelable(null);
    mBaseCharacter = (char) source.readInt();
    mKeycode = source.readInt();
    mModifiers = source.readInt();
}
 
Example 13
Source File: VoiceInteractor.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
Option(Parcel in) {
    mLabel = in.readCharSequence();
    mIndex = in.readInt();
    mSynonyms = in.readCharSequenceList();
    mExtras = in.readBundle();
}
 
Example 14
Source File: VoiceInteractor.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
/** Constructor to support Parcelable behavior. */
Prompt(Parcel in) {
    mVoicePrompts = in.readCharSequenceArray();
    mVisualPrompt = in.readCharSequence();
}
 
Example 15
Source File: RuntimePermissionPresentationInfo.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
private RuntimePermissionPresentationInfo(Parcel parcel) {
    mLabel = parcel.readCharSequence();
    mFlags = parcel.readInt();
}
 
Example 16
Source File: RecoverableSecurityException.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
/** {@hide} */
public RecoverableSecurityException(Parcel in) {
    this(new SecurityException(in.readString()), in.readCharSequence(),
            RemoteAction.CREATOR.createFromParcel(in));
}
 
Example 17
Source File: ShortcutInfo.java    From android_9.0.0_r45 with 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 18
Source File: KeyboardShortcutGroup.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
private KeyboardShortcutGroup(Parcel source) {
    mItems = new ArrayList<>();
    mLabel = source.readCharSequence();
    source.readTypedList(mItems, KeyboardShortcutInfo.CREATOR);
    mSystemGroup = source.readInt() == 1;
}
 
Example 19
Source File: RecommendationInfo.java    From android_9.0.0_r45 with Apache License 2.0 2 votes vote down vote up
/**
 * 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);
}