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

The following examples show how to use android.os.Parcel#writeStringArray() . 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: LogHistory.java    From testing-samples with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    // Prepare an array of strings and an array of timestamps.
    String[] texts = new String[mData.size()];
    long[] timestamps = new long[mData.size()];

    // Store the data in the arrays.
    for (int i = 0; i < mData.size(); i++) {
        texts[i] = mData.get(i).first;
        timestamps[i] = mData.get(i).second;
    }
    // Write the size of the arrays first.
    out.writeInt(texts.length);

    // Write the two arrays in a specific order.
    out.writeStringArray(texts);
    out.writeLongArray(timestamps);
}
 
Example 2
Source File: VideoOnDemand.java    From Twire with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    String[] toSend = new String[]{
            this.videoTitle,
            this.gameTitle,
            this.previewUrl,
            this.videoId,
            this.channelName,
            this.displayName,
            this.recordedAtString,
            String.valueOf(this.views),
            String.valueOf(this.length),
            String.valueOf(this.isBroadcast)
    };

    dest.writeStringArray(toSend);
    dest.writeParcelable(channelInfo, flags);
}
 
Example 3
Source File: JobParameters.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(jobId);
    dest.writePersistableBundle(extras);
    dest.writeBundle(transientExtras);
    if (clipData != null) {
        dest.writeInt(1);
        clipData.writeToParcel(dest, flags);
        dest.writeInt(clipGrantFlags);
    } else {
        dest.writeInt(0);
    }
    dest.writeStrongBinder(callback);
    dest.writeInt(overrideDeadlineExpired ? 1 : 0);
    dest.writeTypedArray(mTriggeredContentUris, flags);
    dest.writeStringArray(mTriggeredContentAuthorities);
    if (network != null) {
        dest.writeInt(1);
        network.writeToParcel(dest, flags);
    } else {
        dest.writeInt(0);
    }
    dest.writeInt(stopReason);
    dest.writeString(debugStopReason);
}
 
Example 4
Source File: VideoOnDemand.java    From Pocket-Plays-for-Twitch with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
	String[] toSend = new String[] {
			this.videoTitle,
			this.gameTitle,
			this.previewUrl,
			this.videoId,
			this.channelName,
			this.displayName,
			this.recordedAtString,
			String.valueOf(this.views),
			String.valueOf(this.length),
			String.valueOf(this.isBroadcast)
	};

	dest.writeStringArray(toSend);
	dest.writeParcelable(channelInfo, flags);
}
 
Example 5
Source File: Configurations.java    From FilePicker with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeByte((byte) (imageCaptureEnabled ? 1 : 0));
    dest.writeByte((byte) (videoCaptureEnabled ? 1 : 0));
    dest.writeByte((byte) (showVideos ? 1 : 0));
    dest.writeByte((byte) (showImages ? 1 : 0));
    dest.writeByte((byte) (showAudios ? 1 : 0));
    dest.writeByte((byte) (showFiles ? 1 : 0));
    dest.writeByte((byte) (singleClickSelection ? 1 : 0));
    dest.writeByte((byte) (singleChoiceMode ? 1 : 0));
    dest.writeByte((byte) (checkPermission ? 1 : 0));
    dest.writeByte((byte) (skipZeroSizeFiles ? 1 : 0));
    dest.writeInt(imageSize);
    dest.writeInt(maxSelection);
    dest.writeInt(landscapeSpanCount);
    dest.writeInt(portraitSpanCount);
    dest.writeString(rootPath);
    dest.writeStringArray(suffixes);
    dest.writeTypedList(selectedMediaFiles);
    dest.writeStringArray(getIgnorePaths());
    dest.writeByte((byte) (ignoreNoMedia ? 1 : 0));
    dest.writeByte((byte) (ignoreHiddenFile ? 1 : 0));
    dest.writeString(title);
}
 
Example 6
Source File: StreamInfo.java    From Twire with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    String[] stringsToSend = new String[]{
            game,
            title
    };

    int[] intsToSend = new int[]{
            currentViewers,
            priority
    };

    dest.writeIntArray(intsToSend);
    dest.writeStringArray(stringsToSend);
    dest.writeLong(startedAt);
    dest.writeStringArray(previews);
    dest.writeParcelable(channelInfo, flags);
}
 
Example 7
Source File: ActivityManager.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(processName);
    dest.writeInt(pid);
    dest.writeInt(uid);
    dest.writeStringArray(pkgList);
    dest.writeInt(this.flags);
    dest.writeInt(lastTrimLevel);
    dest.writeInt(importance);
    dest.writeInt(lru);
    dest.writeInt(importanceReasonCode);
    dest.writeInt(importanceReasonPid);
    ComponentName.writeToParcel(importanceReasonComponent, dest);
    dest.writeInt(importanceReasonImportance);
    dest.writeInt(processState);
}
 
Example 8
Source File: ProfileSpatialitemaps.java    From geopaparazzi with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(url);
    dest.writeString(uploadUrl);
    dest.writeString(modifiedDate);
    dest.writeStringArray(visibleLayerNames);
    dest.writeLong(size);
    dest.writeString(destinationPath);
}
 
Example 9
Source File: InstantAppInfo.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@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 10
Source File: Query.java    From arca-android with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void writeToParcel(final Parcel dest, final int flags) {
	super.writeToParcel(dest, flags);
	dest.writeStringArray(mProjection);
	dest.writeString(mWhereClause);
	dest.writeStringArray(mWhereArgs);
	dest.writeString(mSortOrder);
	dest.writeInt(mForceUpdate ? 1 : 0);
}
 
Example 11
Source File: Apk.java    From fdroidclient with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.packageName);
    dest.writeString(this.versionName);
    dest.writeInt(this.versionCode);
    dest.writeInt(this.size);
    dest.writeLong(this.repoId);
    dest.writeString(this.hash);
    dest.writeString(this.hashType);
    dest.writeInt(this.minSdkVersion);
    dest.writeInt(this.targetSdkVersion);
    dest.writeInt(this.maxSdkVersion);
    dest.writeString(this.obbMainFile);
    dest.writeString(this.obbMainFileSha256);
    dest.writeString(this.obbPatchFile);
    dest.writeString(this.obbPatchFileSha256);
    dest.writeLong(this.added != null ? this.added.getTime() : -1);
    dest.writeStringArray(this.requestedPermissions);
    dest.writeStringArray(this.features);
    dest.writeStringArray(this.nativecode);
    dest.writeString(this.sig);
    dest.writeByte(this.compatible ? (byte) 1 : (byte) 0);
    dest.writeString(this.apkName);
    dest.writeSerializable(this.installedFile);
    dest.writeString(this.srcname);
    dest.writeInt(this.repoVersion);
    dest.writeString(this.repoAddress);
    dest.writeStringArray(this.incompatibleReasons);
    dest.writeStringArray(this.antiFeatures);
    dest.writeLong(this.appId);
}
 
Example 12
Source File: PrimitiveArrayParcelable.java    From android-parcelable-intellij-plugin with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(this.a);
    dest.writeDoubleArray(this.b);
    dest.writeStringArray(this.c);
    dest.writeFloatArray(this.e);
    dest.writeBooleanArray(this.f);
    dest.writeByteArray(this.g);
}
 
Example 13
Source File: ChapterTocFrame.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(elementId);
  dest.writeByte((byte) (isRoot ? 1 : 0));
  dest.writeByte((byte) (isOrdered ? 1 : 0));
  dest.writeStringArray(children);
  dest.writeInt(subFrames.length);
  for (Id3Frame subFrame : subFrames) {
    dest.writeParcelable(subFrame, 0);
  }
}
 
Example 14
Source File: BulkCursorDescriptor.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeStrongBinder(cursor.asBinder());
    out.writeStringArray(columnNames);
    out.writeInt(wantsAllOnMoveCalls ? 1 : 0);
    out.writeInt(count);
    if (window != null) {
        out.writeInt(1);
        window.writeToParcel(out, flags);
    } else {
        out.writeInt(0);
    }
}
 
Example 15
Source File: ApplicationInfo.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
public void writeToParcel(Parcel dest, int parcelableFlags) {
    super.writeToParcel(dest, parcelableFlags);
    dest.writeString(taskAffinity);
    dest.writeString(permission);
    dest.writeString(processName);
    dest.writeString(className);
    dest.writeInt(theme);
    dest.writeInt(flags);
    dest.writeInt(requiresSmallestWidthDp);
    dest.writeInt(compatibleWidthLimitDp);
    dest.writeInt(largestWidthLimitDp);
    dest.writeString(sourceDir);
    dest.writeString(publicSourceDir);
    dest.writeString(nativeLibraryDir);
    dest.writeStringArray(resourceDirs);
    dest.writeStringArray(sharedLibraryFiles);
    dest.writeString(dataDir);
    dest.writeInt(uid);
    dest.writeInt(targetSdkVersion);
    dest.writeInt(enabled ? 1 : 0);
    dest.writeInt(enabledSetting);
    dest.writeInt(installLocation);
    dest.writeString(manageSpaceActivityName);
    dest.writeString(backupAgentName);
    dest.writeInt(descriptionRes);
    dest.writeInt(uiOptions);
}
 
Example 16
Source File: GankItemData.java    From NiceRead with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this._id);
    dest.writeString(this.createdAt);
    dest.writeString(this.desc);
    dest.writeStringArray(this.images);
    dest.writeString(this.publishedAt);
    dest.writeString(this.source);
    dest.writeString(this.type);
    dest.writeString(this.url);
    dest.writeByte(this.used ? (byte) 1 : (byte) 0);
    dest.writeString(this.who);
}
 
Example 17
Source File: Spinner.java    From SimpleDialogFragments with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(itemArrayRes);
    dest.writeIntArray(itemStringResArray);
    dest.writeStringArray(items);
    dest.writeString(placeholder);
    dest.writeInt(placeholderResourceId);
    dest.writeInt(position);
}
 
Example 18
Source File: Movie.java    From BuildingForAndroidTV with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeStringArray(new String[] {mId,
            mTitle,
            mDescription,
            mBgImageUrl,
            mCardImageUrl,
            mVideoUrl,
            mStudio,
            mCategory});
}
 
Example 19
Source File: ApplicationInfo.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public void writeToParcel(Parcel dest, int parcelableFlags) {
    super.writeToParcel(dest, parcelableFlags);
    dest.writeString(taskAffinity);
    dest.writeString(permission);
    dest.writeString(processName);
    dest.writeString(className);
    dest.writeInt(theme);
    dest.writeInt(flags);
    dest.writeInt(privateFlags);
    dest.writeInt(requiresSmallestWidthDp);
    dest.writeInt(compatibleWidthLimitDp);
    dest.writeInt(largestWidthLimitDp);
    if (storageUuid != null) {
        dest.writeInt(1);
        dest.writeLong(storageUuid.getMostSignificantBits());
        dest.writeLong(storageUuid.getLeastSignificantBits());
    } else {
        dest.writeInt(0);
    }
    dest.writeString(scanSourceDir);
    dest.writeString(scanPublicSourceDir);
    dest.writeString(sourceDir);
    dest.writeString(publicSourceDir);
    dest.writeStringArray(splitNames);
    dest.writeStringArray(splitSourceDirs);
    dest.writeStringArray(splitPublicSourceDirs);
    dest.writeSparseArray((SparseArray) splitDependencies);
    dest.writeString(nativeLibraryDir);
    dest.writeString(secondaryNativeLibraryDir);
    dest.writeString(nativeLibraryRootDir);
    dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0);
    dest.writeString(primaryCpuAbi);
    dest.writeString(secondaryCpuAbi);
    dest.writeStringArray(resourceDirs);
    dest.writeString(seInfo);
    dest.writeString(seInfoUser);
    dest.writeStringArray(sharedLibraryFiles);
    dest.writeString(dataDir);
    dest.writeString(deviceProtectedDataDir);
    dest.writeString(credentialProtectedDataDir);
    dest.writeInt(uid);
    dest.writeInt(minSdkVersion);
    dest.writeInt(targetSdkVersion);
    dest.writeInt(versionCode);
    dest.writeInt(enabled ? 1 : 0);
    dest.writeInt(enabledSetting);
    dest.writeInt(installLocation);
    dest.writeString(manageSpaceActivityName);
    dest.writeString(backupAgentName);
    dest.writeInt(descriptionRes);
    dest.writeInt(uiOptions);
    dest.writeInt(fullBackupContent);
    dest.writeInt(networkSecurityConfigRes);
    dest.writeInt(category);
    dest.writeInt(targetSandboxVersion);
}
 
Example 20
Source File: ApplicationInfo.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
public void writeToParcel(Parcel dest, int parcelableFlags) {
    super.writeToParcel(dest, parcelableFlags);
    dest.writeString(taskAffinity);
    dest.writeString(permission);
    dest.writeString(processName);
    dest.writeString(className);
    dest.writeInt(theme);
    dest.writeInt(flags);
    dest.writeInt(privateFlags);
    dest.writeInt(requiresSmallestWidthDp);
    dest.writeInt(compatibleWidthLimitDp);
    dest.writeInt(largestWidthLimitDp);
    dest.writeString(volumeUuid);
    dest.writeString(scanSourceDir);
    dest.writeString(scanPublicSourceDir);
    dest.writeString(sourceDir);
    dest.writeString(publicSourceDir);
    dest.writeStringArray(splitSourceDirs);
    dest.writeStringArray(splitPublicSourceDirs);
    dest.writeString(nativeLibraryDir);
    dest.writeString(secondaryNativeLibraryDir);
    dest.writeString(nativeLibraryRootDir);
    dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0);
    dest.writeString(primaryCpuAbi);
    dest.writeString(secondaryCpuAbi);
    dest.writeStringArray(resourceDirs);
    dest.writeString(seinfo);
    dest.writeStringArray(sharedLibraryFiles);
    dest.writeString(dataDir);
    dest.writeString(deviceProtectedDataDir);
    dest.writeString(credentialProtectedDataDir);
    dest.writeInt(uid);
    dest.writeInt(minSdkVersion);
    dest.writeInt(targetSdkVersion);
    dest.writeInt(versionCode);
    dest.writeInt(enabled ? 1 : 0);
    dest.writeInt(enabledSetting);
    dest.writeInt(installLocation);
    dest.writeString(manageSpaceActivityName);
    dest.writeString(backupAgentName);
    dest.writeInt(descriptionRes);
    dest.writeInt(uiOptions);
    dest.writeInt(fullBackupContent);
    dest.writeInt(networkSecurityConfigRes);
}