List of usage examples for android.os Parcel readBundle
public final Bundle readBundle()
From source file:Main.java
public static Bundle mutate(Bundle bundle) { if (bundle == null) { return null; }// www . ja v a 2 s.c om final Parcel in = Parcel.obtain(); in.writeBundle(bundle); final byte[] bytes = in.marshall(); final Parcel out = Parcel.obtain(); out.unmarshall(bytes, 0, bytes.length); out.setDataPosition(0); try { return out.readBundle(); } finally { in.recycle(); out.recycle(); } }
From source file:Main.java
public static Bundle fromBase64(String serialized) { Bundle bundle = null;/*from w ww .ja va2 s .c om*/ if (serialized != null) { Parcel parcel = Parcel.obtain(); try { byte[] data = Base64.decode(serialized, 0); parcel.unmarshall(data, 0, data.length); parcel.setDataPosition(0); bundle = parcel.readBundle(); } finally { parcel.recycle(); } } return bundle; }
From source file:com.fanfou.app.opensource.update.AppVersionInfo.java
public AppVersionInfo(final Parcel in) { this(); final Bundle bundle = in.readBundle(); readFromBundle(bundle); }
From source file:com.bmd.android.collection.example.EnhancedArrayMapTest.java
public void testParcelable() { final Bundle bundle = new Bundle(); bundle.putParcelable("array", mArray); final Parcel parcel = Parcel.obtain(); bundle.writeToParcel(parcel, 0);//w w w .j a v a2 s .c om parcel.setDataPosition(0); final Bundle out = parcel.readBundle(); out.setClassLoader(AndroidCollections.class.getClassLoader()); assertThat(out.getParcelable("array")).isEqualTo(mArray); }
From source file:com.shizhefei.view.multitype.provider.FragmentData.java
protected FragmentData(Parcel in) { this.arguments = in.readBundle(); this.fragmentClass = (Class<? extends Fragment>) in.readSerializable(); this.tag = in.readString(); }
From source file:net.soulwolf.structure.core.FragmentParameter.java
public FragmentParameter(Parcel in) { mFragmentClass = (Class) in.readSerializable(); mParams = in.readBundle(); mTag = in.readString();// w ww . j ava 2 s .c o m mRequestCode = in.readInt(); mResultCode = in.readInt(); int size = in.readInt(); mAnimationRes = new int[size]; in.readIntArray(mAnimationRes); mResultParams = in.readParcelable(getClass().getClassLoader()); }
From source file:com.clover.sdk.v1.merchant.Merchant.java
public Merchant(Parcel in) { this.data = in.readBundle(); }
From source file:com.itude.mobile.mobbl.core.model.MBElement.java
private MBElement(Parcel in) { _values = new HashMap<String, String>(); Bundle valueBundle = in.readBundle(); for (String key : valueBundle.keySet()) { _values.put(key, valueBundle.getString(key)); }// w w w . j a v a 2s.co m _definition = in.readParcelable(MBElementDefinition.class.getClassLoader()); }
From source file:org.alfresco.mobile.android.api.session.impl.RepositorySessionImpl.java
@SuppressWarnings("unchecked") public RepositorySessionImpl(Parcel o) { this.baseUrl = o.readString(); this.userIdentifier = o.readString(); this.password = o.readString(); this.rootNode = o.readParcelable(FolderImpl.class.getClassLoader()); this.repositoryInfo = (RepositoryInfo) o.readSerializable(); this.cmisSession = (Session) o.readSerializable(); Bundle b = o.readBundle(); this.userParameters = (Map<String, Serializable>) b.getSerializable("userParameters"); initServices();//from w w w. j av a2 s . c o m }
From source file:com.fragmentmaster.app.FragmentMaster.java
private FragmentMasterState(Parcel in) { mFragments = in.readBundle(); mIsSlideable = in.readInt() == 0; mHomeFragmentApplied = in.readInt() == 0; }