Skip to content

Commit

Permalink
use SafeParcelableSerializer.serializeToBytes instead of toByte
Browse files Browse the repository at this point in the history
  • Loading branch information
DaVinci9196 committed Nov 11, 2024
1 parent 4961012 commit d0f753a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,5 @@ public void writeToParcel(@NonNull Parcel dest, int flags) {
CREATOR.writeToParcel(this, dest, flags);
}

public byte[] toByte() {
Parcel parcel = Parcel.obtain();
writeToParcel(parcel, 0);
byte[] arr_b = parcel.marshall();
parcel.recycle();
return arr_b;
}

public static final SafeParcelableCreatorAndWriter<DynamicLinkData> CREATOR = findCreator(DynamicLinkData.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.core.view.setPadding
import androidx.lifecycle.lifecycleScope
import com.android.volley.*
import com.android.volley.toolbox.Volley
import com.google.android.gms.common.internal.safeparcel.SafeParcelableSerializer
import com.google.firebase.dynamiclinks.internal.DynamicLinkData
import com.squareup.wire.Message
import com.squareup.wire.ProtoAdapter
Expand Down Expand Up @@ -86,7 +87,7 @@ class AppInviteActivity : AppCompatActivity() {
APPINVITE_OPENED_FROM_PLAY_STORE to false
)
)
putExtra(DYNAMIC_LINK_DATA, dynamicLinkData.toByte())
putExtra(DYNAMIC_LINK_DATA, SafeParcelableSerializer.serializeToBytes(dynamicLinkData))
}
val fallbackIntent = Intent(Intent.ACTION_VIEW).apply {
addCategory(Intent.CATEGORY_DEFAULT)
Expand Down

0 comments on commit d0f753a

Please sign in to comment.