@Test public void testMutate() { mBundle.putInt("some_int", 99); mBundle.putString("String", "hdsf';sddjsd__ __---"); final Bundle mutated = BundleUtils.mutate(mBundle); assertTrue(mBundle != mutated && BundleUtils.equals(mBundle, mutated)); }
public static Bundle mutate(Bundle bundle) { if (bundle == null) { return null; } 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(); } }
BundleUtils { public static Bundle mutate(Bundle bundle) { if (bundle == null) { return null; } 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(); } } }
BundleUtils { public static Bundle mutate(Bundle bundle) { if (bundle == null) { return null; } 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(); } } private  BundleUtils(); }
BundleUtils { public static Bundle mutate(Bundle bundle) { if (bundle == null) { return null; } 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(); } } private  BundleUtils(); static boolean equals(Bundle left, Bundle right); static String dump(Bundle bundle); static Bundle mutate(Bundle bundle); }
BundleUtils { public static Bundle mutate(Bundle bundle) { if (bundle == null) { return null; } 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(); } } private  BundleUtils(); static boolean equals(Bundle left, Bundle right); static String dump(Bundle bundle); static Bundle mutate(Bundle bundle);  }