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

The following examples show how to use android.os.Parcel#writeLongArray() . 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: WifiBatteryStats.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
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
Source File: TopicModel.java    From v2ex-daily-android with 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 3
Source File: BrightnessChangeEvent.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.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 4
Source File: ClientInfo.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@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 5
Source File: DownloadProgressBar.java    From UltimateAndroid with 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(isFlashing ? 1 : 0);
    dest.writeInt(isConfigurationChanged ? 1 : 0);
    dest.writeLongArray(mmCurrentPlayTime);

}
 
Example 6
Source File: GifViewSavedState.java    From sketch with 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 7
Source File: GifViewSavedState.java    From android-gif-drawable-eclipse-sample with MIT License 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 8
Source File: NetworkStats.java    From 365browser with 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 9
Source File: HackerNewsItem.java    From materialistic with 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 10
Source File: OpEntry.java    From AppOpsX with 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 File: ProgramSelector.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mProgramType);
    dest.writeTypedObject(mPrimaryId, 0);
    dest.writeTypedArray(mSecondaryIds, 0);
    dest.writeLongArray(mVendorIds);
}
 
Example 12
Source File: ClientInfo.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@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 13
Source File: AppOpsManager.java    From android_9.0.0_r45 with 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 14
Source File: CellularBatteryStats.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
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 15
Source File: WindowContentFrameStats.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.writeLong(mRefreshPeriodNano);
    parcel.writeLongArray(mFramesPostedTimeNano);
    parcel.writeLongArray(mFramesPresentedTimeNano);
    parcel.writeLongArray(mFramesReadyTimeNano);
}
 
Example 16
Source File: WindowAnimationFrameStats.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeLong(mRefreshPeriodNano);
    parcel.writeLongArray(mFramesPresentedTimeNano);
}
 
Example 17
Source File: NotificationChannelCompat.java    From notification-channel-compat with Apache License 2.0 4 votes vote down vote up
@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 18
Source File: StaticAdapters.java    From paperparcel with 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);
}
 
Example 19
Source File: NotificationChannel.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@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 20
Source File: GpsBatteryStats.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
  out.writeLong(mLoggingDurationMs);
  out.writeLong(mEnergyConsumedMaMs);
  out.writeLongArray(mTimeInGpsSignalQualityLevel);
}