Java Code Examples for android.os.Parcel.readBundle()

The following are Jave code examples for showing how to use readBundle() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: LJFramework   File: MVPMessage.java   Source Code and License Vote up 6 votes
private void readFromParcel(Parcel source) {
    what = source.readInt();
    arg1 = source.readInt();
    arg2 = source.readInt();
    str = source.readString();
    presenter = source.readString();
    if (source.readInt() != 0) {
        obj = source.readParcelable(getClass().getClassLoader());
    }
    if (source.readInt() != 0) {
        objs = source.readParcelableArray(getClass().getClassLoader());
    }
    data = source.readBundle();
    replyTo = Messenger.readMessengerOrNullFromParcel(source);
    sendingUid = source.readInt();
}
 
Example 2
Project: letv   File: FragmentState.java   Source Code and License Vote up 6 votes
public FragmentState(Parcel in) {
    boolean z;
    boolean z2 = true;
    this.mClassName = in.readString();
    this.mIndex = in.readInt();
    this.mFromLayout = in.readInt() != 0;
    this.mFragmentId = in.readInt();
    this.mContainerId = in.readInt();
    this.mTag = in.readString();
    if (in.readInt() != 0) {
        z = true;
    } else {
        z = false;
    }
    this.mRetainInstance = z;
    if (in.readInt() == 0) {
        z2 = false;
    }
    this.mDetached = z2;
    this.mArguments = in.readBundle();
    this.mSavedFragmentState = in.readBundle();
}
 
Example 3
Project: boohee_v5.6   File: MediaDescriptionCompat.java   Source Code and License Vote up 5 votes
private MediaDescriptionCompat(Parcel in) {
    this.mMediaId = in.readString();
    this.mTitle = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    this.mSubtitle = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    this.mDescription = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    this.mIcon = (Bitmap) in.readParcelable(null);
    this.mIconUri = (Uri) in.readParcelable(null);
    this.mExtras = in.readBundle();
    this.mMediaUri = (Uri) in.readParcelable(null);
}
 
Example 4
Project: NSMPlayer-Android   File: VMovieVideoView.java   Source Code and License Vote up 5 votes
public VideoViewSaveState(Parcel source) {
    super(source);
    // Android has two different classloaders: the framework classloader (which knows how to load Android classes)
    // and the APK classloader (which knows how to load your code).
    // The APK classloader has the framework classloader set as its parent, meaning it can also load Android classes.
    mVideoViewStateBundle = source.readBundle(getClass().getClassLoader());
}
 
Example 5
Project: TPlayer   File: VPackage.java   Source Code and License Vote up 5 votes
protected PermissionComponent(Parcel src) {
    info = src.readParcelable(ActivityInfo.class.getClassLoader());
    className = src.readString();
    metaData = src.readBundle(Bundle.class.getClassLoader());
    int N = src.readInt();
    intents = new ArrayList<>(N);
    while (N-- > 0) {
        intents.add(new IntentInfo(src));
    }
}
 
Example 6
Project: GitHub   File: ParcelUtils.java   Source Code and License Vote up 5 votes
public static Parcelable readFromParcel(Parcel parcel, Class<?> parcelableType, String key) {
    parcel.setDataPosition(0);

    Bundle bundle = parcel.readBundle();
    bundle.setClassLoader(parcelableType.getClassLoader());
    
    Parcelable unparceledInstance = bundle.getParcelable(key);
    return unparceledInstance;
}
 
Example 7
Project: xlight_android_native   File: Parcelables.java   Source Code and License Vote up 5 votes
public static <T extends Serializable> Map<String, T> readSerializableMap(Parcel parcel) {
    Map<String, T> map = new ArrayMap<>();
    Bundle bundle = parcel.readBundle(Parcelables.class.getClassLoader());
    for (String key : bundle.keySet()) {
        @SuppressWarnings("unchecked")
        T serializable = (T) bundle.getSerializable(key);
        map.put(key, serializable);
    }
    return map;
}
 
Example 8
Project: MakiLite   File: RssFeed.java   Source Code and License Vote up 5 votes
public RssFeed(Parcel source) {
	
	Bundle data = source.readBundle();
	title = data.getString("title");
	link = data.getString("link");
	description = data.getString("description");
	language = data.getString("language");
	rssItems = data.getParcelableArrayList("rssItems");
	
}
 
Example 9
Project: boohee_v5.6   File: PlaybackStateCompat.java   Source Code and License Vote up 5 votes
private PlaybackStateCompat(Parcel in) {
    this.mState = in.readInt();
    this.mPosition = in.readLong();
    this.mSpeed = in.readFloat();
    this.mUpdateTime = in.readLong();
    this.mBufferedPosition = in.readLong();
    this.mActions = in.readLong();
    this.mErrorMessage = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
    this.mCustomActions = in.createTypedArrayList(CustomAction.CREATOR);
    this.mActiveItemId = in.readLong();
    this.mExtras = in.readBundle();
}
 
Example 10
Project: DroidIPC   File: BundleReceiver.java   Source Code and License Vote up 5 votes
@Override
protected boolean onTransact(int code, Parcel data, Parcel reply, int flags)
		throws RemoteException {
	
	if(code == ServiceContext.TRANSACT_BUNDLE_SENDER) {
		Bundle bundle = data.readBundle();
		Bundle result = onReceiver(bundle);
		reply.writeBundle(result);
	}
	
	return true;
}
 
Example 11
Project: Phoenix-for-VK   File: MagicKey.java   Source Code and License Vote up 5 votes
public MagicKey(final Parcel in) {
    in.readStringList(mParamList);

    for (int i = 0, n = in.readInt(); i < n; i++) {
        mTypeList.add(in.readInt());
    }

    mBundle = in.readBundle(getClass().getClassLoader());
}
 
Example 12
Project: javaide   File: LogcatReaderLoader.java   Source Code and License Vote up 5 votes
private LogcatReaderLoader(Parcel in) {
    this.recordingMode = in.readInt() == 1;
    this.multiple = in.readInt() == 1;
    Bundle bundle = in.readBundle();
    for (String key : bundle.keySet()) {
        lastLines.put(key, bundle.getString(key));
    }
}
 
Example 13
Project: Assembler   File: RouterRequest.java   Source Code and License Vote up 5 votes
protected RouterRequest(Parcel in) {
    uri = in.readParcelable(Uri.class.getClassLoader());
    bundle = in.readBundle();
    requestCode = in.readInt();
    optionsCompat = in.readBundle();
    isIntercepted = in.readByte() != 0;
}
 
Example 14
Project: GitHub   File: MaterialDialogPreference.java   Source Code and License Vote up 4 votes
SavedState(Parcel source) {
    super(source);
    isDialogShowing = source.readInt() == 1;
    dialogBundle = source.readBundle();
}
 
Example 15
Project: wangyi-Lyric-Parser   File: FilePickerPreference.java   Source Code and License Vote up 4 votes
public SavedState(Parcel source) {
    super(source);
    dialogBundle = source.readBundle(getClass().getClassLoader());
}
 
Example 16
Project: letv   File: ShareMedia.java   Source Code and License Vote up 4 votes
ShareMedia(Parcel in) {
    this.params = in.readBundle();
}
 
Example 17
Project: XinFramework   File: ResultRecord.java   Source Code and License Vote up 4 votes
protected ResultRecord(Parcel in) {
    requestCode = in.readInt();
    resultCode = in.readInt();
    resultBundle = in.readBundle(getClass().getClassLoader());
}
 
Example 18
Project: boohee_v5.6   File: NavigationView.java   Source Code and License Vote up 4 votes
public SavedState(Parcel in, ClassLoader loader) {
    super(in);
    this.menuState = in.readBundle(loader);
}
 
Example 19
Project: garras   File: Request.java   Source Code and License Vote up 4 votes
private void readFromParcel(Parcel in) {
    mFragmentName = in.readString();
    mExtras = in.readBundle(getClass().getClassLoader());
}
 
Example 20
Project: NeoTerm   File: TabSwitcher.java   Source Code and License Vote up 2 votes
/**
 * Creates a new saved state, which allows to store the state of a {@link TabSwitcher}.
 *
 * @param source
 *         The parcel to read read from as a instance of the class {@link Parcel}. The
 *         parcel may not be null
 */
private TabSwitcherState(@NonNull final Parcel source) {
    super(source);
    layoutPolicy = (LayoutPolicy) source.readSerializable();
    modelState = source.readBundle(getClass().getClassLoader());
}