public synchronized Bundle toBundle()

in src/android/PendingRequests.java [134:152]


    public synchronized Bundle toBundle() {
        Bundle bundle = new Bundle();
        bundle.putInt(CURRENT_ID_KEY, currentReqId);

        for (int i = 0; i < requests.size(); i++) {
            Request r = requests.valueAt(i);
            int requestCode = requests.keyAt(i);
            bundle.putBundle(REQUEST_KEY_PREFIX + requestCode, r.toBundle());
        }

        if (requests.size() > 1) {
            // This scenario is hopefully very unlikely because there isn't much that can be
            // done about it. Should only occur if an external Activity is launched while
            // there is a pending permission request and the device is on low memory
            LOG.w(LOG_TAG, "More than one media capture request pending on Activity destruction. Some requests will be dropped!");
        }

        return bundle;
    }