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

Commit 59d2c429 authored by Tobias Thierer's avatar Tobias Thierer Committed by android-build-merger
Browse files

Merge "Construct default MimeMap lazily rather than eagerly."

am: 7dbc7ed5

Change-Id: I60c43606e536872455e8220745bf9094b0d9f56c
parents 69eabb23 7dbc7ed5
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