@UnstableApi
public final class BundleUtil


Utilities for Bundle.

Summary

Public methods

static @Nullable IBinder
getBinder(Bundle bundle, @Nullable String key)

Gets an IBinder inside a Bundle for all Android versions.

static void
putBinder(Bundle bundle, @Nullable String key, @Nullable IBinder binder)

Puts an IBinder inside a Bundle for all Android versions.

Public methods

getBinder

public static @Nullable IBinder getBinder(Bundle bundle, @Nullable String key)

Gets an IBinder inside a Bundle for all Android versions.

Parameters
Bundle bundle

The bundle to get the IBinder.

@Nullable String key

The key to use while getting the IBinder.

Returns
@Nullable IBinder

The IBinder that was obtained.

putBinder

public static void putBinder(Bundle bundle, @Nullable String key, @Nullable IBinder binder)

Puts an IBinder inside a Bundle for all Android versions.

Parameters
Bundle bundle

The bundle to insert the IBinder.

@Nullable String key

The key to use while putting the IBinder.

@Nullable IBinder binder

The IBinder to put.