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

The following examples show how to use android.os.Parcel#createIntArray() . 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
private PackageInfoLite(Parcel source) {
    packageName = source.readString();
    splitNames = source.createStringArray();
    versionCode = source.readInt();
    versionCodeMajor = source.readInt();
    baseRevisionCode = source.readInt();
    splitRevisionCodes = source.createIntArray();
    recommendedInstallLocation = source.readInt();
    installLocation = source.readInt();
    multiArch = (source.readInt() != 0);

    final int verifiersLength = source.readInt();
    if (verifiersLength == 0) {
        verifiers = new VerifierInfo[0];
    } else {
        verifiers = new VerifierInfo[verifiersLength];
        source.readTypedArray(verifiers, VerifierInfo.CREATOR);
    }
}
 
Example 2
Source Project: android_9.0.0_r45   File: BatchUpdates.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public BatchUpdates createFromParcel(Parcel parcel) {
    // Always go through the builder to ensure the data ingested by
    // the system obeys the contract of the builder to avoid attacks
    // using specially crafted parcels.
    final Builder builder = new Builder();
    final int[] ids = parcel.createIntArray();
    if (ids != null) {
        final InternalTransformation[] values =
            parcel.readParcelableArray(null, InternalTransformation.class);
        final int size = ids.length;
        for (int i = 0; i < size; i++) {
            builder.transformChild(ids[i], values[i]);
        }
    }
    final RemoteViews updates = parcel.readParcelable(null);
    if (updates != null) {
        builder.updateTemplate(updates);
    }
    return builder.build();
}
 
Example 3
Source Project: SimpleDialogFragments   File: Input.java    License: Apache License 2.0 6 votes vote down vote up
private Input(Parcel in) {
    super(in);
    hint = in.readString();
    hintResourceId = in.readInt();
    text = in.readString();
    textResourceId = in.readInt();
    inputType = in.readInt();
    maxLength = in.readInt();
    minLength = in.readInt();
    suggestionArrayRes = in.readInt();
    suggestionStringResArray = in.createIntArray();
    suggestions = in.createStringArray();
    passwordToggleVisible = in.readByte() != 0;
    forceSuggestion = in.readByte() != 0;
    pattern = in.readString();
    patternError = in.readString();
    patternErrorId = in.readInt();
}
 
Example 4
public StreamInfo(Parcel in) {
	String[] stringsData = in.createStringArray();
	int[] intData = in.createIntArray();

	if (stringsData.length == 2) {
		this.game = stringsData[0];
		this.title = stringsData[1];
	}

	if (intData.length == 2) {
		this.currentViewers = intData[0];
		this.priority = intData[1];
	}

	this.startedAt = in.readLong();
	this.previews =in.createStringArray();
	this.channelInfo = in.readParcelable(StreamInfo.class.getClassLoader());
}
 
Example 5
Source Project: V.FlyoutTest   File: BackStackRecord.java    License: MIT License 5 votes vote down vote up
public BackStackState(Parcel in) {
    mOps = in.createIntArray();
    mTransition = in.readInt();
    mTransitionStyle = in.readInt();
    mName = in.readString();
    mIndex = in.readInt();
    mBreadCrumbTitleRes = in.readInt();
    mBreadCrumbTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    mBreadCrumbShortTitleRes = in.readInt();
    mBreadCrumbShortTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
}
 
Example 6
Source Project: PhilHackerNews   File: Item.java    License: MIT License 5 votes vote down vote up
protected Item(Parcel in) {
    id = in.readInt();
    type = in.readString();
    score = in.readInt();
    title = in.readString();
    author = in.readString();
    url = in.readString();
    text = in.readString();
    comments = in.createIntArray();
    parent = in.readInt();
    deleted = in.readInt() == 1;
}
 
Example 7
public BackStackState(Parcel in) {
    mOps = in.createIntArray();
    mTransition = in.readInt();
    mTransitionStyle = in.readInt();
    mName = in.readString();
    mIndex = in.readInt();
    mBreadCrumbTitleRes = in.readInt();
    mBreadCrumbTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    mBreadCrumbShortTitleRes = in.readInt();
    mBreadCrumbShortTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    mSharedElementSourceNames = in.createStringArrayList();
    mSharedElementTargetNames = in.createStringArrayList();
    mReorderingAllowed = in.readInt() != 0;
}
 
Example 8
public void readFromParcel(Parcel source) {
    stackId = source.readInt();
    bounds = new Rect(
            source.readInt(), source.readInt(), source.readInt(), source.readInt());
    taskIds = source.createIntArray();
    taskNames = source.createStringArray();
    final int boundsCount = source.readInt();
    if (boundsCount > 0) {
        taskBounds = new Rect[boundsCount];
        for (int i = 0; i < boundsCount; i++) {
            taskBounds[i] = new Rect();
            taskBounds[i].set(
                    source.readInt(), source.readInt(), source.readInt(), source.readInt());
        }
    } else {
        taskBounds = null;
    }
    taskUserIds = source.createIntArray();
    displayId = source.readInt();
    userId = source.readInt();
    visible = source.readInt() > 0;
    position = source.readInt();
    if (source.readInt() > 0) {
        topActivity = ComponentName.readFromParcel(source);
    }
    configuration.readFromParcel(source);
}
 
Example 9
protected PrimitiveArrayParcelable(Parcel in) {
    this.a = in.createIntArray();
    this.b = in.createDoubleArray();
    this.c = in.createStringArray();
    this.e = in.createFloatArray();
    this.f = in.createBooleanArray();
    this.g = in.createByteArray();
}
 
Example 10
public BackStackState(Parcel in) {
    mOps = in.createIntArray();
    mTransition = in.readInt();
    mTransitionStyle = in.readInt();
    mName = in.readString();
    mIndex = in.readInt();
    mBreadCrumbTitleRes = in.readInt();
    mBreadCrumbTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    mBreadCrumbShortTitleRes = in.readInt();
    mBreadCrumbShortTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    mSharedElementSourceNames = in.createStringArrayList();
    mSharedElementTargetNames = in.createStringArrayList();
}
 
Example 11
protected ColorField(Parcel in) {
    super(in);
    preset = in.readInt();
    presetId = in.readInt();
    colors = in.createIntArray();
    allowCustom = in.readByte() != 0;
    outline = in.readInt();
}
 
Example 12
Source Project: cordova-social-vk   File: VKApiChat.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Creates a Chat instance from Parcel.
 */
public VKApiChat(Parcel in) {
    this.id = in.readInt();
    this.type = in.readString();
    this.title = in.readString();
    this.admin_id = in.readInt();
    this.users = in.createIntArray();
}
 
Example 13
public BackStackState(Parcel in) {
    mOps = in.createIntArray();
    mTransition = in.readInt();
    mTransitionStyle = in.readInt();
    mName = in.readString();
    mIndex = in.readInt();
    mBreadCrumbTitleRes = in.readInt();
    mBreadCrumbTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    mBreadCrumbShortTitleRes = in.readInt();
    mBreadCrumbShortTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
}
 
Example 14
Source Project: pandroid   File: ViewInfosContainer.java    License: Apache License 2.0 5 votes vote down vote up
protected ViewInfosContainer(Parcel in) {
    viewClass = (Class<? extends View>) in.readSerializable();
    viewId = in.readInt();
    viewTagS = in.readSerializable();
    viewTagP = in.readParcelable(getClass().getClassLoader());
    backgroundColor = (Integer) in.readSerializable();
    padding = in.createIntArray();
    position = in.createFloatArray();
    size = in.createIntArray();
    textColor = in.readInt();
    textSize = in.readFloat();
    textGravity = in.readInt();
    elevation = in.readFloat();
}
 
Example 15
Source Project: MiBandDecompiled   File: BackStackState.java    License: Apache License 2.0 5 votes vote down vote up
public BackStackState(Parcel parcel)
{
    a = parcel.createIntArray();
    b = parcel.readInt();
    c = parcel.readInt();
    d = parcel.readString();
    e = parcel.readInt();
    f = parcel.readInt();
    g = (CharSequence)TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
    h = parcel.readInt();
    i = (CharSequence)TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
}
 
Example 16
public SparseRectFArray(final Parcel source) {
    mKeys = source.createIntArray();
    mCoordinates = source.createFloatArray();
    mFlagsArray = source.createIntArray();
}
 
Example 17
Source Project: android_9.0.0_r45   File: PackageInfo.java    License: Apache License 2.0 4 votes vote down vote up
private PackageInfo(Parcel source) {
    packageName = source.readString();
    splitNames = source.createStringArray();
    versionCode = source.readInt();
    versionCodeMajor = source.readInt();
    versionName = source.readString();
    baseRevisionCode = source.readInt();
    splitRevisionCodes = source.createIntArray();
    sharedUserId = source.readString();
    sharedUserLabel = source.readInt();
    int hasApp = source.readInt();
    if (hasApp != 0) {
        applicationInfo = ApplicationInfo.CREATOR.createFromParcel(source);
    }
    firstInstallTime = source.readLong();
    lastUpdateTime = source.readLong();
    gids = source.createIntArray();
    activities = source.createTypedArray(ActivityInfo.CREATOR);
    receivers = source.createTypedArray(ActivityInfo.CREATOR);
    services = source.createTypedArray(ServiceInfo.CREATOR);
    providers = source.createTypedArray(ProviderInfo.CREATOR);
    instrumentation = source.createTypedArray(InstrumentationInfo.CREATOR);
    permissions = source.createTypedArray(PermissionInfo.CREATOR);
    requestedPermissions = source.createStringArray();
    requestedPermissionsFlags = source.createIntArray();
    signatures = source.createTypedArray(Signature.CREATOR);
    configPreferences = source.createTypedArray(ConfigurationInfo.CREATOR);
    reqFeatures = source.createTypedArray(FeatureInfo.CREATOR);
    featureGroups = source.createTypedArray(FeatureGroupInfo.CREATOR);
    installLocation = source.readInt();
    isStub = source.readInt() != 0;
    coreApp = source.readInt() != 0;
    requiredForAllUsers = source.readInt() != 0;
    restrictedAccountType = source.readString();
    requiredAccountType = source.readString();
    overlayTarget = source.readString();
    overlayCategory = source.readString();
    overlayPriority = source.readInt();
    mOverlayIsStatic = source.readBoolean();
    compileSdkVersion = source.readInt();
    compileSdkVersionCodename = source.readString();
    int hasSigningInfo = source.readInt();
    if (hasSigningInfo != 0) {
        signingInfo = SigningInfo.CREATOR.createFromParcel(source);
    }

    // The component lists were flattened with the redundant ApplicationInfo
    // instances omitted.  Distribute the canonical one here as appropriate.
    if (applicationInfo != null) {
        propagateApplicationInfo(applicationInfo, activities);
        propagateApplicationInfo(applicationInfo, receivers);
        propagateApplicationInfo(applicationInfo, services);
        propagateApplicationInfo(applicationInfo, providers);
    }
}
 
Example 18
OpsTemplate(Parcel src) {
    ops = src.createIntArray();
    showPerms = src.createBooleanArray();
}
 
Example 19
Source Project: color-picker   File: FactoryPalette.java    License: Apache License 2.0 4 votes vote down vote up
public void readFromParcel(Parcel in)
{
    mName = in.readString();
    mValues = in.createIntArray();
    mColumns = in.readInt();
}
 
Example 20
Source Project: guideshow   File: FragmentManager.java    License: MIT License 4 votes vote down vote up
public FragmentManagerState(Parcel in) {
    mActive = in.createTypedArray(FragmentState.CREATOR);
    mAdded = in.createIntArray();
    mBackStack = in.createTypedArray(BackStackState.CREATOR);
}