shadows/framework/src/main/java/org/robolectric/shadows/LegacyManifestParser.java
private static Bundle metaDataToBundle(Map<String, Object> meta) {
    if (meta.size() == 0) {
      return null;
    }

    Bundle bundle = new Bundle();

    for (Map.Entry<String, Object> entry : meta.entrySet()) {
      String key = entry.getKey();
      Object value = entry.getValue();
      if (Boolean.class.isInstance(value)) {
        bundle.putBoolean(key, (Boolean) value);
      } else if (Float.class.isInstance(value)) {
        bundle.putFloat(key, (Float) value);
      } else if (Integer.class.isInstance(value)) {
        bundle.putInt(key, (Integer) value);
      } else {
        bundle.putString(key, value == null ? null : value.toString());
      }
    }
    return bundle;
  }
private static Bundle metaDataToBundle(Map<String, Object> meta) {
    if (meta.size() == 0) {
      return null;
    }

    Bundle bundle = new Bundle();

    for (Map.Entry<String, Object> entry : meta.entrySet()) {
      String key = entry.getKey();
      Object value = entry.getValue();
      if (Boolean.class.isInstance(value)) {
        bundle.putBoolean(key, (Boolean) value);
      } else if (Float.class.isInstance(value)) {
        bundle.putFloat(key, (Float) value);
      } else if (Integer.class.isInstance(value)) {
        bundle.putInt(key, (Integer) value);
      } else {
        bundle.putString(key, value == null ? null : value.toString());
      }
    }
    return bundle;
  }
private static Bundle metaDataToBundle ( Map < String , Object > meta ) { if ( meta . size ( ) == 0 ) { return null ; } Bundle bundle = new Bundle ( ) ; for ( Map . Entry < String , Object > entry : meta . entrySet ( ) ) { String key = entry . getKey ( ) ; Object value = entry . getValue ( ) ; if ( Boolean . class . isInstance ( value ) ) { bundle . putBoolean ( key , ( Boolean ) value ) ; } else if ( Float . class . isInstance ( value ) ) { bundle . putFloat ( key , ( Float ) value ) ; } else if ( Integer . class . isInstance ( value ) ) { bundle . putInt ( key , ( Integer ) value ) ; } else { bundle . putString ( key , value == null ? null : value . toString ( ) ) ; } } return bundle ; }
Goes through the meta data and puts each value in to a bundle as the correct type.

<p>Note that this will convert resource identifiers specified via the value attribute as well.

@param meta Meta data to put in to a bundle
@return bundle containing the meta data
Goes through the meta data and puts each value in to a bundle as the correct type .