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

Commit 053fd81b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't clobber application's strict mode"

parents 380a27b4 5e154365
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -5692,11 +5692,12 @@ public final class ActivityThread {
        // Allow disk access during application and provider setup. This could
        // block processing ordered broadcasts, but later processing would
        // probably end up doing the same disk access.
        Application app;
        final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskWrites();
        try {
            // If the app is being launched for full backup or restore, bring it up in
            // a restricted environment with the base application class.
            Application app = data.info.makeApplication(data.restrictedBackupMode, null);
            app = data.info.makeApplication(data.restrictedBackupMode, null);
            mInitialApplication = app;

            // don't bring up providers in restricted mode; they may depend on the
@@ -5720,6 +5721,9 @@ public final class ActivityThread {
                    "Exception thrown in onCreate() of "
                    + data.instrumentationName + ": " + e.toString(), e);
            }
        } finally {
            StrictMode.setThreadPolicy(savedPolicy);
        }

        try {
            mInstrumentation.callApplicationOnCreate(app);
@@ -5730,9 +5734,6 @@ public final class ActivityThread {
                    + ": " + e.toString(), e);
            }
        }
        } finally {
            StrictMode.setThreadPolicy(savedPolicy);
        }

        // Preload fonts resources
        FontsContract.setApplicationContextForResources(appContext);