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

The following examples show how to use android.os.Parcel#createLongArray() . 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
Source Project: android_9.0.0_r45   File: NetworkStats.java    License: Apache License 2.0 6 votes vote down vote up
public NetworkStats(Parcel parcel) {
    elapsedRealtime = parcel.readLong();
    size = parcel.readInt();
    capacity = parcel.readInt();
    iface = parcel.createStringArray();
    uid = parcel.createIntArray();
    set = parcel.createIntArray();
    tag = parcel.createIntArray();
    metered = parcel.createIntArray();
    roaming = parcel.createIntArray();
    defaultNetwork = parcel.createIntArray();
    rxBytes = parcel.createLongArray();
    rxPackets = parcel.createLongArray();
    txBytes = parcel.createLongArray();
    txPackets = parcel.createLongArray();
    operations = parcel.createLongArray();
}
 
Example 2
Source Project: android_9.0.0_r45   File: AppOpsManager.java    License: Apache License 2.0 5 votes vote down vote up
OpEntry(Parcel source) {
    mOp = source.readInt();
    mMode = source.readInt();
    mTimes = source.createLongArray();
    mRejectTimes = source.createLongArray();
    mDuration = source.readInt();
    mRunning = source.readBoolean();
    mProxyUid = source.readInt();
    mProxyPackageName = source.readString();
}
 
Example 3
private BrightnessChangeEvent(Parcel source) {
    brightness = source.readFloat();
    timeStamp = source.readLong();
    packageName = source.readString();
    userId = source.readInt();
    luxValues = source.createFloatArray();
    luxTimestamps = source.createLongArray();
    batteryLevel = source.readFloat();
    powerBrightnessFactor = source.readFloat();
    nightMode = source.readBoolean();
    colorTemperature = source.readInt();
    lastBrightness = source.readFloat();
    isDefaultBrightnessConfig = source.readBoolean();
    isUserSetBrightness = source.readBoolean();
}
 
Example 4
private ProgramSelector(Parcel in) {
    mProgramType = in.readInt();
    mPrimaryId = in.readTypedObject(Identifier.CREATOR);
    mSecondaryIds = in.createTypedArray(Identifier.CREATOR);
    if (Stream.of(mSecondaryIds).anyMatch(id -> id == null)) {
        throw new IllegalArgumentException("secondaryIds list must not contain nulls");
    }
    mVendorIds = in.createLongArray();
}
 
Example 5
Source Project: AppOpsX   File: OpEntry.java    License: MIT License 5 votes vote down vote up
protected OpEntry(Parcel in) {
  this.mOp = in.readInt();
  this.mMode = in.readInt();
  this.mTimes = in.createLongArray();
  this.mRejectTimes = in.createLongArray();
  this.mDuration = in.readInt();
  this.mRunning = in.readByte() != 0;
  this.mProxyUid = in.readInt();
  this.mProxyPackageName = in.readString();
  this.mAllowedCount = in.readInt();
  this.mIgnoredCount = in.readInt();
}
 
Example 6
Source Project: materialistic   File: HackerNewsItem.java    License: Apache License 2.0 5 votes vote down vote up
@Synthetic
HackerNewsItem(Parcel source) {
    id = source.readLong();
    title = source.readString();
    time = source.readLong();
    by = source.readString();
    kids = source.createLongArray();
    url = source.readString();
    text = source.readString();
    type = source.readString();
    favorite = source.readInt() != 0;
    descendants = source.readInt();
    score = source.readInt();
    favorite = source.readInt() == 1;
    viewed = source.readInt() == 1;
    localRevision = source.readInt();
    level = source.readInt();
    dead = source.readInt() == 1;
    deleted = source.readInt() == 1;
    collapsed = source.readInt() == 1;
    contentExpanded = source.readInt() == 1;
    rank = source.readInt();
    lastKidCount = source.readInt();
    hasNewDescendants = source.readInt() == 1;
    parent = source.readLong();
    voted = source.readInt() == 1;
    pendingVoted = source.readInt() == 1;
    next = source.readLong();
    previous = source.readLong();
}
 
Example 7
Source Project: 365browser   File: NetworkStats.java    License: Apache License 2.0 5 votes vote down vote up
public NetworkStats(Parcel parcel) {
    elapsedRealtime = parcel.readLong();
    size = parcel.readInt();
    iface = parcel.createStringArray();
    uid = parcel.createIntArray();
    set = parcel.createIntArray();
    tag = parcel.createIntArray();
    rxBytes = parcel.createLongArray();
    rxPackets = parcel.createLongArray();
    txBytes = parcel.createLongArray();
    txPackets = parcel.createLongArray();
    operations = parcel.createLongArray();
}
 
Example 8
private WindowAnimationFrameStats(Parcel parcel) {
    mRefreshPeriodNano = parcel.readLong();
    mFramesPresentedTimeNano = parcel.createLongArray();
}
 
Example 9
private WindowContentFrameStats(Parcel parcel) {
    mRefreshPeriodNano = parcel.readLong();
    mFramesPostedTimeNano = parcel.createLongArray();
    mFramesPresentedTimeNano = parcel.createLongArray();
    mFramesReadyTimeNano = parcel.createLongArray();
}
 
Example 10
/**
 * @hide
 */
protected NotificationChannel(Parcel in) {
    if (in.readByte() != 0) {
        mId = in.readString();
    } else {
        mId = null;
    }
    if (in.readByte() != 0) {
        mName = in.readString();
    } else {
        mName = null;
    }
    if (in.readByte() != 0) {
        mDesc = in.readString();
    } else {
        mDesc = null;
    }
    mImportance = in.readInt();
    mBypassDnd = in.readByte() != 0;
    mLockscreenVisibility = in.readInt();
    if (in.readByte() != 0) {
        mSound = Uri.CREATOR.createFromParcel(in);
    } else {
        mSound = null;
    }
    mLights = in.readByte() != 0;
    mVibration = in.createLongArray();
    mUserLockedFields = in.readInt();
    mFgServiceShown = in.readByte() != 0;
    mVibrationEnabled = in.readByte() != 0;
    mShowBadge = in.readByte() != 0;
    mDeleted = in.readByte() != 0;
    if (in.readByte() != 0) {
        mGroup = in.readString();
    } else {
        mGroup = null;
    }
    mAudioAttributes = in.readInt() > 0 ? AudioAttributes.CREATOR.createFromParcel(in) : null;
    mLightColor = in.readInt();
    mBlockableSystem = in.readBoolean();
}
 
Example 11
protected NotificationChannelCompat(Parcel in) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        _oreoNotificationChannel = in.readParcelable(NotificationChannel.class.getClassLoader());
        this.mId = null; // just to make compiler happy
        return;
    }

    if (in.readByte() != 0) {
        mId = in.readString();
    } else {
        mId = null;
    }
    if (in.readByte() != 0) {
        mName = in.readString();
    } else {
        mName = null;
    }
    if (in.readByte() != 0) {
        mDesc = in.readString();
    } else {
        mDesc = null;
    }
    mChannelEnabled = in.readByte() != 0;
    mImportance = in.readInt();
    mLockscreenVisibility = in.readInt();
    if (in.readByte() != 0) {
        mSound = Uri.CREATOR.createFromParcel(in);
    } else {
        mSound = null;
    }
    mLights = in.readByte() != 0;
    mVibration = in.createLongArray();
    mVibrationEnabled = in.readByte() != 0;
    if (in.readByte() != 0) {
        mGroup = in.readString();
    } else {
        mGroup = null;
    }
    boolean readAudioAttributes = in.readInt() > 0;
    if (readAudioAttributes && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // unnecessary check for compiler, as in Pre-Lollipop readAudioAttributes will always be false
        mAudioAttributes = AudioAttributes.CREATOR.createFromParcel(in);
    } else {
        mAudioAttributes = null;
    }
    mAudioStreamType = in.readInt();
    mLightColor = in.readInt();
}
 
Example 12
Source Project: paperparcel   File: StaticAdapters.java    License: Apache License 2.0 4 votes vote down vote up
@Nullable @Override public long[] readFromParcel(@NonNull Parcel source) {
  return source.createLongArray();
}
 
Example 13
private GifViewSavedState(Parcel in) {
    super(in);
    mStates = new long[in.readInt()][];
    for (int i=0;i<mStates.length;i++)
        mStates[i]=in.createLongArray();
}
 
Example 14
public SavedState(Parcel source) {
    super(source);
    isFlashing = source.readInt() == 1;
    isConfigurationChanged = source.readInt() == 1;
    mmCurrentPlayTime = source.createLongArray();
}
 
Example 15
Source Project: sketch   File: GifViewSavedState.java    License: Apache License 2.0 4 votes vote down vote up
private GifViewSavedState(Parcel in) {
	super(in);
	mStates = new long[in.readInt()][];
	for (int i = 0; i < mStates.length; i++)
		mStates[i] = in.createLongArray();
}