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

The following examples show how to use android.os.Parcel#writeStringArray() . 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: FilePicker   File: Configurations.java    License: 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 2
Source Project: testing-samples   File: LogHistory.java    License: 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 3
Source Project: android_9.0.0_r45   File: JobParameters.java    License: 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
@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 Project: Twire   File: StreamInfo.java    License: 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 6
@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 7
Source Project: BuildingForAndroidTV   File: Movie.java    License: 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 8
Source Project: SimpleDialogFragments   File: Spinner.java    License: 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 9
Source Project: NiceRead   File: GankItemData.java    License: 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 10
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 11
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 12
@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 13
@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
@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 15
Source Project: fdroidclient   File: Apk.java    License: 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 16
@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 17
@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 18
@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 19
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);
}
 
Example 20
@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);
}