BundleListRetriever


@UnstableApi
public final class BundleListRetriever extends Binder


A Binder to transfer a list of Bundles across processes by splitting the list into multiple transactions.

Note: Using this class causes synchronous binder calls in the opposite direction regardless of the "oneway" property.

Example usage:

// Sender
ImmutableList<Bundle> list = ...;
IBinder binder = new BundleListRetriever(list);
Bundle bundle = new Bundle();
bundle.putBinder("list", binder);

// Receiver
Bundle bundle = ...; // Received from the sender
IBinder binder = bundle.getBinder("list");
ImmutableList<Bundle> list = BundleListRetriever.getList(binder);

Summary

Public constructors

Creates a Binder to send a list of Bundles to another process.

Public methods

static ImmutableList<Bundle>
getList(IBinder binder)

Gets a list of Bundles from a BundleListRetriever.

Protected methods

boolean
onTransact(int code, Parcel data, @Nullable Parcel reply, int flags)

Inherited Constants

From android.os.IBinder
static final int
DUMP_TRANSACTION = 1598311760
static final int
static final int
static final int
static final int
static final int
LIKE_TRANSACTION = 1598835019
static final int
PING_TRANSACTION = 1599098439
static final int
TWEET_TRANSACTION = 1599362900

Inherited methods

From android.os.Binder
void
attachInterface(IInterface owner, String descriptor)
native static final long
native static final long
void
dump(FileDescriptor fd, String[] args)
void
dumpAsync(FileDescriptor fd, String[] args)
native static final void
native static final int
native static final int
static final int
static final UserHandle
native static final int
String
boolean
static final void
void
linkToDeath(IBinder.DeathRecipient recipient, int flags)
boolean
IInterface
native static final void
native static final void
native static final long
final boolean
transact(int code, Parcel data, Parcel reply, int flags)
boolean
unlinkToDeath(IBinder.DeathRecipient recipient, int flags)
From android.os.IBinder

Public constructors

BundleListRetriever

public BundleListRetriever(List<Bundle> list)

Creates a Binder to send a list of Bundles to another process.

Public methods

getList

public static ImmutableList<BundlegetList(IBinder binder)

Gets a list of Bundles from a BundleListRetriever.

Parameters
IBinder binder

A binder interface backed by BundleListRetriever.

Returns
ImmutableList<Bundle>

The list of Bundles.

Protected methods

onTransact

protected boolean onTransact(int code, Parcel data, @Nullable Parcel reply, int flags)