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

The following examples show how to use android.os.Parcel#readSparseBooleanArray() . 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: DefaultTrackSelector.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
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
Source File: DefaultTrackSelector.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
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
Source File: ItemChoiceManager.java    From Advanced_Android_Development with Apache License 2.0 6 votes vote down vote up
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 File: AbsHListView.java    From Klyph with 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 File: ExpandableRecyclerView.java    From Carbon with 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 File: StaticAdapters.java    From paperparcel with Apache License 2.0 4 votes vote down vote up
@Nullable @Override public SparseBooleanArray readFromParcel(@NonNull Parcel source) {
  return source.readSparseBooleanArray();
}
 
Example 7
Source File: NonParcelRepository.java    From parceler with Apache License 2.0 4 votes vote down vote up
@Override
public SparseBooleanArray nullSafeFromParcel(Parcel parcel) {
    return parcel.readSparseBooleanArray();
}
 
Example 8
Source File: SparseParcelable.java    From android-parcelable-intellij-plugin with Apache License 2.0 4 votes vote down vote up
protected SparseParcelable(Parcel in) {
    this.sampleSparseArray = in.readSparseArray(String.class.getClassLoader());
    this.sparseBooleanArray = in.readSparseBooleanArray();
}