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

The following examples show how to use android.os.Parcel#createLongArray() . 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: NetworkStats.java    From android_9.0.0_r45 with 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 File: AppOpsManager.java    From android_9.0.0_r45 with 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
Source File: BrightnessChangeEvent.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
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
Source File: ProgramSelector.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
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 File: OpEntry.java    From AppOpsX with 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 File: HackerNewsItem.java    From materialistic with 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 File: NetworkStats.java    From 365browser with 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
Source File: WindowAnimationFrameStats.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
private WindowAnimationFrameStats(Parcel parcel) {
    mRefreshPeriodNano = parcel.readLong();
    mFramesPresentedTimeNano = parcel.createLongArray();
}
 
Example 9
Source File: WindowContentFrameStats.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
private WindowContentFrameStats(Parcel parcel) {
    mRefreshPeriodNano = parcel.readLong();
    mFramesPostedTimeNano = parcel.createLongArray();
    mFramesPresentedTimeNano = parcel.createLongArray();
    mFramesReadyTimeNano = parcel.createLongArray();
}
 
Example 10
Source File: NotificationChannel.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
/**
 * @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
Source File: NotificationChannelCompat.java    From notification-channel-compat with Apache License 2.0 4 votes vote down vote up
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 File: StaticAdapters.java    From paperparcel with Apache License 2.0 4 votes vote down vote up
@Nullable @Override public long[] readFromParcel(@NonNull Parcel source) {
  return source.createLongArray();
}
 
Example 13
Source File: GifViewSavedState.java    From android-gif-drawable-eclipse-sample with MIT License 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();
}
 
Example 14
Source File: DownloadProgressBar.java    From UltimateAndroid with Apache License 2.0 4 votes vote down vote up
public SavedState(Parcel source) {
    super(source);
    isFlashing = source.readInt() == 1;
    isConfigurationChanged = source.readInt() == 1;
    mmCurrentPlayTime = source.createLongArray();
}
 
Example 15
Source File: GifViewSavedState.java    From sketch with 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();
}