@Test public void testWriteToParcel() { DynamicLinkData writtenLinkData = addExtension(genDynamicLinkData()); Parcel out = Parcel.obtain(); writtenLinkData.writeToParcel(out, 0); out.setDataPosition(0); DynamicLinkData createdDynamicLink = DynamicLinkData.CREATOR.createFromParcel(out); assertEquals(writtenLinkData.getDynamicLink(), createdDynamicLink.getDynamicLink()); assertEquals(writtenLinkData.getDeepLink(), createdDynamicLink.getDeepLink()); assertEquals(writtenLinkData.getClickTimestamp(), createdDynamicLink.getClickTimestamp()); assertEquals(writtenLinkData.getMinVersion(), createdDynamicLink.getMinVersion()); Bundle writtenBundle = writtenLinkData.getExtensionBundle(); Bundle createdBundle = createdDynamicLink.getExtensionBundle(); assertEquals(writtenBundle.size(), createdBundle.size()); Set<String> createdKeys = createdBundle.keySet(); Set<String> writtenKeys = writtenBundle.keySet(); assertTrue(createdKeys.containsAll(writtenKeys)); }
@SuppressWarnings("static-access") @Override public void writeToParcel(Parcel dest, int flags) { DynamicLinkDataCreator.writeToParcel(this, dest, flags); }
DynamicLinkData extends AbstractSafeParcelable { @SuppressWarnings("static-access") @Override public void writeToParcel(Parcel dest, int flags) { DynamicLinkDataCreator.writeToParcel(this, dest, flags); } }
DynamicLinkData extends AbstractSafeParcelable { @SuppressWarnings("static-access") @Override public void writeToParcel(Parcel dest, int flags) { DynamicLinkDataCreator.writeToParcel(this, dest, flags); } @SafeParcelable.Constructor  DynamicLinkData(
      @Param(id = 1) String dynamicLink,
      @Param(id = 2) String deepLink,
      @Param(id = 3) int minVersion,
      @Param(id = 4) long clickTimestamp,
      @Param(id = 5) Bundle extensions,
      @Param(id = 6) Uri redirectUrl); }
DynamicLinkData extends AbstractSafeParcelable { @SuppressWarnings("static-access") @Override public void writeToParcel(Parcel dest, int flags) { DynamicLinkDataCreator.writeToParcel(this, dest, flags); } @SafeParcelable.Constructor  DynamicLinkData(
      @Param(id = 1) String dynamicLink,
      @Param(id = 2) String deepLink,
      @Param(id = 3) int minVersion,
      @Param(id = 4) long clickTimestamp,
      @Param(id = 5) Bundle extensions,
      @Param(id = 6) Uri redirectUrl); String getDynamicLink(); void setDynamicLink(String dynamicLink); String getDeepLink(); void setDeepLink(String deepLink); int getMinVersion(); void setMinVersion(int minVersion); long getClickTimestamp(); void setClickTimestamp(long timestamp); Bundle getExtensionBundle(); void setRedirectUrl(Uri redirectUrl); Uri getRedirectUrl(); void setExtensionData(Bundle bundle); @SuppressWarnings("static-access") @Override void writeToParcel(Parcel dest, int flags); }
DynamicLinkData extends AbstractSafeParcelable { @SuppressWarnings("static-access") @Override public void writeToParcel(Parcel dest, int flags) { DynamicLinkDataCreator.writeToParcel(this, dest, flags); } @SafeParcelable.Constructor  DynamicLinkData(
      @Param(id = 1) String dynamicLink,
      @Param(id = 2) String deepLink,
      @Param(id = 3) int minVersion,
      @Param(id = 4) long clickTimestamp,
      @Param(id = 5) Bundle extensions,
      @Param(id = 6) Uri redirectUrl); String getDynamicLink(); void setDynamicLink(String dynamicLink); String getDeepLink(); void setDeepLink(String deepLink); int getMinVersion(); void setMinVersion(int minVersion); long getClickTimestamp(); void setClickTimestamp(long timestamp); Bundle getExtensionBundle(); void setRedirectUrl(Uri redirectUrl); Uri getRedirectUrl(); void setExtensionData(Bundle bundle); @SuppressWarnings("static-access") @Override void writeToParcel(Parcel dest, int flags); static final Creator<DynamicLinkData> CREATOR; }