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

The following examples show how to use android.os.Parcel#readSparseBooleanArray() . 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
Parameters(Parcel in) {
  this.selectionOverrides = readSelectionOverrides(in);
  this.rendererDisabledFlags = in.readSparseBooleanArray();
  this.preferredAudioLanguage = in.readString();
  this.preferredTextLanguage = in.readString();
  this.selectUndeterminedTextLanguage = Util.readBoolean(in);
  this.disabledTextTrackSelectionFlags = in.readInt();
  this.forceLowestBitrate = Util.readBoolean(in);
  this.allowMixedMimeAdaptiveness = Util.readBoolean(in);
  this.allowNonSeamlessAdaptiveness = Util.readBoolean(in);
  this.maxVideoWidth = in.readInt();
  this.maxVideoHeight = in.readInt();
  this.maxVideoBitrate = in.readInt();
  this.exceedVideoConstraintsIfNecessary = Util.readBoolean(in);
  this.exceedRendererCapabilitiesIfNecessary = Util.readBoolean(in);
  this.viewportWidth = in.readInt();
  this.viewportHeight = in.readInt();
  this.viewportOrientationMayChange = Util.readBoolean(in);
  this.tunnelingAudioSessionId = in.readInt();
}
 
Example 2
Parameters(Parcel in) {
  this.selectionOverrides = readSelectionOverrides(in);
  this.rendererDisabledFlags = in.readSparseBooleanArray();
  this.preferredAudioLanguage = in.readString();
  this.preferredTextLanguage = in.readString();
  this.selectUndeterminedTextLanguage = Util.readBoolean(in);
  this.disabledTextTrackSelectionFlags = in.readInt();
  this.forceLowestBitrate = Util.readBoolean(in);
  this.allowMixedMimeAdaptiveness = Util.readBoolean(in);
  this.allowNonSeamlessAdaptiveness = Util.readBoolean(in);
  this.maxVideoWidth = in.readInt();
  this.maxVideoHeight = in.readInt();
  this.maxVideoBitrate = in.readInt();
  this.exceedVideoConstraintsIfNecessary = Util.readBoolean(in);
  this.exceedRendererCapabilitiesIfNecessary = Util.readBoolean(in);
  this.viewportWidth = in.readInt();
  this.viewportHeight = in.readInt();
  this.viewportOrientationMayChange = Util.readBoolean(in);
  this.tunnelingAudioSessionId = in.readInt();
}
 
Example 3
public void onRestoreInstanceState(Bundle savedInstanceState) {
    byte[] states = savedInstanceState.getByteArray(SELECTED_ITEMS_KEY);
    if ( null != states ) {
        Parcel inParcel = Parcel.obtain();
        inParcel.unmarshall(states, 0, states.length);
        inParcel.setDataPosition(0);
        mCheckStates = inParcel.readSparseBooleanArray();
        final int numStates = inParcel.readInt();
        mCheckedIdStates.clear();
        for (int i=0; i<numStates; i++) {
            final long key = inParcel.readLong();
            final int value = inParcel.readInt();
            mCheckedIdStates.put(key, value);
        }
    }
}
 
Example 4
Source Project: Klyph   File: AbsHListView.java    License: MIT License 6 votes vote down vote up
/**
 * Constructor called from {@link #CREATOR}
 */
private SavedState( Parcel in ) {
	super( in );
	selectedId = in.readLong();
	firstId = in.readLong();
	viewLeft = in.readInt();
	position = in.readInt();
	width = in.readInt();
	filter = in.readString();
	inActionMode = in.readByte() != 0;
	checkedItemCount = in.readInt();
	checkState = in.readSparseBooleanArray();
	final int N = in.readInt();
	if ( N > 0 ) {
		checkIdState = new LongSparseArray<Integer>();
		for ( int i = 0; i < N; i++ ) {
			final long key = in.readLong();
			final int value = in.readInt();
			checkIdState.put( key, value );
		}
	}
}
 
Example 5
Source Project: Carbon   File: ExpandableRecyclerView.java    License: Apache License 2.0 4 votes vote down vote up
private SavedState(Parcel in) {
    Parcelable superState = in.readParcelable(ExpandableRecyclerView.class.getClassLoader());
    this.superState = superState != null ? superState : EMPTY_STATE;
    this.stateToSave = in.readSparseBooleanArray();
}
 
Example 6
Source Project: paperparcel   File: StaticAdapters.java    License: Apache License 2.0 4 votes vote down vote up
@Nullable @Override public SparseBooleanArray readFromParcel(@NonNull Parcel source) {
  return source.readSparseBooleanArray();
}
 
Example 7
Source Project: parceler   File: NonParcelRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SparseBooleanArray nullSafeFromParcel(Parcel parcel) {
    return parcel.readSparseBooleanArray();
}
 
Example 8
protected SparseParcelable(Parcel in) {
    this.sampleSparseArray = in.readSparseArray(String.class.getClassLoader());
    this.sparseBooleanArray = in.readSparseBooleanArray();
}