Merge "Construct default MimeMap lazily rather than eagerly."
am: 7dbc7ed543
Change-Id: I60c43606e536872455e8220745bf9094b0d9f56c
This commit is contained in:
@@ -203,13 +203,15 @@ public class RuntimeInit {
|
||||
public static void preForkInit() {
|
||||
if (DEBUG) Slog.d(TAG, "Entered preForkInit.");
|
||||
RuntimeInit.enableDdms();
|
||||
// TODO(b/142019040#comment13): Decide whether to load the default instance eagerly, i.e.
|
||||
// MimeMap.setDefault(DefaultMimeMapFactory.create());
|
||||
/*
|
||||
* Replace libcore's minimal default mapping between MIME types and file
|
||||
* extensions with a mapping that's suitable for Android. Android's mapping
|
||||
* contains many more entries that are derived from IANA registrations but
|
||||
* with several customizations (extensions, overrides).
|
||||
*/
|
||||
MimeMap.setDefault(DefaultMimeMapFactory.create());
|
||||
MimeMap.setDefaultSupplier(DefaultMimeMapFactory::create);
|
||||
}
|
||||
|
||||
@UnsupportedAppUsage
|
||||
|
||||
Reference in New Issue
Block a user