Java Code Examples for android.os.Bundle#putParcelableList()

The following examples show how to use android.os.Bundle#putParcelableList() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public void handleMessage(Message msg) {
    final int action = msg.what;
    switch (action) {
        case MSG_SEND_LIST:
            final Pair<RemoteCallback, List<CacheQuotaHint>> pair =
                    (Pair<RemoteCallback, List<CacheQuotaHint>>) msg.obj;
            List<CacheQuotaHint> processed = onComputeCacheQuotaHints(pair.second);
            final Bundle data = new Bundle();
            data.putParcelableList(REQUEST_LIST_KEY, processed);

            final RemoteCallback callback = pair.first;
            callback.sendResult(data);
            break;
        default:
            Log.w(TAG, "Handling unknown message: " + action);
    }
}
 
Example 2
public void onInstantAppResolveInfo(List<InstantAppResolveInfo> resolveInfo) {
    final Bundle data = new Bundle();
    data.putParcelableList(EXTRA_RESOLVE_INFO, resolveInfo);
    data.putInt(EXTRA_SEQUENCE, mSequence);
    try {
        mCallback.sendResult(data);
    } catch (RemoteException e) {
    }
}
 
Example 3
Source Project: android_9.0.0_r45   File: MediaStore.java    License: Apache License 2.0 5 votes vote down vote up
private static Uri getDocumentUri(
        ContentResolver resolver, String path, List<UriPermission> uriPermissions)
        throws RemoteException {

    try (ContentProviderClient client = resolver.acquireUnstableContentProviderClient(
            DocumentsContract.EXTERNAL_STORAGE_PROVIDER_AUTHORITY)) {
        final Bundle in = new Bundle();
        in.putParcelableList(
                DocumentsContract.EXTERNAL_STORAGE_PROVIDER_AUTHORITY + ".extra.uriPermissions",
                uriPermissions);
        final Bundle out = client.call("getDocumentId", path, in);
        return out.getParcelable(DocumentsContract.EXTRA_URI);
    }
}