Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7dbc7ed5 authored by Tobias Thierer's avatar Tobias Thierer Committed by Gerrit Code Review
Browse files

Merge "Construct default MimeMap lazily rather than eagerly."

parents 46cf71d1 44356068
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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