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

The following examples show how to use android.os.Parcel#writeLongArray() . 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
public void writeToParcel(Parcel out, int flags) {
  out.writeLong(mLoggingDurationMs);
  out.writeLong(mKernelActiveTimeMs);
  out.writeLong(mNumPacketsTx);
  out.writeLong(mNumBytesTx);
  out.writeLong(mNumPacketsRx);
  out.writeLong(mNumBytesRx);
  out.writeLong(mSleepTimeMs);
  out.writeLong(mScanTimeMs);
  out.writeLong(mIdleTimeMs);
  out.writeLong(mRxTimeMs);
  out.writeLong(mTxTimeMs);
  out.writeLong(mEnergyConsumedMaMs);
  out.writeLong(mNumAppScanRequest);
  out.writeLongArray(mTimeInStateMs);
  out.writeLongArray(mTimeInRxSignalStrengthLevelMs);
  out.writeLongArray(mTimeInSupplicantStateMs);
}
 
Example 2
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeFloat(brightness);
    dest.writeLong(timeStamp);
    dest.writeString(packageName);
    dest.writeInt(userId);
    dest.writeFloatArray(luxValues);
    dest.writeLongArray(luxTimestamps);
    dest.writeFloat(batteryLevel);
    dest.writeFloat(powerBrightnessFactor);
    dest.writeBoolean(nightMode);
    dest.writeInt(colorTemperature);
    dest.writeFloat(lastBrightness);
    dest.writeBoolean(isDefaultBrightnessConfig);
    dest.writeBoolean(isUserSetBrightness);
}
 
Example 3
Source Project: v2ex-daily-android   File: TopicModel.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(new int[]{
            id,
            replies
    });
    dest.writeStringArray(new String[]{
            title,
            url,
            content,
            contentRendered
    });
    dest.writeLongArray(new long[]{
            created,
            lastModified,
            lastTouched
    });
    dest.writeValue(member);
    dest.writeValue(node);
}
 
Example 4
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeLong(mRefreshPeriodNano);
    parcel.writeLongArray(mFramesPostedTimeNano);
    parcel.writeLongArray(mFramesPresentedTimeNano);
    parcel.writeLongArray(mFramesReadyTimeNano);
}
 
Example 5
public void writeToParcel(Parcel out, int flags) {
  out.writeLong(mLoggingDurationMs);
  out.writeLong(mKernelActiveTimeMs);
  out.writeLong(mNumPacketsTx);
  out.writeLong(mNumBytesTx);
  out.writeLong(mNumPacketsRx);
  out.writeLong(mNumBytesRx);
  out.writeLong(mSleepTimeMs);
  out.writeLong(mIdleTimeMs);
  out.writeLong(mRxTimeMs);
  out.writeLong(mEnergyConsumedMaMs);
  out.writeLongArray(mTimeInRatMs);
  out.writeLongArray(mTimeInRxSignalStrengthLevelMs);
  out.writeLongArray(mTxTimeMs);
}
 
Example 6
Source Project: android_9.0.0_r45   File: AppOpsManager.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mOp);
    dest.writeInt(mMode);
    dest.writeLongArray(mTimes);
    dest.writeLongArray(mRejectTimes);
    dest.writeInt(mDuration);
    dest.writeBoolean(mRunning);
    dest.writeInt(mProxyUid);
    dest.writeString(mProxyPackageName);
}
 
Example 7
@Override
public void writeToParcel(final Parcel out, final int flags) {
    // Gathering data
    final int[] integers = new int[]{clientID, samplesGotten, samplesPut,
            eventsGotten, eventsPut, lastActivity, waitEvents, waitSamples,
            error, diff};
    final long[] longs = new long[]{timeLastActivity, waitTimeout, time};

    // Write it to parcel
    out.writeString(address);
    out.writeIntArray(integers);
    out.writeLongArray(longs);
    out.writeInt(connected ? 1 : 0);
}
 
Example 8
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mProgramType);
    dest.writeTypedObject(mPrimaryId, 0);
    dest.writeTypedArray(mSecondaryIds, 0);
    dest.writeLongArray(mVendorIds);
}
 
Example 9
@Override
public void writeToParcel(final Parcel out, final int flags) {
	// Gathering data
	final int[] integers = new int[] { clientID, samplesGotten, samplesPut,
			eventsGotten, eventsPut, lastActivity, waitEvents, waitSamples,
			error, diff };
	final long[] longs = new long[] { timeLastActivity, waitTimeout, time };

	// Write it to parcel
	out.writeString(address);
	out.writeIntArray(integers);
	out.writeLongArray(longs);
	out.writeInt(connected ? 1 : 0);
}
 
Example 10
Source Project: AppOpsX   File: OpEntry.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeInt(this.mOp);
  dest.writeInt(this.mMode);
  dest.writeLongArray(this.mTimes);
  dest.writeLongArray(this.mRejectTimes);
  dest.writeInt(this.mDuration);
  dest.writeByte((byte) (this.mRunning ? 1 : 0));
  dest.writeInt(this.mProxyUid);
  dest.writeString(this.mProxyPackageName);
  dest.writeInt(this.mAllowedCount);
  dest.writeInt(this.mIgnoredCount);
}
 
Example 11
Source Project: materialistic   File: HackerNewsItem.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(id);
    dest.writeString(title);
    dest.writeLong(time);
    dest.writeString(by);
    dest.writeLongArray(kids);
    dest.writeString(url);
    dest.writeString(text);
    dest.writeString(type);
    dest.writeInt(favorite ? 1 : 0);
    dest.writeInt(descendants);
    dest.writeInt(score);
    dest.writeInt(favorite ? 1 : 0);
    dest.writeInt(viewed ? 1 : 0);
    dest.writeInt(localRevision);
    dest.writeInt(level);
    dest.writeInt(dead ? 1 : 0);
    dest.writeInt(deleted ? 1 : 0);
    dest.writeInt(collapsed ? 1 : 0);
    dest.writeInt(contentExpanded ? 1 : 0);
    dest.writeInt(rank);
    dest.writeInt(lastKidCount);
    dest.writeInt(hasNewDescendants ? 1 : 0);
    dest.writeLong(parent);
    dest.writeInt(voted ? 1 : 0);
    dest.writeInt(pendingVoted ? 1 : 0);
    dest.writeLong(next);
    dest.writeLong(previous);
}
 
Example 12
Source Project: 365browser   File: NetworkStats.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(elapsedRealtime);
    dest.writeInt(size);
    dest.writeStringArray(iface);
    dest.writeIntArray(uid);
    dest.writeIntArray(set);
    dest.writeIntArray(tag);
    dest.writeLongArray(rxBytes);
    dest.writeLongArray(rxPackets);
    dest.writeLongArray(txBytes);
    dest.writeLongArray(txPackets);
    dest.writeLongArray(operations);
}
 
Example 13
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(mStates.length);
    for (long[] mState : mStates)
        dest.writeLongArray(mState);
}
 
Example 14
Source Project: sketch   File: GifViewSavedState.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
	super.writeToParcel(dest, flags);
	dest.writeInt(mStates.length);
	for (long[] mState : mStates)
		dest.writeLongArray(mState);
}
 
Example 15
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(isFlashing ? 1 : 0);
    dest.writeInt(isConfigurationChanged ? 1 : 0);
    dest.writeLongArray(mmCurrentPlayTime);

}
 
Example 16
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeLong(mRefreshPeriodNano);
    parcel.writeLongArray(mFramesPresentedTimeNano);
}
 
Example 17
@Override
public void writeToParcel(Parcel out, int flags) {
  out.writeLong(mLoggingDurationMs);
  out.writeLong(mEnergyConsumedMaMs);
  out.writeLongArray(mTimeInGpsSignalQualityLevel);
}
 
Example 18
@Override
public void writeToParcel(Parcel dest, int flags) {
    if (mId != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mId);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mName != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mName);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mDesc != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mDesc);
    } else {
        dest.writeByte((byte) 0);
    }
    dest.writeInt(mImportance);
    dest.writeByte(mBypassDnd ? (byte) 1 : (byte) 0);
    dest.writeInt(mLockscreenVisibility);
    if (mSound != null) {
        dest.writeByte((byte) 1);
        mSound.writeToParcel(dest, 0);
    } else {
        dest.writeByte((byte) 0);
    }
    dest.writeByte(mLights ? (byte) 1 : (byte) 0);
    dest.writeLongArray(mVibration);
    dest.writeInt(mUserLockedFields);
    dest.writeByte(mFgServiceShown ? (byte) 1 : (byte) 0);
    dest.writeByte(mVibrationEnabled ? (byte) 1 : (byte) 0);
    dest.writeByte(mShowBadge ? (byte) 1 : (byte) 0);
    dest.writeByte(mDeleted ? (byte) 1 : (byte) 0);
    if (mGroup != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mGroup);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mAudioAttributes != null) {
        dest.writeInt(1);
        mAudioAttributes.writeToParcel(dest, 0);
    } else {
        dest.writeInt(0);
    }
    dest.writeInt(mLightColor);
    dest.writeBoolean(mBlockableSystem);
}
 
Example 19
@Override
public void writeToParcel(Parcel dest, int flags) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        _oreoNotificationChannel.writeToParcel(dest, flags);
        return;
    }

    if (mId != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mId);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mName != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mName);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mDesc != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mDesc);
    } else {
        dest.writeByte((byte) 0);
    }
    dest.writeByte(mChannelEnabled ? (byte) 1 : (byte) 0);
    dest.writeInt(mImportance);
    dest.writeInt(mLockscreenVisibility);
    if (mSound != null) {
        dest.writeByte((byte) 1);
        mSound.writeToParcel(dest, 0);
    } else {
        dest.writeByte((byte) 0);
    }
    dest.writeByte(mLights ? (byte) 1 : (byte) 0);
    dest.writeLongArray(mVibration);
    dest.writeByte(mVibrationEnabled ? (byte) 1 : (byte) 0);
    if (mGroup != null) {
        dest.writeByte((byte) 1);
        dest.writeString(mGroup);
    } else {
        dest.writeByte((byte) 0);
    }
    if (mAudioAttributes != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // unnecessary check for compiler, as in Pre-Lollipop mAudioAttributes will always be null
        dest.writeInt(1);
        mAudioAttributes.writeToParcel(dest, 0);
    } else {
        dest.writeInt(0);
    }
    dest.writeInt(mAudioStreamType);
    dest.writeInt(mLightColor);
}
 
Example 20
Source Project: paperparcel   File: StaticAdapters.java    License: Apache License 2.0 4 votes vote down vote up
@Override public void writeToParcel(@Nullable long[] value, @NonNull Parcel dest, int flags) {
  dest.writeLongArray(value);
}