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

The following examples show how to use android.os.Parcel#readIntArray() . 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: BaseRoundCornerProgressBar.java    From RoundCornerProgressBar with Apache License 2.0 6 votes vote down vote up
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
Source File: ParcelableSparseBooleanArray.java    From material-components-android with Apache License 2.0 6 votes vote down vote up
@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
Source File: NotificationRankingUpdate.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
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
Source File: ContextHubInfo.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
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 File: Size.java    From DeviceConnect-Android with 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 File: ClientInfo.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
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 7
Source File: TagImpl.java    From external-nfc-api with 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 8
Source File: BaseRoundCornerProgressBar.java    From RoundCornerProgressBar with Apache License 2.0 6 votes vote down vote up
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
Source File: BufferConnectionInfo.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
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 10
Source File: StaggeredGridView.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * 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 11
Source File: DefaultTrackSelector.java    From MediaSDK with 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 12
Source File: StaggeredGridLayoutManager.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
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 13
Source File: ColorPreference.java    From ColorPicker with 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 14
Source File: AppCompatColorPreference.java    From FastAccess with GNU General Public License v3.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();
}
 
Example 15
Source File: ImmutableSparseIntArray.java    From Android-nRF-Mesh-Library with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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 16
Source File: ParcelableQBDialog.java    From q-municate-android with Apache License 2.0 5 votes vote down vote up
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 17
Source File: StaggeredGridView.java    From PullToRefreshLibrary with Apache License 2.0 5 votes vote down vote up
/**
 * 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 18
Source File: ColorPreference.java    From FastAccess with GNU General Public License v3.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();
}
 
Example 19
Source File: BufferInfo.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
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 20
Source File: StaggeredGridLayoutManager.java    From letv with 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());
}