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

The following examples show how to use android.os.Parcel#readIntArray() . 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
SavedState(Parcel in, ClassLoader loader) {
    super(in, loader);
    this.max = in.readFloat();
    this.progress = in.readFloat();
    this.secondaryProgress = in.readFloat();

    this.radius = in.readInt();
    this.padding = in.readInt();

    this.colorBackground = in.readInt();
    this.colorProgress = in.readInt();
    this.colorSecondaryProgress = in.readInt();
    this.colorProgressArray = new int[in.readInt()];
    in.readIntArray(this.colorProgressArray);
    this.colorSecondaryProgressArray = new int[in.readInt()];
    in.readIntArray(this.colorSecondaryProgressArray);

    this.isReverse = in.readByte() != 0;
}
 
Example 2
@NonNull
@Override
public ParcelableSparseBooleanArray createFromParcel(@NonNull Parcel source) {
  int size = source.readInt();
  ParcelableSparseBooleanArray read = new ParcelableSparseBooleanArray(size);

  int[] keys = new int[size];
  boolean[] values = new boolean[size];

  source.readIntArray(keys);
  source.readBooleanArray(values);

  for (int i = 0; i < size; i++) {
    read.put(keys[i], values[i]);
  }

  return read;
}
 
Example 3
public NotificationRankingUpdate(Parcel in) {
    mKeys = in.readStringArray();
    mInterceptedKeys = in.readStringArray();
    mVisibilityOverrides = in.readBundle();
    mSuppressedVisualEffects = in.readBundle();
    mImportance = new int[mKeys.length];
    in.readIntArray(mImportance);
    mImportanceExplanation = in.readBundle();
    mOverrideGroupKeys = in.readBundle();
    mChannels = in.readBundle();
    mOverridePeople = in.readBundle();
    mSnoozeCriteria = in.readBundle();
    mShowBadge = in.readBundle();
    mUserSentiment = in.readBundle();
    mHidden = in.readBundle();
}
 
Example 4
private ContextHubInfo(Parcel in) {
    mId = in.readInt();
    mName = in.readString();
    mVendor = in.readString();
    mToolchain = in.readString();
    mPlatformVersion = in.readInt();
    mToolchainVersion = in.readInt();
    mPeakMips = in.readFloat();
    mStoppedPowerDrawMw = in.readFloat();
    mSleepPowerDrawMw = in.readFloat();
    mPeakPowerDrawMw = in.readFloat();
    mMaxPacketLengthBytes = in.readInt();
    mChrePlatformId = in.readLong();
    mChreApiMajorVersion = in.readByte();
    mChreApiMinorVersion = in.readByte();
    mChrePatchVersion = (short) in.readInt();

    int numSupportedSensors = in.readInt();
    mSupportedSensors = new int[numSupportedSensors];
    in.readIntArray(mSupportedSensors);
    mMemoryRegions = in.createTypedArray(MemoryRegion.CREATOR);
}
 
Example 5
Source Project: DeviceConnect-Android   File: Size.java    License: MIT License 6 votes vote down vote up
private Size(final Parcel source) {
	// 読み取り順はwriteToParcelでの書き込み順と同じでないとダメ
	type = source.readInt();
	frame_type = source.readInt();
	index = source.readInt();
	width = source.readInt();
	height = source.readInt();
	frameIntervalType = source.readInt();
	frameIntervalIndex = source.readInt();
	if (frameIntervalType >= 0) {
		if (frameIntervalType > 0) {
			intervals = new int[frameIntervalType];
		} else {
			intervals = new int[3];
		}
		source.readIntArray(intervals);
	} else {
		intervals = null;
	}
	updateFrameRate();
}
 
Example 6
Source Project: external-nfc-api   File: TagImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public TagImpl createFromParcel(Parcel in) {
    INfcTag tagService;

    // Tag fields
    byte[] id = TagImpl.readBytesWithNull(in);
    int[] techList = new int[in.readInt()];
    in.readIntArray(techList);
    Bundle[] techExtras = in.createTypedArray(Bundle.CREATOR);
    int serviceHandle = in.readInt();
    int isMock = in.readInt();
    if (isMock == 0) {
        tagService = INfcTag.Stub.asInterface(in.readStrongBinder());
    }
    else {
        tagService = null;
    }

    return new TagImpl(id, techList, techExtras, serviceHandle, tagService);
}
 
Example 7
private BufferConnectionInfo(final Parcel in) {
    final int[] integers = new int[10];
    final long[] longs = new long[3];

    address = in.readString();
    in.readIntArray(integers);
    in.readLongArray(longs);
    connected = in.readInt() == 1;

    connectionID = integers[0];
    samplesGotten = integers[1];
    samplesPut = integers[2];
    eventsGotten = integers[3];
    eventsPut = integers[4];
    lastActivity = integers[5];
    waitEvents = integers[6];
    waitSamples = integers[7];
    error = integers[8];
    diff = integers[9];

    timeLastActivity = longs[0];
    waitTimeout = longs[1];
    time = longs[2];
}
 
Example 8
SavedState(Parcel in, ClassLoader loader) {
    super(in, loader);
    this.max = in.readFloat();
    this.progress = in.readFloat();
    this.secondaryProgress = in.readFloat();

    this.radius = in.readInt();
    this.padding = in.readInt();

    this.colorBackground = in.readInt();
    this.colorProgress = in.readInt();
    this.colorSecondaryProgress = in.readInt();
    this.colorProgressArray = new int[in.readInt()];
    in.readIntArray(this.colorProgressArray);
    this.colorSecondaryProgressArray = new int[in.readInt()];
    in.readIntArray(this.colorSecondaryProgressArray);

    this.isReverse = in.readByte() != 0;
}
 
Example 9
private ClientInfo(final Parcel in) {
    final int[] integers = new int[10];
    final long[] longs = new long[3];

    address = in.readString();
    in.readIntArray(integers);
    in.readLongArray(longs);
    connected = in.readInt() == 1;

    clientID = integers[0];
    samplesGotten = integers[1];
    samplesPut = integers[2];
    eventsGotten = integers[3];
    eventsPut = integers[4];
    lastActivity = integers[5];
    waitEvents = integers[6];
    waitSamples = integers[7];
    error = integers[8];
    diff = integers[9];

    timeLastActivity = longs[0];
    waitTimeout = longs[1];
    time = longs[2];
}
 
Example 10
Source Project: MediaSDK   File: DefaultTrackSelector.java    License: Apache License 2.0 5 votes vote down vote up
SelectionOverride(Parcel in) {
  groupIndex = in.readInt();
  length = in.readByte();
  tracks = new int[length];
  in.readIntArray(tracks);
  reason = in.readInt();
  data = in.readInt();
}
 
Example 11
Source Project: letv   File: StaggeredGridLayoutManager.java    License: Apache License 2.0 5 votes vote down vote up
SavedState(Parcel in) {
    boolean z;
    boolean z2 = true;
    this.mAnchorPosition = in.readInt();
    this.mVisibleAnchorPosition = in.readInt();
    this.mSpanOffsetsSize = in.readInt();
    if (this.mSpanOffsetsSize > 0) {
        this.mSpanOffsets = new int[this.mSpanOffsetsSize];
        in.readIntArray(this.mSpanOffsets);
    }
    this.mSpanLookupSize = in.readInt();
    if (this.mSpanLookupSize > 0) {
        this.mSpanLookup = new int[this.mSpanLookupSize];
        in.readIntArray(this.mSpanLookup);
    }
    this.mReverseLayout = in.readInt() == 1;
    if (in.readInt() == 1) {
        z = true;
    } else {
        z = false;
    }
    this.mAnchorLayoutFromEnd = z;
    if (in.readInt() != 1) {
        z2 = false;
    }
    this.mLastLayoutRTL = z2;
    this.mFullSpanItems = in.readArrayList(FullSpanItem.class.getClassLoader());
}
 
Example 12
private BufferInfo(final Parcel in) {
    final int[] integers = new int[4];

    address = in.readString();
    in.readIntArray(integers);
    fSample = in.readFloat();
    startTime = in.readLong();

    nSamples = integers[0];
    nEvents = integers[1];
    dataType = integers[2];
    nChannels = integers[3];
}
 
Example 13
public SavedState(Parcel source) {
    super(source);
    // Get the current preference's values
    current = source.readInt();
    source.readIntArray(colors);
    columns = source.readInt();
}
 
Example 14
/**
 * Constructor called from {@link #CREATOR}
 */
public GridListSavedState(Parcel in) {
    super(in);
    columnCount = in.readInt();
    columnTops = new int[columnCount >= 0 ? columnCount : 0];
    in.readIntArray(columnTops);
    positionData = in.readSparseArray(GridItemRecord.class.getClassLoader());
}
 
Example 15
public ParcelableQBDialog(Parcel inputParcel) {
    dialog = new QBChatDialog(inputParcel.readString());
    dialog.setName(inputParcel.readString());
    dialog.setType(QBDialogType.parseByCode(inputParcel.readInt()));
    dialog.setRoomJid(inputParcel.readString());
    dialog.setLastMessage(inputParcel.readString());
    dialog.setLastMessageDateSent(inputParcel.readLong());
    int[] occupantArray = new int[inputParcel.readInt()];
    inputParcel.readIntArray(occupantArray);
    dialog.setOccupantsIds(Utils.toArrayList(occupantArray));
}
 
Example 16
protected ImmutableSparseIntArray(Parcel source) {
    array = new SparseIntArray();
    int size = source.readInt();

    int[] keys = new int[size];
    int[] values = new int[size];

    source.readIntArray(keys);
    source.readIntArray(values);

    for (int i = 0; i < size; i++) {
        array.put(keys[i], values[i]);
    }
}
 
Example 17
public SavedState(Parcel source) {
    super(source);
    // Get the current preference's values
    current = source.readInt();
    source.readIntArray(colors);
    columns = source.readInt();
}
 
Example 18
Source Project: ColorPicker   File: ColorPreference.java    License: Apache License 2.0 5 votes vote down vote up
public SavedState(Parcel source) {
    super(source);
    // Get the current preference's values
    current = source.readInt();
    source.readIntArray(colors);
    columns = source.readInt();
    material = source.readByte() != 0;
    backwardsOrder = source.readByte() != 0;
    strokeWidth = source.readInt();
    strokeColor = source.readInt();
}
 
Example 19
FullSpanItem(Parcel in) {
    mPosition = in.readInt();
    mGapDir = in.readInt();
    mHasUnwantedGapAfter = in.readInt() == 1;
    int spanCount = in.readInt();
    if (spanCount > 0) {
        mGapPerSpan = new int[spanCount];
        in.readIntArray(mGapPerSpan);
    }
}
 
Example 20
/**
 * Constructor called from {@link #CREATOR}
 */
public GridListSavedState(Parcel in) {
    super(in);
    columnCount = in.readInt();
    columnTops = new int[columnCount >= 0 ? columnCount : 0];
    in.readIntArray(columnTops);
    positionData = in.readSparseArray(GridItemRecord.class.getClassLoader());
}